Opened 7 weeks ago
Closed 7 weeks ago
#70869 closed defect (fixed)
gss @1.0.4: config.h:1001:37: an attribute list cannot appear here
Reported by: | ShadSterling (Shad Sterling) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.1 |
Keywords: | sequoia | Cc: | ryandesign (Ryan Carsten Schmidt) |
Port: | gss gettext |
Description
2018 Intel macbook just upgraded to Sequoia, sudo port migrate
largely failed on #70750 and then #70849, after addressing those sudo port restore --last
also largely fails due to this error building gss
:
:info:build libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch x86_64 -MT libgnu_la-fd-hook.lo -MD -MP -MF .deps/libgnu_la-fd-hook.Tpo -c fd-hook.c -o libgnu_la-fd-hook.o >/dev/null 2>&1 :info:build In file included from ialloc.c:21: :info:build ./ialloc.h:39:1: error: an attribute list cannot appear here :info:build 39 | IALLOC_INLINE void * _GL_ATTRIBUTE_COLD :info:build | ^~~~~~~~~~~~~ :info:build ialloc.c:20:23: note: expanded from macro 'IALLOC_INLINE' :info:build 20 | #define IALLOC_INLINE _GL_EXTERN_INLINE :info:build | ^~~~~~~~~~~~~~~~~ :info:build ../../config.h:1193:35: note: expanded from macro '_GL_EXTERN_INLINE' :info:build 1193 | # define _GL_EXTERN_INLINE static _GL_UNUSED :info:build | ^~~~~~~~~~ :info:build ../../config.h:1006:20libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch x86_64 -MT libgnu_la-getprogname.lo -MD -MP -MF .deps/libgnu_la-getprogname.Tpo -c getprogname.c -o libgnu_la-getprogname.o >/dev/null 2>&1 :info:build : note: expanded from macro '_GL_UNUSED' :info:build 1006 | #define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build ../../config.h:1001:37: note: expanded from macro '_GL_ATTRIBUTE_MAYBE_UNUSED' :info:build 1001 | # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]] :info:build | ^~~~~~~~~~~~~~~~~~~~
Attachments (3)
Change History (14)
Changed 7 weeks ago by ShadSterling (Shad Sterling)
comment:1 Changed 7 weeks ago by kencu (Ken)
Changed 7 weeks ago by kencu (Ken)
Attachment: | gss-glib-patch-1.diff added |
---|
Changed 7 weeks ago by kencu (Ken)
Attachment: | gss-glib-patch-2.diff added |
---|
comment:2 Changed 7 weeks ago by kencu (Ken)
I'm not going to push these patches to MacPorts as they are too brute force and obtuse. Use them if you wish, while you / we see how this plays out properly once upstream gets involved.
Someone needs to open up an upstream ticket in gss and/or gnulib about this.
comment:3 Changed 7 weeks ago by kencu (Ken)
I remember now reading about how clang will reject attribute lists that come before the function declaration, but gcc accepts them.
eg: https://github.com/llvm/llvm-project/issues/58229
So gnulib may need to reorder things.
comment:4 Changed 7 weeks ago by jmroot (Joshua Root)
Cc: | ryandesign added |
---|---|
Port: | gettext added |
I tried patching extern-inline.m4, but it gets overwritten with the copy shipped with gettext when autopoint is run as part of autoreconf.
comment:5 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)
I don't think I have anything to add to this ticket. It sounds like upstream code is wrong so an upstream bug report needs to be filed so the developers fix their code.
comment:6 Changed 7 weeks ago by jmroot (Joshua Root)
That is true, but "upstream" here is gnulib, and it could be quite a while before gettext adopts the updated gnulib and releases a new version and we update the gettext port.
comment:7 Changed 7 weeks ago by jmroot (Joshua Root)
The patch itself is relatively simple:
-
m4/extern-inline.m4
old new 71 71 # define _GL_EXTERN_INLINE extern 72 72 # define _GL_EXTERN_INLINE_IN_USE 73 73 #else 74 # define _GL_INLINE static _GL_UNUSED75 # define _GL_EXTERN_INLINE static _GL_UNUSED74 # define _GL_INLINE _GL_UNUSED static 75 # define _GL_EXTERN_INLINE _GL_UNUSED static 76 76 #endif 77 77 78 78 /* In GCC 4.6 (inclusive) to 5.1 (exclusive),
It's just a matter of applying it in the right place, which AFAICT is gettext.
comment:8 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)
I don't know anything about that patch. Can you provide the upstream URL where the developers say that is the correct fix?
comment:9 Changed 7 weeks ago by jmroot (Joshua Root)
comment:10 Changed 7 weeks ago by jmroot (Joshua Root)
OK, so it's a little more complicated than I realised. ${prefix}/share/gettext/archive.dir.tar.bz2
contains support files for a large number of older version of gettext, which get used based on the version passed to AM_GNU_GETTEXT_VERSION
. I don't know if bug-for-bug compatibility with the older versions is the goal, or if a patch like this that fixes some platforms and shouldn't break anything might be accepted.
In any case, it looks like the easier fix for gss would be to switch to AM_GNU_GETTEXT_REQUIRE_VERSION
, which uses the latest available version >= the specified version, rather than using the exact version given.
comment:11 Changed 7 weeks ago by jmroot (Joshua Root)
Owner: | set to jmroot |
---|---|
Resolution: | → fixed |
Status: | new → closed |
It looks to me like the gnulib included in gss needs updating. The version is several years old.
I tried to do that, but my gnulib skills are not up to snuff. Even after updating gnulib and adding the additional macros to configure.ac that seemed to be needed, I still got these errors about
an attribute list cannot appear here
.A brute-force method did work for me:
and passes all tests:
but it's not pretty. I will attach the (simple) patches I used.
Clearly, upstream gss needs to fix this, and maybe upstream gnulib as well.