Mailing List Archive

libgcrypt on Mac OS X
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
Re: libgcrypt on Mac OS X [ In reply to ]
On Wednesday, Jul 23, 2003, at 15:13 US/Pacific, Fred wrote:
> Has anyone successfully build libgcrypt on Mac OS X?

Yes. ./configure --disable-asm, as you note. I paid no attention to
multiply defined symbols -- perhaps I'm reckless, but I've seen them in
other libraries and lived to tell the tale.

I've attached a fink .info file to this message; if you like, place it
in /sw/fink/dists/local/main/finkinfo and run 'fink build libgcrypt1'
and 'fink install libgcrypt1'. I believe it is fink policy compliant,
but some mirrors might not be listed properly (curl seems to have
trouble with sunsite.dk). If you try this, please let me know if it
works for you (off-list is fine).

A mac (ppc?) build of 1.1.12 does fail a test in tests/basic, but it's
a problem with the test that was fixed in cvs in april, not with the
library code.

Do any of you gcrypt developers mind if I clean this up and submit
gcrypt for inclusion in fink (fink.sf.net)?

thanks,
-neil
Re: libgcrypt on Mac OS X [ In reply to ]
On Thu, 24 Jul 2003 02:17:50 -0700, Neil Spring said:

> Do any of you gcrypt developers mind if I clean this up and submit
> gcrypt for inclusion in fink (fink.sf.net)?

No. However, it might be a good idea to wait for the next release due
to all the API changes we did. This way Mac developers don't get used
to the old API.


Salam-Shalom,

Werner

--
Werner Koch <wk@gnupg.org>
The GnuPG Experts http://g10code.com
Free Software Foundation Europe http://fsfeurope.org
Re: libgcrypt on Mac OS X [ In reply to ]
Thanks for the help Neil,

Neil Spring wrote:
> On Wednesday, Jul 23, 2003, at 15:13 US/Pacific, Fred wrote:
>
>> Has anyone successfully build libgcrypt on Mac OS X?
>
> Yes. ./configure --disable-asm, as you note. I paid no attention to
> multiply defined symbols -- perhaps I'm reckless, but I've seen them
> in other libraries and lived to tell the tale.

My multiply-defined symbols were leading up to the following error:

/usr/lib/gcc/darwin/3.1/libgcc.a(_clz.o) private external definition of
___clz_tab in section (__TEXT,__const)
make[2]: *** [libgcrypt.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

However, I was testing libgcrypt-1.1.11, 1.1.12 works like you decribe
:) [1]

Unfortunately, I need libgcrypt as a Apple framework, not a fink
library, so I won't be in a position to test libgcrypt with any code
ATM. Good luck with getting it into fink though!

Fred

[1] The GNU webpage still points to 1.1.11