Page MenuHome GnuPG

redefinition of typedef ‘ctrl_t’
Closed, ResolvedPublic

Description

I downloaded the N tarballs: configure, make, sudo make install; but when I get to the
make
for gnupg I encounter this error "redefinition of typedef ‘ctrl_t’", which indeed is
defined
in two places, i.e. both common/{call-gpg,util}.h

Thanks for the bytes! - ben

[bhyde@tv1 gnupg-2.1.10]$ grep 'typedef.*ctrl_t' common/call-gpg.h common/util.h
common/call-gpg.h:typedef struct server_control_s *ctrl_t;
common/util.h:typedef struct server_control_s *ctrl_t;
[bhyde@tv1 gnupg-2.1.10]$ make
make all-recursive
make[1]: Entering directory `/home/bhyde/w/gnupg-2.1.10'
Making all in m4
make[2]: Entering directory `/home/bhyde/w/gnupg-2.1.10/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bhyde/w/gnupg-2.1.10/m4'
Making all in common
make[2]: Entering directory `/home/bhyde/w/gnupg-2.1.10/common'
make all-am
make[3]: Entering directory `/home/bhyde/w/gnupg-2.1.10/common'
gcc -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -
DGNUPG_BINDIR="\"/usr/local/bin\"" -DGNUPG_LIBEXECDIR="\"/usr/local/libexec\"" -
DGNUPG_LIBDIR="\"/usr/local/lib/gnupg\"" -DGNUPG_DATADIR="\"/usr/local/share/gnupg\"" -
DGNUPG_SYSCONFDIR="\"/usr/local/etc/gnupg\"" -DGNUPG_LOCALSTATEDIR="\"/usr/local/var\""
-I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -
DWITHOUT_NPTH=1 -Wall -Wno-pointer-sign -Wpointer-arith -g -O2 -MT libcommon_a-call-
gpg.o -MD
-MP -MF .deps/libcommon_a-call-gpg.Tpo -c -o libcommon_a-call-gpg.o `test -f 'call-
gpg.c' ||
echo './'`call-gpg.c
In file included from call-gpg.c:37:
util.h:470: error: redefinition of typedef ‘ctrl_t’
call-gpg.h:27: note: previous declaration of ‘ctrl_t’ was here
make[3]: * [libcommon_a-call-gpg.o] Error 1
make[3]: Leaving directory `/home/bhyde/w/gnupg-2.1.10/common'
make[2]:
* [all] Error 2
make[2]: Leaving directory `/home/bhyde/w/gnupg-2.1.10/common'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/home/bhyde/w/gnupg-2.1.10'
make:
* [all] Error 2
[bhyde@tv1 gnupg-2.1.10]$ uname -a
Linux tv1.local 2.6.32-504.12.2.el6.x86_64 #1 SMP Wed Mar 11 22:03:14 UTC 2015 x86_64
x86_64
x86_64 GNU/Linux
[bhyde@tv1 gnupg-2.1.10]$

Details

Version
2.1.10

Event Timeline

bhyde set Version to 2.1.10.
bhyde added a subscriber: bhyde.

What compiler are you using?

Such re-definitions/declarations are a common pattern and are actually useful to
implement an OO system in standard C. Hoever, it is easy to change. See commit
98f9e14 .

I was using "gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)", and then I
just updated to "gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)". Sadly,
no change.

In happier news, applying 98f9e14, by hand, to 2.1.10’s sources
allowed me to make and install.

That's nice. Thanks! I hope you have a pleasant year end.

werner claimed this task.

Fix will be in 2.1.11. Thanks for testing.