Opened 4 years ago

Closed 3 years ago

#61356 closed defect (fixed)

w3m, w3m-devel: error: redefinition of 'sys_errlist' with a different type: 'char **' vs 'const char *const []'

Reported by: MStraeten (Martin Straeten) Owned by: kimura wataru <kimuraw@…>
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: bigsur catalina Cc: chicagotripp (Altoine Barker), amake (Aaron Madlon-Kay), MaurizioLoreti, raw-bin (Robin Randhawa), p-bro
Port: w3m, w3m-devel

Description

w3m build fails with error:

:info:build /usr/bin/clang  -I. -I. -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -I./libwc  -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/opt/local/libexec/w3m\" -DCGIBIN_DIR=\"/opt/local/libexec/w3m/cgi-bin\" -DHELP_DIR=\"/opt/local/share/w3m\" -DETC_DIR=\"/opt/local/etc\" -DCONF_DIR=\"/opt/local/etc/w3m\" -DRC_DIR=\"~/.w3m\" -DLOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk  -c -o local.o local.c
:info:build 9 warnings and 1 error generated.
:info:build etc.c:638:8: error: redefinition of 'sys_errlist' with a different type: 'char **' vs 'const char *const []'
:info:build char **sys_errlist;
:info:build        ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:368:30: note: previous declaration is here
:info:build extern __const char *__const sys_errlist[];
:info:build                              ^
:info:build etc.c:640:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
:info:build prepare_sys_errlist()
:info:build ^
:info:build etc.c:648:17: error: cannot assign to variable 'sys_errlist' with const-qualified type 'const char *const []'
:info:build     sys_errlist = New_N(char *, n);
:info:build     ~~~~~~~~~~~ ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:368:30: note: variable 'sys_errlist' declared const here
:info:build extern __const char *__const sys_errlist[];
:info:build ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
:info:build etc.c:649:20: error: cannot assign to variable 'sys_errlist' with const-qualified type 'const char *const []'
:info:build     sys_errlist[0] = "";
:info:build     ~~~~~~~~~~~~~~ ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:368:30: note: variable 'sys_errlist' declared const here
:info:build extern __const char *__const sys_errlist[];
:info:build ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
:info:build etc.c:651:17: error: cannot assign to variable 'sys_errlist' with const-qualified type 'const char *const []'
:info:build         sys_errlist[i] = strerror(i);
:info:build         ~~~~~~~~~~~~~~ ^
:info:build /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:368:30: note: variable 'sys_errlist' declared const here
:info:build extern __const char *__const sys_errlist[];
:info:build ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
:info:build make: *** [file.o] Error 1

Attachments (1)

main.log (77.8 KB) - added by MStraeten (Martin Straeten) 4 years ago.
w3m/main.log

Download all attachments as: .zip

Change History (28)

Changed 4 years ago by MStraeten (Martin Straeten)

Attachment: main.log added

w3m/main.log

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Keywords: w3m removed
Port: w3m added

In the future, please fill in the Port field and add the port maintainer(s) to Cc (port info --maintainers w3m), if any.

comment:2 Changed 4 years ago by mf2k (Frank Schima)

Summary: w3m - Failed to build w3mw3m: error: redefinition of 'sys_errlist' with a different type: 'char **' vs 'const char *const []'

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Development of w3m seems to have ended years ago. The last release was in 2011 and there are years worth of unanswered bug reports in their issue tracker.

Meanwhile, Debian has a fork that has continued the development. We offer this in the w3m-devel port. Try installing that instead.

If that works, we could potentially try to identify the fix and backport it to the w3m port, although we might want to consider instead switching the w3m port to the Debian fork and getting rid of w3m-devel.

comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: chicagotripp added
Port: w3m-devel added
Summary: w3m: error: redefinition of 'sys_errlist' with a different type: 'char **' vs 'const char *const []'w3m, w3m-devel: error: redefinition of 'sys_errlist' with a different type: 'char **' vs 'const char *const []'

Has duplicates #61432 and #61433. Unfortunately it looks like the problem affects w3m-devel as well. Hopefully the developers of w3m-devel can fix it. Probably they should focus on fixing implicit declarations of functions.

comment:5 Changed 4 years ago by jwoehr (Jack J. Woehr)

I'm trying to upgrade outdated. w3m is not currently installed. But my upgrade is stalled there .. perhaps something being upgraded now requires w3m ?

