Opened 21 months ago

Last modified 4 months ago

#66743 assigned defect

gnupg2 is broken on 10.6.8 now: error: redefinition of typedef ‘KEYRING_HANDLE’

Reported by: barracuda156 Owned by: roederja
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: leopard, snowleopard Cc:
Port: gnupg2

Description

/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/opt/local/share/locale\" -DGNUPG_BINDIR="\"/opt/local/bin\"" -DGNUPG_LIBEXECDIR="\"/opt/local/libexec\"" -DGNUPG_LIBDIR="\"/opt/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/opt/local/share/gnupg\"" -DGNUPG_SYSCONFDIR="\"/opt/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/opt/local/var\""  -DGNUPG_DEFAULT_PINENTRY="\"/opt/local/bin/pinentry\""      -I/opt/local/include -DLDAP_DEPRECATED=1  -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -Wall -Wno-pointer-sign -Wpointer-arith -pipe -Os -arch ppc -MT seskey.o -MD -MP -MF .deps/seskey.Tpo -c -o seskey.o seskey.c
In file included from keydb.c:41:
keydb-private.h:30: error: redefinition of typedef ‘KEYRING_HANDLE’
keyring.h:25: error: previous declaration of ‘KEYRING_HANDLE’ was here
keydb-private.h:32: error: redefinition of typedef ‘KEYBOX_HANDLE’
../kbx/keybox.h:36: error: previous declaration of ‘KEYBOX_HANDLE’ was here
make[2]: *** [keydb.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Change History (5)

comment:1 Changed 21 months ago by barracuda156

With gcc12 builds fine.

comment:3 Changed 21 months ago by roederja

Ok, I set compiler.c_standard 2011 in the Portfile. Does that help?

comment:4 Changed 21 months ago by jmroot (Joshua Root)

This may well be an upstream mistake, as they seem to be targeting -std=gnu99.

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

Well well, it looks like at least some compilers allow redefinition of typedefs in gnu99 mode (and don't require C11 mode for that feature), according to:

https://bugzilla.redhat.com/show_bug.cgi?id=1728944

I suspect gcc-4.2 does not, but I haven't tested that exact point yet.

Note: See TracTickets for help on using tickets.