Re: Problems with ssl acceleration on 2.5.PRE

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 18 Feb 2002 16:46:49 +0100

This apparently depends somehow on how the openssl library is built,
or maybe what version of dynamic linking the host is using..

Robert: Do you have any clue on how to write a test to check if a
library requires another library? (-lcrypto requiring -ldl in this
case)

We could also solve the issue by just before the XTRA_LIBS cleanup is
done, add LIBDL to the front of SSL_LIBS if SSL_LIBS is not empty.

Regards
Henrik

On Monday 18 February 2002 06.29, Peter Robinson wrote:
> Hi All,
>
> Been having problems compiling squid with ssl acceleration on
> Redhat 6.2. I was having problems on 7.2 as well but seem to have
> fixed these. I've now worked out the problem with 6.2 and hence are
> submitting this bug report (but I'm not sure of the best way to fix
> it) with compiler output at them bottom of the message.
>
> When it compiles the squid binary and tries to link in the
> ssl/crypto stuff in fails with the undefined reference to
> dlclose/dlopen/dlsym functions. The reason this is happening is
> because it needs to use the -ldl (dynamic loader library) compiler
> option. If I manually compile the line after it fails and add the
> -ldl compiler option into the line it compiles just fine. The line
> compiles fine in 7.2 without this option (not sure why) but is
> needed in 6.2. The Makefile makes mention of this option with the
> DLLIB=-ldl line but doesn't appear to use it. From what I've read
> on the openssl lists this problem appears with openssl versions
> 0.9.6b and later (I'm using both 0.9.6b/c). There is mention of
> this problem on the openssl-users mailing list here
> http://www.mail-archive.com/openssl-users@openssl.org/msg23323.html
>
> Unfortunately I'm just learning about the wonders of autoconf and
> make and aren't sure the best way fix this so any pointers to good
> doco (and a patch for my current problem) would be much appreciated
> so I can get on to my next problem.
>
> Regards
> Peter
>
> gcc -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/etc/squid/squid.conf\"
> -I. -I. -I../include -I. -I. -I../include -I../include -g -O2
> -Wall -D_REENTRANT -c `test -f auth_modules.c || echo
> './'`auth_modules.c
> source='store_modules.c' object='store_modules.o' libtool=no \
> depfile='.deps/store_modules.Po'
> tmpdepfile='.deps/store_modules.TPo' \ depmode=gcc /bin/sh
> ../cfgaux/depcomp \
> gcc -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/etc/squid/squid.conf\"
> -I. -I. -I../include -I. -I. -I../include -I../include -g -O2
> -Wall -D_REENTRANT -c `test -f store_modules.c || echo
> './'`store_modules.c
> gcc -g -O2 -Wall -D_REENTRANT -g -o squid access_log.o acl.o
> asn.o authenticate.o cache_cf.o CacheDigest.o cache_manager.o
> carp.o cbdata.o client_db.o client_side.o comm.o comm_select.o
> debug.o delay_pools.o disk.o dns_internal.o errorpage.o ETag.o
> event.o fd.o filemap.o forward.o fqdncache.o ftp.o gopher.o
> helper.o htcp.o http.o HttpStatusLine.o HttpHdrCc.o HttpHdrRange.o
> HttpHdrContRange.o HttpHeader.o HttpHeaderTools.o HttpBody.o
> HttpMsg.o HttpReply.o HttpRequest.o icmp.o icp_v2.o icp_v3.o
> ident.o internal.o ipc.o ipcache.o logfile.o main.o mem.o
> MemPool.o MemBuf.o mime.o multicast.o neighbors.o net_db.o Packer.o
> pconn.o peer_digest.o peer_select.o redirect.o referer.o refresh.o
> send-announce.o snmp_core.o snmp_agent.o ssl.o ssl_support.o stat.o
> StatHist.o String.o stmem.o store.o store_io.o store_client.o
> store_digest.o store_dir.o store_key_md5.o store_log.o
> store_rebuild.o store_swapin.o store_swapmeta.o store_swapout.o
> tools.o unlinkd.o url.o urn.o useragent.o wais.o wccp.o whois.o
> repl_modules.o auth_modules.o store_modules.o globals.o
> string_arrays.o -L../lib repl/libheap.a repl/liblru.a fs/libaufs.a
> fs/libdiskd.a fs/libufs.a
> auth/libbasic.a -lcrypt -lpthread -L../snmplib -lsnmp -lssl
> -lcrypto -lmiscu til -lm -lresolv -lbsd -lnsl
> /usr/bin/../lib/libcrypto.so: undefined reference to `dlclose'
> /usr/bin/../lib/libcrypto.so: undefined reference to `dlopen'
> /usr/bin/../lib/libcrypto.so: undefined reference to `dlsym'
> collect2: ld returned 1 exit status
> make[3]: *** [squid] Error 1
> make[3]: Leaving directory
> `/usr/src/redhat/BUILD/squid-2.5.PRE3/src' make[2]: ***
> [all-recursive] Error 1
> make[2]: Leaving directory
> `/usr/src/redhat/BUILD/squid-2.5.PRE3/src' make[1]: *** [all] Error
> 2
> make[1]: Leaving directory
> `/usr/src/redhat/BUILD/squid-2.5.PRE3/src' make: ***
> [all-recursive] Error 1
>
> --------------------------------------------------------------
> Peter Robinson Senior Consultant
> Open Systems Support peterr@opensystems.net.au
> 97 Broadway, Nedlands WA 6009
> Ph (08) 92848777 Fax (08) 93869833
Received on Mon Feb 18 2002 - 08:46:13 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:48 MST