curl-users
Re: [PATCH] Correct linking for curl
Date: Thu, 23 Oct 2008 17:53:53 +0200
Le mercredi 22 octobre 2008, à 15h50, « Dan Fandrich » a écrit :
> On Wed, Oct 22, 2008 at 11:00:43PM +0200, Beber wrote:
> > Compile architecture : gentoo-linux 2.6 x86_64-pc-linux-gnu
> > destination architecture : linux 2.6 i686-pc-linux-gnu
> 
> Are you building from the curl source tar ball or from an ebuild?  Gentoo 
> includes a patch that messes with the LDFLAGS, so it would be nice to
> eliminate that as a source of the problem.
> 
> > i686-pc-linux-gnu-gcc -I/usr/n270/include -I/usr/n270/usr/include -o .libs/curl main.o hugehelp.o urlglob.o writeout.o writeenv.o getpass.o homedir.o curlutil.o strtoofft.o strdup.o  -L/usr/n270/lib -L/usr/n270/usr/lib ../lib/.libs/libcurl.so -lz 
> > /usr/libexec/gcc/i686-pc-linux-gnu/ld: warning: libssl.so.0.9.8, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
> > /usr/libexec/gcc/i686-pc-linux-gnu/ld: warning: libcrypto.so.0.9.8, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)
> > ../lib/.libs/libcurl.so: undefined reference to `SSL_connect'
> > ../lib/.libs/libcurl.so: undefined reference to `TLSv1_client_method'
> > ../lib/.libs/libcurl.so: undefined reference to `DES_set_odd_parity'
> > ../lib/.libs/libcurl.so: undefined reference to `ENGINE_get_next'
> > <snip>
> 
> What does the dependency_libs line say in the lib/libcurl.la file?  Are all
> those dependent libraries available on your system?  libtool should
> be adding any necessary libs on its own when necessary, but on an ELF
> system, there shouldn't be a need for more. libtool uses very similar gcc
> command-line when linking on my x86 system and it works fine.
dependency_libs=' -L/usr/n270/lib -L/usr/n270/usr/lib -lssl -lcrypto -lrt -lz'
Ok, it's all right, and I have libssl in toolchain
397575  212 -rw-r--r--   1 root     root       216484 Oct 22 00:46 /usr/n270/usr/lib/nss/libssl.a
262003  312 -r-xr-xr-x   1 root     root       315444 Oct 21 23:20 /usr/n270/usr/lib/libssl.so.0.9.8
262005    0 lrwxrwxrwx   1 root     root           15 Oct 21 23:20 /usr/n270/usr/lib/libssl.so -> libssl.so.0.9.8
262771    4 -rw-r--r--   1 root     root          255 Oct 21 23:20 /usr/n270/usr/lib/pkgconfig/libssl.pc
275939  448 -rw-r--r--   1 root     root       458482 Oct 21 23:20 /usr/n270/usr/lib/libssl.a
Same for lz, lcrypto. But as you can see, libtool don't call
i686-pc-linux-gnu-gcc with -lssl -lcrypt as Makefile don't have them too.
-- Beber ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2008-10-23