cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Statically linked curl under Solaris ?

From: Manuel VACELET <manuel.vacelet_at_st.com>
Date: Mon, 05 Jul 2004 09:33:26 +0200

Daniel Stenberg wrote:
>> There is no problems under Linux but I face many problems under
>> solaris. I get many errors when compiling 'ldap.c' file (undefine
>> reference to dl_open).
>
>
> Compile errors (the function is called dlopen())? Then your dl headers
> (flgcn.h) seems to be wrong. I have no problems with this on my Solaris
> box.

I disabled ldap but I got some links errors with curl link :
gcc -g -O2 -o curl main.o hugehelp.o urlglob.o writeout.o writeenv.o
getpass.o homedir.o strtoofft.o -static -L/local/vm16/s8/lib
../lib/.libs/libcurl.a -lssl -lcrypto -lsocket -lnsl -lz
/usr/lib/libnsl.a(netdir.o): In function `load_xlate':
netdir.o(.text+0xe30): undefined reference to `dlopen'
netdir.o(.text+0xe64): undefined reference to `dlsym'
netdir.o(.text+0xe98): undefined reference to `dlsym'
netdir.o(.text+0xecc): undefined reference to `dlsym'
netdir.o(.text+0xf00): undefined reference to `dlsym'
netdir.o(.text+0xf34): undefined reference to `dlsym'
netdir.o(.text+0xfd8): undefined reference to `dlclose'
/usr/lib/libnsl.a(netdir.o): In function `netdir_sperror':
netdir.o(.text+0x1188): undefined reference to `dlerror'
/usr/lib/libc.a(nss_deffinder.o): In function `SO_per_src_lookup':
nss_deffinder.o(.text+0x88): undefined reference to `_dlopen'
nss_deffinder.o(.text+0xb8): undefined reference to `_dlsym'
nss_deffinder.o(.text+0xcc): undefined reference to `_dlclose'
/usr/lib/libc.a(nss_deffinder.o): In function `SO_per_src_delete':
nss_deffinder.o(.text+0x104): undefined reference to `_dlclose'
collect2: ld returned 1 exit status

(Note: I patched Makefiles to add -static in LDFLAGS because
--enable-static doesn't build static curl executable but static libraries)

-- 
# VACELET Manuel        manuel.vacelet(at)st(dot)com #
# STMicroelectronics  - Central R&D DAIS             #
# 850, rue Jean Monet - 38926 CROLLES CEDEX - FRANCE #
Received on 2004-07-05