Page MenuHome GnuPG

With GCC 4.2 gnupg-2.3.2/kbx/backend-support.c cannot be compiled Mac OS X 10.4.11, "Tiger"
Closed, ResolvedPublic

Description

This is the compiler's report:

/opt/local/bin/gcc-apple-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 -I/opt/local/include -I/opt/local/include -DKEYBOX_WITH_X509=1 -I/opt/local/include -I/opt/local/include -Wall -Wno-pointer-sign -Wpointer-arith -pipe -Os -arch ppc -MT keyboxd-backend-support.o -MD -MP -MF .deps/keyboxd-backend-support.Tpo -c -o keyboxd-backend-support.o test -f 'backend-support.c' || echo './'backend-support.c
In file included from keybox-defs.h:37,

from backend-support.c:32:

keybox.h:36: error: redefinition of typedef 'KEYBOX_HANDLE'
backend.h:28: error: previous declaration of 'KEYBOX_HANDLE' was here
make[2]: *** [keyboxd-backend-support.o] Error 1

This Mac is PowerPC based. On an intel based Mac with an almost modern macOS the then used Clang compiler has no problem with the two typedef's. The same is true for GCC 7 on this old PPC Mac with "Tiger".

A bit more can be found in the external link

Details

External Link
https://trac.macports.org/ticket/63547
Version
gnupg-2.3.2

Related Objects

Event Timeline

gniibe changed the task status from Open to Testing.Thu, Sep 30, 3:17 AM
gniibe claimed this task.
gniibe triaged this task as Normal priority.
gniibe added a project: gnupg (gpg23).
gniibe added a subscriber: gniibe.

Thank you for reporting.
Fixed in master.

Well this seems to be a gcc 4.2 bug. But well, forward declarations should go into a separate file so that tehre is only one place which would require changes. In this case it does not matter.