3.0: linker error with --disable-optimizations and --enable-esi

From: Thomas-Martin Seck <tmseck-lists_at_netcologne.de>
Date: Sat, 24 Jan 2009 21:19:42 +0100

Hi,

I noticed that squid-3 does not seem to like --enable-esi in conjunction
with --disable-optimizations. A build where both options are defined
fails as follows; builds where either option is defined work.

(This is 3.0.STABLE12 on FreeBSD 7, first observed on amd64 by the
FreeBSD ports committer, reproducible on a physically different machine
on i386 by me. Compiler is FreeBSD's gcc-4.2.1 system compiler. Other
versions of FreeBSD were not tested. libxml2 is located in
/usr/local/lib/.)

Build environment:

$ make -DWITH_SQUID_DEBUG -DWITH_SQUID_ESI -VCONFIGURE_ENV -VCONFIGURE_ARGS
CFLAGS="-pipe -I/usr/local/include -I/usr/local/include/libxml2 -g" CPPFLAGS="" LDFLAGS=" -L/usr/local/lib" SHELL=/bin/sh CONFIG_SHELL=/bin/sh lt_cv_sys_max_cmd_len=262144
--with-default-user=squid --bindir=/usr/local/sbin --sbindir=/usr/local/sbin --datadir=/usr/local/etc/squid --libexecdir=/usr/local/libexec/squid --localstatedir=/usr/local/squid --sysconfdir=/usr/local/etc/squid --enable-removal-policies="lru heap" --disable-linux-netfilter --disable-linux-tproxy --disable-epoll --enable-auth="basic digest negotiate ntlm" --enable-basic-auth-helpers="DB NCSA PAM MSNT SMB squid_radius_auth YP" --enable-digest-auth-helpers="password" --enable-external-acl-helpers="ip_user session unix_group wbinfo_group" --enable-ntlm-auth-helpers="SMB" --enable-negotiate-auth-helpers="squid_kerb_auth" --enable-storeio="ufs diskd null" --enable-esi --enable-kqueue --disable-optimizations --enable-err-languages="Armenian Azerbaijani Bulgarian Catalan Czech Danish Dutch English Estonian Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Lithuanian Polish Portuguese Romanian Russian-1251 Russian-koi8-r Serbian Simplify_Chinese Slovak Spanish Swedish Traditional_Chinese Turkish Ukrainian-1251 Ukrainian-koi8-u Ukrainian-utf8" --enable-default-err-language=templates --prefix=/usr/local

Extract from build transcript (complete transcript available upon
request):

[...]

depbase=`echo ESI.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESI.o -MD -MP -MF "$depbase.Tpo" -c -o ESI.o ESI.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESIAssign.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESIAssign.o -MD -MP -MF "$depbase.Tpo" -c -o ESIAssign.o ESIAssign.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESIContext.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESIContext.o -MD -MP -MF "$depbase.Tpo" -c -o ESIContext.o ESIContext.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESICustomParser.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESICustomParser.o -MD -MP -MF "$depbase.Tpo" -c -o ESICustomParser.o ESICustomParser.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESIExpatParser.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESIExpatParser.o -MD -MP -MF "$depbase.Tpo" -c -o ESIExpatParser.o ESIExpatParser.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESIExpression.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESIExpression.o -MD -MP -MF "$depbase.Tpo" -c -o ESIExpression.o ESIExpression.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESIInclude.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESIInclude.o -MD -MP -MF "$depbase.Tpo" -c -o ESIInclude.o ESIInclude.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESILibxml2Parser.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESILibxml2Parser.o -MD -MP -MF "$depbase.Tpo" -c -o ESILibxml2Parser.o ESILibxml2Parser.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESIParser.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESIParser.o -MD -MP -MF "$depbase.Tpo" -c -o ESIParser.o ESIParser.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESISegment.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESISegment.o -MD -MP -MF "$depbase.Tpo" -c -o ESISegment.o ESISegment.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESISequence.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESISequence.o -MD -MP -MF "$depbase.Tpo" -c -o ESISequence.o ESISequence.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ESIVarState.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ESIVarState.o -MD -MP -MF "$depbase.Tpo" -c -o ESIVarState.o ESIVarState.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
depbase=`echo ETag.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; if c++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/etc/squid/squid.conf\" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -MT ETag.o -MD -MP -MF "$depbase.Tpo" -c -o ETag.o ETag.cc; then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi

[...]

