Compiling libgcrypt under OS X as universal binary
tim.kosse at filezilla-project.org
Thu Nov 9 17:12:51 CET 2006
-----BEGIN PGP SIGNED MESSAGE-----
In did compile libgcrypt (SVN trunk) under OSX (arch: i386) as univeral
binary (both i386 as well as ppc), by configuring it with this command:
CFLAGS="-arch i386 -arch ppc" ./configure --disable-shared
- --enable-static --disable-dependency-tracking --disable-nls --disable-asm
However, compilation failed with error messages similar to this:
"ar: somefile.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)"
I noticed, that libgcrypt comes a long with very old libtool files. I
had to replace the provided ltmain.sh, config.sub and config.guess files
with the ones from libtool 1.5.22, which adds support for fat binaries.
Would it be possible to update these files in the next libgcrypt version?
Furthermore, I had to modify config.h, I had to add these lines:
#if defined (__ppc__) || defined(__ppc64__)
#define WORDS_BIGENDIAN 1
Basically, if creating fat binaries, all files get compiled twice
automatically, once for i386, once for ppc.
Last but not least, I had to disable src/gcryptrnd.c, it failed due to
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Gcrypt-devel