Opened 6 months ago

Last modified 4 months ago

#61356 new defect

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

Reported by: MStraeten (Martin Straeten) Owned by:
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)
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) 6 months ago.
w3m/main.log

Download all attachments as: .zip

Change History (23)

Changed 6 months ago by MStraeten (Martin Straeten)

Attachment: main.log added

w3m/main.log

comment:1 Changed 6 months 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 6 months 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 6 months ago by ryandesign (Ryan 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 5 months ago by ryandesign (Ryan 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 5 months 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 5 months 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 5 months ago by amake (Aaron Madlon-Kay)

Cc: amake added

comment:8 in reply to:  6 Changed 5 months 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 5 months 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 5 months ago by MaurizioLoreti

Cc: MaurizioLoreti added

comment:11 in reply to:  9 Changed 5 months 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 5 months ago by amake (Aaron Madlon-Kay) (previous) (diff)

comment:12 Changed 5 months 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 5 months ago by kencu (Ken) (previous) (diff)

comment:13 Changed 5 months ago by kencu (Ken)

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

comment:14 Changed 5 months 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 5 months 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 5 months ago by hexadecagram (Anthony Chavez)

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 5 months ago by hexadecagram (Anthony Chavez) (previous) (diff)

comment:17 Changed 5 months ago by Aaron Madlon-Kay <aaron@…>

In cdefca9f0ac978b7c997c877d8f6da09c766a232/macports-ports (master):

gegl: remove disused dependency on w3m

See #61356

comment:18 Changed 5 months 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 5 months 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 5 months ago by Aaron Madlon-Kay <amake@…>

comment:21 Changed 5 months 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 months ago by ryandesign (Ryan Schmidt)

Cc: raw-bin added
Keywords: bigsur catalina added

Has duplicate #61938.

Note: See TracTickets for help on using tickets.