error building gcrypt cvs on os x

Neil Spring nspring@cs.washington.edu
Sat, 26 Jul 2003 19:25:49 -0700


--Apple-Mail-1--638824104
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed

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.

Making all in src
/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
gcc -dynamiclib -flat_namespace -undefined suppress -o 
.libs/libgcrypt.1.5.1.dylib  .libs/misc.o .libs/global.o .libs/sexp.o 
.libs/stdmem.o .libs/secmem.o .libs/missing-string.o .libs/module.o 
.libs/ath.o .libs/ath-pthread.o -all_load  ../cipher/.libs/libcipher.a 
../mpi/.libs/libmpi.a  -L/sw/lib /sw/lib/libgpg-error.dylib 
-install_name  /usr/local/lib/libgcrypt.1.dylib -compatibility_version 
7 -current_version 7.1
ld: multiple definitions of symbol ___clz_tab
../mpi/.libs/libmpi.a(mpi-bit.o) definition of ___clz_tab in section 
(__TEXT,__const)
/usr/lib/gcc/darwin/3.1/libgcc.a(_clz.o) private external definition of 
___clz_tab in section (__TEXT,__const)
/usr/bin/libtool: internal link edit command failed
make[2]: *** [libgcrypt.la] Error 1
make[1]: *** [all-recursive] Error 1

thanks,
-neil

--Apple-Mail-1--638824104
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/IzgztvhXVvuQ3oQRApOWAJ0chX5HDTzFLyJOBxY8m2ZopBKGAgCglz0v
alBCdNMAJn9t+jh8LUMDME4=
=UxJW
-----END PGP SIGNATURE-----

--Apple-Mail-1--638824104--