/bin/sh ../libtool --tag=CXX --mode=link c++ -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -L/usr/local/lib -o ufsdump debug.o int.o mem.o store_key_md5.o StoreMeta.o StoreMetaMD5.o StoreMetaSTD.o StoreMetaSTDLFS.o StoreMetaUnpacker.o StoreMetaURL.o StoreMetaVary.o String.o time.o ufsdump.o url.o AsyncCall.o BodyPipe.o ConfigParser.o store.o StoreFileSystem.o StoreSwapLogData.o access_log.o acl.o acl_noncore.o ACLChecklist.o ACLProxyAuth.o ACLUserData.o ACLRegexData.o ACLStringData.o authenticate.o cache_cf.o cache_manager.o CacheDigest.o carp.o cbdata.o client_db.o client_side.o client_side_reply.o client_side_request.o clientStream.o comm_select.o comm_select_win32.o comm_poll.o comm_epoll.o comm_kqueue.o ConfigOption.o disk.o dns_internal.o errorpage.o ESI.o ESIAssign.o ESIContext.o ESICustomParser.o ESIExpatParser.o ESIExpression.o ESIInclude.o ESILibxml2Parser.o ESIParser.o ESISegment.o ESISequence.o ESIVarState.o ETag.o event.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 icmp.o icp_v2.o icp_v3.o ACLIdent.o ident.o internal.o ipc.o ipcache.o list.o logfile.o mem_node.o MemBuf.o MemObject.o mime.o multicast.o neighbors.o net_db.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 tunnel.o Server.o SquidNew.o stat.o StatHist.o stmem.o store_io.o StoreIOState.o store_client.o store_digest.o store_dir.o store_log.o store_rebuild.o store_swapin.o store_swapmeta.o store_swapout.o SwapDir.o tools.o unlinkd.o URLScheme.o urn.o useragent.o wccp.o wccp2.o whois.o wordlist.o repl_modules.o globals.o string_arrays.o libsquid.la libauth.la -L../lib repl/liblru.a repl/libheap.a fs/libufs.a fs/libnull.a auth/libbasic.a auth/libdigest.a auth/libnegotiate.a auth/libntlm.a -lcrypt ../snmplib/libsnmp.a -lmiscutil -lexpat -lxml2 -lm
c++ -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -pipe -I/usr/local/include -I/usr/local/include/libxml2 -g -o ufsdump debug.o int.o mem.o store_key_md5.o StoreMeta.o StoreMetaMD5.o StoreMetaSTD.o StoreMetaSTDLFS.o StoreMetaUnpacker.o StoreMetaURL.o StoreMetaVary.o String.o time.o ufsdump.o url.o AsyncCall.o BodyPipe.o ConfigParser.o store.o StoreFileSystem.o StoreSwapLogData.o access_log.o acl.o acl_noncore.o ACLChecklist.o ACLProxyAuth.o ACLUserData.o ACLRegexData.o ACLStringData.o authenticate.o cache_cf.o cache_manager.o CacheDigest.o carp.o cbdata.o client_db.o client_side.o client_side_reply.o client_side_request.o clientStream.o comm_select.o comm_select_win32.o comm_poll.o comm_epoll.o comm_kqueue.o ConfigOption.o disk.o dns_internal.o errorpage.o ESI.o ESIAssign.o ESIContext.o ESICustomParser.o ESIExpatParser.o ESIExpression.o ESIInclude.o ESILibxml2Parser.o ESIParser.o ESISegment.o ESISequence.o ESIVarState.o ETag.o event.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 icmp.o icp_v2.o icp_v3.o ACLIdent.o ident.o internal.o ipc.o ipcache.o list.o logfile.o mem_node.o MemBuf.o MemObject.o mime.o multicast.o neighbors.o net_db.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 tunnel.o Server.o SquidNew.o stat.o StatHist.o stmem.o store_io.o StoreIOState.o store_client.o store_digest.o store_dir.o store_log.o store_rebuild.o store_swapin.o store_swapmeta.o store_swapout.o SwapDir.o tools.o unlinkd.o URLScheme.o urn.o useragent.o wccp.o wccp2.o whois.o wordlist.o repl_modules.o globals.o string_arrays.o -L/usr/local/lib ./.libs/libsquid.a ./.libs/libauth.a -L/var/tmp/ports/usr/ports/experimental/squid30/work/squid-3.0.STABLE12/lib repl/liblru.a repl/libheap.a fs/libufs.a fs/libnull.a auth/libbasic.a auth/libdigest.a auth/libnegotiate.a auth/libntlm.a -lcrypt ../snmplib/libsnmp.a -lmiscutil /usr/local/lib/libexpat.so /usr/local/lib/libxml2.so -lz /usr/local/lib/libiconv.so -lm -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
ESICustomParser.o(.text+0xa07): In function `ESICustomParser::findTag(char const*, unsigned int)':
/var/tmp/ports/usr/ports/experimental/squid30/work/squid-3.0.STABLE12/src/ESICustomParser.cc:86: undefined reference to `Trie::findPrefix(char const*, unsigned int)'
*** Error code 1

Regards,

-- 
Thomas-Martin Seck
Received on Sat Jan 24 2009 - 20:53:07 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 27 2009 - 12:00:05 MST