libgcrypt on Mac OS X

Fred fredm@spamcop.net
Wed, 23 Jul 2003 23:13:21 +0100


Hi,
Has anyone successfully build libgcrypt on Mac OS X?

If I compile without-asm I get loads of multiple definition errors like:
Making all in src
/bin/sh ../libtool --mode=link gcc  -g -O2 -Wall   -o libgcrypt.la 
-rpath /usr/local/lib  -version-info 6:0:5  misc.lo global.lo sexp.lo 
stdmem.lo secmem.lo missing-string.lo ath.lo ath-pthread.lo 
../cipher/libcipher.la  ../mpi/libmpi.la
rm -fr .libs/libgcrypt.la .libs/libgcrypt.* .libs/libgcrypt.*
gcc -dynamiclib -flat_namespace -undefined suppress -o 
.libs/libgcrypt.1.5.0.dylib  misc.lo global.lo sexp.lo stdmem.lo 
secmem.lo missing-string.lo ath.lo ath-pthread.lo -all_load 
../cipher/.libs/libcipher.al ../mpi/.libs/libmpi.al 
../cipher/.libs/libcipher.al ../mpi/.libs/libmpi.al -lc -install_name 
/usr/local/lib/libgcrypt.1.dylib -compatibility_version 7 
-current_version 7.0
ld: multiple definitions of symbol _gcry_cipher_algo_info
../cipher/.libs/libcipher.al(cipher.lo) definition of 
_gcry_cipher_algo_info in section (__TEXT,__text)
../cipher/.libs/libcipher.al(cipher.lo) definition of 
_gcry_cipher_algo_info in section (__TEXT,__text)

If I compile with asm I get:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -g -O2 -Wall -c mpiutil.c 
-Wp,-MD,.deps/mpiutil.TPlo  -fno-common -DPIC -o .libs/mpiutil.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -g -O2 -Wall -c mpiutil.c 
-Wp,-MD,.deps/mpiutil.TPlo -o mpiutil.o >/dev/null 2>&1
mv -f .libs/mpiutil.lo mpiutil.lo
gcc -E -I../src -DHAVE_CONFIG_H -DPIC `test -f 'mpih-add1.S' || echo 
'./'`mpih-add1.S | grep -v '^#' > __mpih-add1.s
gcc  -g -O2 -Wall  -c __mpih-add1.s
__mpih-add1.s:1:Unknown pseudo-op: .toc
__mpih-add1.s:2:Unknown pseudo-op: .extern
__mpih-add1.s:2:Rest of line ignored. 1st junk character valued 95 (_).
__mpih-add1.s:3:Unknown pseudo-op: .extern
__mpih-add1.s:3:Rest of line ignored. 1st junk character valued 46 (.).
__mpih-add1.s:4:Unknown pseudo-op: .csect
__mpih-add1.s:4:Rest of line ignored. 1st junk character valued 91 ([).
__mpih-add1.s:8:Unknown pseudo-op: .csect
__mpih-add1.s:8:Rest of line ignored. 1st junk character valued 95 (_).
__mpih-add1.s:10:Rest of line ignored. 1st junk character valued 91 ([).
__mpih-add1.s:11:Unknown pseudo-op: .csect
__mpih-add1.s:11:Rest of line ignored. 1st junk character valued 91 ([).
__mpih-add1.s:13:Parameter syntax error (parameter 2)
__mpih-add1.s:14:Parameter syntax error (parameter 1)
__mpih-add1.s:15:Parameter syntax error (parameter 1)
__mpih-add1.s:16:Parameter syntax error (parameter 1)

etc. etc.

I am running Mac OS X 10.2.6 with gcc 3.1.

Thanks,
Fred