comment:6 Changed 4 years ago by arappe

I'll just chime in briefly. I understand that w3m is obsolete. I think that neomutt is not obsolete however, and neomutt depends on w3m. Is there a way to compile neomutt in MacPorts without w3m available? If so, I'd be happy to learn how. Thanks! (I don't need / use the w3m html-viewing functionality in neomutt. I use lynx for that.)

comment:7 Changed 4 years ago by amake (Aaron Madlon-Kay)

Cc: amake added

comment:8 in reply to:  6 Changed 4 years ago by orrrrn

Replying to arappe:

I'll just chime in briefly. I understand that w3m is obsolete. I think that neomutt is not obsolete however, and neomutt depends on w3m. Is there a way to compile neomutt in MacPorts without w3m available? If so, I'd be happy to learn how. Thanks! (I don't need / use the w3m html-viewing functionality in neomutt. I use lynx for that.)

You can install neomutt without doc to get rid of w3m dependency.

sudo port install neomutt -doc

comment:9 Changed 4 years ago by MaurizioLoreti

Hi there - I am trying to install "gimp +quartz". gimp requires w3m, that does not compile as said before; this is an install from scratch, since I upgraded to Big Sur. Does that means that I cannot install gimp +quartz under Big Sur?

comment:10 Changed 4 years ago by MaurizioLoreti

Cc: MaurizioLoreti added

comment:11 in reply to:  9 Changed 4 years ago by amake (Aaron Madlon-Kay)

Replying to MaurizioLoreti:

Hi there - I am trying to install "gimp +quartz". gimp requires w3m, that does not compile as said before; this is an install from scratch, since I upgraded to Big Sur. Does that means that I cannot install gimp +quartz under Big Sur?

I have several PRs open to remove w3m from the dependency chain of gimp.

Once those are merged, w3m won't be your problem, but py27-gobject is still failing on Big Sur so you still won't have your gimp :(

Last edited 4 years ago by amake (Aaron Madlon-Kay) (previous) (diff)

comment:12 Changed 4 years ago by kencu (Ken)

w3m installs fine on BigSur if you build it with macports-clang-9.0:

% sudo port -v install  w3m configure.compiler=macports-clang-9.0

% port -v installed w3m
The following ports are currently installed:
  w3m @0.5.3-38_0 (active) platform='darwin 20' archs='x86_64' date='2020-11-20T15:46:22-0800'

This might get us by until it is fixed up properly, rather than do surgery on many ports...

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:13 Changed 4 years ago by kencu (Ken)

macports-clang-10 works fine too, and is six months newer.

comment:14 Changed 4 years ago by kencu (Ken)

In c92fb7fdc7d890e115af63c2e1b1861df9096eb7/macports-ports (master):

w3m/w3m-devel: build with clang-9.0

temporary fix until this port is updated to build against
newer, stricter clang on BigSur or replaced

see: #61356

comment:15 Changed 4 years ago by jwoehr (Jack J. Woehr)

Thanks everyone, the update works for me, at least, I'm past wm3 in upgrading outdated on Big Sur.

comment:16 Changed 4 years ago by hexadecagram ({16/7})

Now with the temporary fix in place, port upgrade -u outdated installs w3m but fails as expected once it reaches py27-gobject.

What is the magic formula for bypassing ports that fail to build so that what can be built will be built? I have tried deactivating py27-gobject (and py27-pygtk) yet port still attempts to build them. I have also tried such things as port upgrade -u outdated and not py27-gobject without success.

EDIT: There's probably a more elegant solution but this seems to do the trick: sh -c 'for portname in "$@"; do; sudo port deactivate "$portname" or "rdependentof:$portname"; done' -- py27-gobject

Last edited 4 years ago by hexadecagram ({16/7}) (previous) (diff)

comment:17 Changed 4 years ago by Aaron Madlon-Kay <aaron@…>

In cdefca9f0ac978b7c997c877d8f6da09c766a232/macports-ports (master):

gegl: remove disused dependency on w3m

See #61356

comment:18 Changed 4 years ago by Aaron Madlon-Kay <aaron@…>

In c213af81e0336544050326f8bddd697d302105d0/macports-ports (master):

xmlto: use links for conversion from HTML

w3m is the default, but it doesn't build on Big Sur and seems mostly abandoned.

See #61356

comment:19 Changed 4 years ago by Aaron Madlon-Kay <aaron@…>

In 58dff9d93103a7cc833c367a04272a3938f244d2/macports-ports (master):

xdg-utils: replace w3m build dependency with links

w3m doesn't build on Big Sur and seems to be abandoned. A text-based browser is
used for generating text files at build time, and links is explicitly suggested
as an option:

`
No way to convert HTML to text found.
Try either installing text web browser(lynx/w3m/links) or use option --with-fop
`

(lynx does not currently build on Big Sur either)

xmlto apparently needs to be told at configure time where the links binary is,
so the dependency on links is pushed into the xmlto port.

See #61356

comment:20 Changed 4 years ago by Aaron Madlon-Kay <amake@…>

comment:21 Changed 4 years ago by Aaron Madlon-Kay <aaron@…>

In b7cc6e623bfe6ca0ed54834693d962f19eb642f8/macports-ports (master):

babl: make w3m an optional dependency via +docs variant

w3m does not build on Big Sur and is not actively maintained. It is only used
for generating an optional readme file.

See #61356

comment:22 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: raw-bin added
Keywords: bigsur catalina added

Has duplicate #61938.

comment:23 Changed 3 years ago by jxy (Xiao-Yong)

This issue was fixed on the GitHub repo used in w3m-devel subport since Nov 22, 2020. https://github.com/tats/w3m/commit/f1fd7215d2e031679b64f647744bab3da710716c

I'm currently using

subport w3m-devel {
    PortGroup       github 1.0

    github.setup    tats w3m f9be06a15808904a9318d2ae4d6336ad9fabce73
    version         20210516

    checksums       rmd160  37ee7f8d1425233974009e503e7b0585bdbeacfa \
                    sha256  f5acaf910057ec1e889aff1908bcdd8c7d0977e26df8f0aeca1de18228e0be60 \
                    size    2299891

    conflicts       w3m
}

with the Big Sur workaround if {...} {compiler.blacklist-append clang} removed.

comment:24 Changed 3 years ago by enckse (Sean Enck)

I mucked around with a PR to update w3m-devel (https://github.com/macports/macports-ports/pull/11467) but then w3m broke in CI which required me to cherry-pick 2 changes from w3m-devel back to even get it to build. I hesitated to even attempt to fix the build issue because I had previously noticed the above comment/quote:

If that works, we could potentially try to identify the fix and backport it to the w3m port, although we might want to consider instead switching the w3m port to the Debian fork and getting rid of w3m-devel.

and that this seems like the real fix to this problem

Version 0, edited 3 years ago by enckse (Sean Enck) (next)

comment:25 Changed 3 years ago by p-bro

I'm having the build of w3m and w3m devel fail on Big Sur (11.6) on arm64 with a different error (both with the same):

:info:build file.c:185:5: error: too few arguments to function call, expected 2, have 1
:info:build     LONGJMP(AbortLoading, 1);
:info:build     ^~~~~~~~~~~~~~~~~~~~~~~~
:info:build ./config.h:185:38: note: expanded from macro 'LONGJMP'
:info:build # define LONGJMP(env,val) longjmp(env)
:info:build                           ~~~~~~~    ^

Symptom of the same bug, or worthy of new bug report?

comment:26 Changed 3 years ago by p-bro

Cc: p-bro added

comment:27 Changed 3 years ago by kimura wataru <kimuraw@…>

Owner: set to kimura wataru <kimuraw@…>
Resolution: fixed
Status: newclosed

In a44aa4d27a074e8f359041e90f36b171ea0ab5d9/macports-ports (master):

www/w3m, w3m-devel: fix build errors on macOS 12 Monterey/macOS 11 BigSur

closes: #63711
closes: #61356

  • w3m => @0.5.3_38_1
    • patch-configure.diff: fix wrong HAVE_feature detection with [-Werror,-Wimplicit-function-declaration]
    • patch-config.h.in.diff: fix "too few arguments to function call" at LONGJMP()
  • w3m-devel => @20211027_0
    • update to recent upstream version
  • now, we can build with Xcode's clang on macOS 11/12

tested platforms:

  • macOS 12.0.1 (x64)
  • macOS 11.6.1 (x64)
  • Mac OS X 10.7.5 (x64)
Note: See TracTickets for help on using tickets.