[squid-users] Problem compiling squid from sources

From: Jose-Marcio Martins da Cruz <Jose-Marcio.Martins_at_mines-paristech.fr>
Date: Mon, 28 Nov 2011 16:35:25 +0100

Hello,

I'm trying to compile squid from sources. OS is solaris. I didn't succeeded with Sun C, and I'm
using now gcc 3.4.6.

The problem is with openssl 1.0.0e.

Someone posted about this kind of problems, but the mine one seems not to be the same.

It seems to me that this is a bug.

Compiling stops with the following error :

libtool: link: rm -f .libs/squid.nm .libs/squid.nmS .libs/squid.nmT
libtool: link: (cd .libs && gcc -Usparc -Uunix -Ui386 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-Wall -g -c -fno-builtin "squidS.c")
libtool: link: rm -f ".libs/squidS.c" ".libs/squid.nm" ".libs/squid.nmS" ".libs/squid.nmT"
libtool: link: g++ -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -D_REENTRANT -pthreads
-Usparc -Uunix -Ui386 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 .libs/squidS.o -g -o squid
AclRegs.o AuthReg.o access_log.o AsyncEngine.o cache_cf.o ProtoPort.o CacheDigest.o cache_manager.o
carp.o cbdata.o ChunkedCodingParser.o client_db.o client_side.o client_side_reply.o
client_side_request.o BodyPipe.o clientStream.o CompletionDispatcher.o comm_select.o
comm_select_win32.o comm_poll.o comm_devpoll.o comm_epoll.o comm_kqueue.o ConfigOption.o
ConfigParser.o debug.o delay_pools.o DelayId.o DelayBucket.o DelayConfig.o DelayPool.o DelaySpec.o
DelayTagged.o DelayUser.o DelayVector.o NullDelayId.o disk.o DiskIO/DiskIOModule.o
DiskIO/ReadRequest.o DiskIO/WriteRequest.o dlink.o dns_internal.o DnsLookupDetails.o errorpage.o
ETag.o event.o EventLoop.o external_acl.o ExternalACLEntry.o fd.o fde.o filemap.o forward.o
fqdncache.o ftp.o gopher.o helper.o htcp.o http.o HttpStatusLine.o HttpHdrCc.o HttpHdrRange.o
HttpHdrSc.o HttpHdrScTarget.o HttpHdrContRange.o HttpHeader.o HttpHeaderTools.o HttpBody.o HttpMsg.o
HttpReply.o HttpRequest.o HttpRequestMethod.o icp_v2.o icp_v3.o int.o internal.o ipc.o ipcache.o
list.o logfile.o main.o mem.o mem_node.o MemBuf.o MemObject.o mime.o mime_header.o multicast.o
neighbors.o Packer.o Parsing.o pconn.o peer_digest.o peer_select.o peer_sourcehash.o peer_userhash.o
redirect.o referer.o refresh.o RemovalPolicy.o send-announce.o snmp_core.o snmp_agent.o SquidMath.o
SquidNew.o ssl_support.o stat.o StatHist.o String.o stmem.o store.o StoreFileSystem.o store_io.o
StoreIOState.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 StoreMeta.o StoreMetaMD5.o StoreMetaSTD.o
StoreMetaSTDLFS.o StoreMetaUnpacker.o StoreMetaURL.o StoreMetaVary.o StoreSwapLogData.o Server.o
SwapDir.o time.o tools.o tunnel.o unlinkd.o url.o URLScheme.o urn.o useragent.o wccp.o wccp2.o
whois.o wordlist.o LoadableModule.o LoadableModules.o DiskIO/DiskIOModules_gen.o repl_modules.o
globals.o string_arrays.o DiskIO/AIO/AIODiskIOModule.o DiskIO/Blocking/BlockingDiskIOModule.o
DiskIO/DiskDaemon/DiskDaemonDiskIOModule.o DiskIO/DiskThreads/DiskThreadsDiskIOModule.o
/export/home/martins/sources/squid/squid-3.1.16/libltdl/./.libs/dlopen.a base/.libs/libbase.a
-L/data/export/home/martins/sources/gcc/obj-3.4.6/i386-pc-solaris2.10/libstdc++-v3/src
-L/data/export/home/martins/sources/gcc/obj-3.4.6/i386-pc-solaris2.10/libstdc++-v3/src/.libs
-L/data/export/home/martins/sources/gcc/obj-3.4.6/gcc ./.libs/libsquid.a auth/.libs/libacls.a
ident/.libs/libident.a acl/.libs/libacls.a acl/.libs/libstate.a auth/.libs/libauth.a
acl/.libs/libapi.a ip/.libs/libip.a fs/.libs/libfs.a icmp/.libs/libicmp.a icmp/.libs/libicmp-core.a
../compat/.libs/libcompat.a -L/export/home/martins/sources/squid/squid-3.1.16/lib repl/liblru.a
libAIO.a libBlocking.a libDiskDaemon.a libDiskThreads.a -lrt -lpthread -lcrypt -lmd5
../snmplib/libsnmp.a -L/usr/local/ssl/lib -lssl -lcrypto ssl/.libs/libsslutil.a
ssl/.libs/libsslsquid.a -lmiscutil -lm -lmalloc -lsocket -lresolv -lnsl ../libltdl/.libs/libltdlc.a
-pthreads
Undefined first referenced
  symbol in file
X509_set_notAfter ssl/.libs/libsslutil.a(gadgets.o)
X509_set_pubkey ssl/.libs/libsslutil.a(gadgets.o)
X509_set_issuer_name ssl/.libs/libsslutil.a(gadgets.o)
X509_set_subject_name ssl/.libs/libsslutil.a(gadgets.o)
ld: fatal: Symbol referencing errors. No output written to squid

Notice the following above :

   -L/usr/local/ssl/lib -lssl -lcrypto

Well, this functions are defined in libcrypto.a. So they are there.

The solution I found, and which worked for me, was to change the order of SSLLIB and SSL_LIBS at
src/Makefile.in :

194 - squid/squid-3.1.16 > diff -u src/Makefile.in.org src/Makefile.in
--- src/Makefile.in.org Thu Oct 13 10:35:44 2011
+++ src/Makefile.in Mon Nov 28 16:21:10 2011
@@ -1892,7 +1892,7 @@
         ../compat/libcompat.la -L../lib $(XTRA_OBJS) $(DISK_LINKOBJS) \
         $(REPL_OBJS) $(DISK_LIBS) $(DISK_OS_LIBS) $(CRYPTLIB) \
         $(REGEXLIB) $(SNMPLIB) ${ADAPTATION_LIBS} $(ESI_LIBS) \
- $(SSLLIB) $(SSL_LIBS) -lmiscutil $(EPOLL_LIBS) $(MINGW_LIBS) \
+ $(SSL_LIBS) $(SSLLIB) -lmiscutil $(EPOLL_LIBS) $(MINGW_LIBS) \
         $(XTRA_LIBS) $(am__append_6)
  squid_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \
         $(DISK_LIBS) \
195 - squid/squid-3.1.16 >

Now, the compilation continues, but stops far away when building helpers. It doesn't find sasl2. But
I'll dig a little more before asking for help again.

Thanks.
Received on Mon Nov 28 2011 - 15:35:37 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 28 2011 - 12:00:02 MST