MacOSX: I'm having several build problems with gnupgp-2.0.16 + SVN.
SciFi
sci-fi at hush.ai
Tue Aug 3 12:25:18 CEST 2010
Hi,
I've been having several build problems on my MacOSX 10.5.8,
which is an iMac C2D, i386-apple-darwin9.8.0.
I tried 'stable' gnupg-2.0.16,
then got the SVN versions (and prereqs there),
giving me the same grief. ;)
With the SVN version,
I first saw this problem:
>>>>
[…]
gcc-4.2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -fast -mtune=core2 -march=core2 -force_cpusubtype_ALL -arch i386 -O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -fast -mtune=core2 -march=core2 -force_cpusubtype_ALL -arch i386 -o gpg2 gpg.o server.o build-packet.o compress.o compress-bz2.o free-packet.o getkey.o keydb.o keyring.o seskey.o kbnode.o mainproc.o armor.o mdfilter.o textfilter.o progress.o misc.o rmd160.o openfile.o keyid.o parse-packet.o cpr.o plaintext.o sig-check.o keylist.o pkglue.o pkclist.o skclist.o pubkey-enc.o passphrase.o seckey-cert.o decrypt.o decrypt-data.o cipher.o encrypt.o sign.o verify.o revoke.o keyedit.o dearmor.o import.o export.o trustdb.o tdbdump.o tdbio.o delkey.o keygen.o helptext.o keyserver.o photoid.o call-agent.o card-util.o exec.o ../common/libcommon.a ../gl/libgnu.a ../common/libgpgrl.a -lz -lbz2 -lreadline -L/usr/local/lib -lintl -liconv -lc -Wl,-framework -Wl,CoreFoundation -L/usr/local/lib -lgcrypt -lgpg-error -lassuan -L/usr/local/lib -lgpg-error -L/usr/local/lib -lgpg-error -L/usr/local/lib -liconv -L/usr/local/ssl/lib -L/usr/local/lib/libquicktime -L/usr/local/lib -L/usr/X11/lib -L/usr/lib
ld: duplicate symbol _iobuf_debug_mode in server.o and gpg.o
collect2: ld returned 1 exit status
make[2]: *** [gpg2] Error 1
make[2]: Leaving directory `/Volumes/Big1500Doing/Projects/gnupg_svn/g10'
[…]
<<<<
And fixed it with this quicky patch:
>>>>
--- ./common/iobuf.h_orig 2010-08-03 02:40:56 -0500
+++ ./common/iobuf.h 2010-08-03 03:56:38 -0500
@@ -24,8 +24,6 @@
#include "../include/types.h" /* fixme: should be moved elsewhere. */
#include "../common/sysutils.h"
-#define DBG_IOBUF iobuf_debug_mode
-
/* Filter control modes. */
#define IOBUFCTRL_INIT 1
#define IOBUFCTRL_FREE 2
@@ -84,7 +82,7 @@
};
#ifndef EXTERN_UNLESS_MAIN_MODULE
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+#if !defined (INCLUDED_BY_MAIN_MODULE)
#define EXTERN_UNLESS_MAIN_MODULE extern
#else
#define EXTERN_UNLESS_MAIN_MODULE
@@ -92,6 +90,8 @@
#endif
EXTERN_UNLESS_MAIN_MODULE int iobuf_debug_mode;
+#define DBG_IOBUF iobuf_debug_mode
+
void iobuf_enable_special_filenames (int yes);
int iobuf_is_pipe_filename (const char *fname);
iobuf_t iobuf_alloc (int use, size_t bufsize);
<<<<
i.e. Darwin might seem to have the same bug on this as riscos,
so I just eliminated that part of the test altogether. ;)
…
I just happened to spot this similar coding trick
in ./g10/options.sh,
so I went with a similar patch here:
>>>>
--- ./g10/options.h_orig 2010-08-03 02:40:55 -0500
+++ ./g10/options.h 2010-08-03 03:56:44 -0500
@@ -28,7 +28,7 @@
#ifndef EXTERN_UNLESS_MAIN_MODULE
/* Norcraft can't cope with common symbols */
-#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
+#if !defined (INCLUDED_BY_MAIN_MODULE)
#define EXTERN_UNLESS_MAIN_MODULE extern
#else
#define EXTERN_UNLESS_MAIN_MODULE
<<<<
…
Now I am stuck with a similar yet more obstinate problem.
I can't figure out what to do with the big struct called 'opt'
as it is defined in the header ./sm/gpgsm.h:
>>>>
[…]
gcc-4.2 -I/usr/local/include -I/usr/local/include -I/usr/local/include -fast -mtune=core2 -march=core2 -force_cpusubtype_ALL -arch i386 -O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wno-sign-compare -Wno-missing-field-initializers -Wdeclaration-after-statement -Wno-pointer-sign -Wpointer-arith -fast -mtune=core2 -march=core2 -force_cpusubtype_ALL -arch i386 -o gpgsm gpgsm.o misc.o keydb.o server.o call-agent.o call-dirmngr.o fingerprint.o base64.o certlist.o certdump.o certcheck.o certchain.o keylist.o verify.o sign.o encrypt.o decrypt.o import.o export.o delete.o certreqgen.o certreqgen-ui.o minip12.o qualified.o ../kbx/libkeybox.a ../common/libcommon.a ../gl/libgnu.a ../common/libgpgrl.a -L/usr/local/lib -lgcrypt -lgpg-error -L/usr/local/lib -lksba -lgpg-error -lassuan -L/usr/local/lib -lgpg-error -L/usr/local/lib -lgpg-error -lreadline -L/usr/local/lib -lintl -liconv -lc -Wl,-framework -Wl,CoreFoundation -lz -lbz2 -L/usr/local/lib -liconv -L/usr/local/ssl/lib -L/usr/local/lib/libquicktime -L/usr/local/lib -L/usr/X11/lib -L/usr/lib
ld: duplicate symbol _opt in misc.o and gpgsm.o
collect2: ld returned 1 exit status
make[2]: *** [gpgsm] Error 1
make[2]: Leaving directory `/Volumes/Big1500Doing/Projects/gnupg_svn/sm'
[…]
<<<<
Both modules do call for the same ./sm/gpgsm.h,
which defines the struct 'opt' starting at line 52 thru 143.
I don't remember if C can have a "extern struct …" type modifier,
else I could whip up a similar patch as above.
But which module would be the NON-extern definer?
Thanks for any help at all.
More information about the Gnupg-devel
mailing list