On 2015-5-24 02:25 , David Evans wrote: > On 5/19/15 10:31 PM, Joshua Root wrote: >> On 2015-5-20 13:24 , Joshua Root wrote: >>>> Revision: 136259 >>>> https://trac.macports.org/changeset/136259 >>>> Author: devans at macports.org >>>> Date: 2015-05-13 12:49:19 -0700 (Wed, 13 May 2015) >>>> Log Message: >>>> ----------- >>>> gnome-keyring: blacklist compilers that do not support C11 >>>> (redefinition of typedefs). >>> Do you have a log of this failure I can look at? It seems more likely >>> that this is a bug, not a deliberate use of C11 features. >> There's definitely a bug in one of the headers. Try this. >> >> - Josh > Thanks for the suggestion, Josh. > > While this is definitely a header typo, it appears to be unrelated to > the issue I was addressing. > > The failure when building with gcc-4.2 (including your patch) is as > follows: > > :info:build /bin/sh ./libtool --tag=CC --mode=compile > /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. > -DPREFIX=\""/opt/local"\" -DBINDIR=\""/opt/local/bin"\" > -DLIBEXECDIR=\""/opt/local/libexec"\" > -DGNOMELOCALEDIR=\""/opt/local/share/locale"\" > -DSRCDIR="\"/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_stable_dports_gnome_gnome-keyring/gnome-keyring/work/gnome-keyring-3.16.0\"" > -DBUILDDIR="\"/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_stable_dports_gnome_gnome-keyring/gnome-keyring/work/gnome-keyring-3.16.0\"" > -I. -I. -I./pkcs11 -I/opt/local/include/glib-2.0 > -I/opt/local/lib/glib-2.0/include -I/opt/local/include > -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38 > -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38 -I/opt/local/include > -Wall -Wchar-subscripts -Wmissing-declarations > -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align > -Wsign-compare -pipe -Os -arch x86_64 -g -Wno-strict-aliasing > -Wno-sign-compare -MT daemon/dbus/test-service.lo -MD -MP -MF > $depbase.Tpo -c -o daemon/dbus/test-service.lo > daemon/dbus/test-service.c &&\ > :info:build mv -f $depbase.Tpo $depbase.Plo > :info:build In file included from daemon/dbus/gkd-secret-unlock.c:37: > :info:build ./daemon/login/gkd-login.h: At top level: > :info:build ./daemon/login/gkd-login.h:26: error: redefinition of > typedef 'GckSession' > :info:build /opt/local/include/gck-1/gck/gck.h:391: error: previous > declaration of 'GckSession' was here > :info:build make[2]: *** > [daemon/dbus/libgkd_dbus_la-gkd-secret-unlock.lo] Error 1 > > The upstream commit that introduced this error is > > https://git.gnome.org/browse/gnome-keyring/commit/daemon/login/gkd-login.h?id=354f9887eef1c2c6144b904739ca0230bc2f2a4e > > > > I think this is a case of lazy programming. GckSession is defined by > the gcr port in gck.h but rather than work out the correct include > sequences throughout > the rest of the code the committer just redefined GckSession to get it > to build as is, figuring that he could get away with it with most > (newer) compilers. The definition here is identical to the one in gck.h > so there is no harm in ignoring the redefinition. > > Newer versions of clang, also catch this redefinition but just issue a > warning rather than throwing an error. > > My build log showing the failure using apple-gcc-4.2 and your patch is > attached.
OK. Brute-force fix: remove the typedef and replace all occurrences of 'GckSession' with 'struct _GckSession'. Probably worth an upstream bug, since this is invalid in C99 which is far from dead yet. - Josh _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
