error building gcrypt cvs on os x
Neil Spring
nspring@cs.washington.edu
Sun, 27 Jul 2003 14:04:13 -0700
--Apple-Mail-3--571720617
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Sunday, Jul 27, 2003, at 11:05 US/Pacific, Fred wrote:
> Neil Spring wrote:
>> Darwin has it's own __clz_tab in libgcc, so defining one in mpi-bit.c
>> causes an error. Note that this is built with configure
>> --disable-asm. I'm happy to send the rest of the config and build
>> log, if needed. Perhaps an autoconf check could notice if __clz_tab
>> is defined and suppress the definition of MPI_INTERNAL_NEED_CLZ_TAB
>> in longlong.h. "make check" succeeds after commenting out that
>> #define.
>
> The error is corrected in version 1.1.12 of libgcypt, see the recent
> thread on Mac OS X.
I'm familiar with that thread. ;) I wanted to play with the CVS
version and its changed interfaces.
It appears to be a problem with libtool 1.4.2a (used for
libgcrypt-1.1.11) and libtool 1.5 (sitting on my machine) but not 1.4.3
(used for 1.1.12). That is, if I copy libgcrypt-1.1.12/libtool and
.../scripts/ltmain.sh, into my sandbox, the build proceeds as it
should. If I let autogen.sh invoke glibtool (yes, I had to mod autogen
to pick up GNU libtool under a different name) or copy from
libgcrypt-1.1.11, I get the clz_tab complaint.
1.4.3 uses the "gcc -r -keep_private_externs -nostdlib" incantation as
an intermediate step in building the library, while the other versions
do not (detail below). That's the only difference I can see, so I
can't tell what should be done to fix it.
thanks,
-neil
1.4.3 does:
/bin/sh ../libtool --mode=link gcc -I/sw/include -g -O2 -Wall -o
libgcrypt.la -rpath /usr/local/lib -version-info 6:1:5 misc.lo
global.lo sexp.lo stdmem.lo secmem.lo missing-string.lo module.lo
ath.lo ath-pthread.lo ../cipher/libcipher.la ../mpi/libmpi.la
-L/sw/lib -lgpg-error
rm -fr .libs/libgcrypt.la .libs/libgcrypt.* .libs/libgcrypt.*
gcc -r -keep_private_externs -nostdlib -o
.libs/libgcrypt.1.5.1.dylib-master.o misc.lo global.lo sexp.lo
stdmem.lo secmem.lo missing-string.lo module.lo ath.lo ath-pthread.lo
-all_load ../cipher/.libs/libcipher.al ../mpi/.libs/libmpi.al && gcc
-dynamiclib -flat_namespace -undefined suppress -o
.libs/libgcrypt.1.5.1.dylib .libs/libgcrypt.1.5.1.dylib-master.o
-L/sw/lib -lgpg-error -lc -install_name
/usr/local/lib/libgcrypt.1.dylib -compatibility_version 7
-current_version 7.1
(cd .libs && rm -f libgcrypt.1.dylib && ln -s libgcrypt.1.5.1.dylib
libgcrypt.1.dylib)
(cd .libs && rm -f libgcrypt.dylib && ln -s libgcrypt.1.5.1.dylib
libgcrypt.dylib)
(and succeeds)
while 1.4.2a does:
/bin/sh ../libtool --mode=link gcc -I/sw/include -g -O2 -Wall -o
libgcrypt.la -rpath /usr/local/lib -version-info 6:1:5 misc.lo
global.lo sexp.lo stdmem.lo secmem.lo missing-string.lo module.lo
ath.lo ath-pthread.lo ../cipher/libcipher.la ../mpi/libmpi.la -L
/sw/lib -lgpg-error
rm -fr .libs/libgcrypt.la .libs/libgcrypt.* .libs/libgcrypt.*
gcc -dynamiclib -flat_namespace -undefined suppress -o
.libs/libgcrypt.1.5.1.dylib misc.lo global.lo sexp.lo stdmem.lo
secmem.lo mi
ssing-string.lo module.lo ath.lo ath-pthread.lo -all_load
../cipher/.libs/libcipher.al ../mpi/.libs/libmpi.al
../cipher/.libs/libc
ipher.al ../mpi/.libs/libmpi.al -L/sw/lib -lgpg-error -lc -install_name
/usr/local/lib/libgcrypt.1.dylib -compatibility_version 7 -
current_version 7.1
ld: multiple definitions of symbol __gcry_cipher_init
../cipher/.libs/libcipher.al(cipher.lo) definition of
__gcry_cipher_init in section (__TEXT,__text)
../cipher/.libs/libcipher.al(cipher.lo) definition of
__gcry_cipher_init in section (__TEXT,__text)
(lots of errors follow)
--Apple-Mail-3--571720617
content-type: application/pgp-signature; x-mac-type=70674453;
name=PGP.sig
content-disposition: inline
content-transfer-encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
iD8DBQE/JD5StvhXVvuQ3oQRArW7AJwMU9ZVjPiGsTJ2x4ltOLNYn91wvACfaKxz
seTCzwxU8+V2nnV4B9pd4yw=
=YDr2
-----END PGP SIGNATURE-----
--Apple-Mail-3--571720617--