[squid-dev] squid-3.5.6 -- debug missing? and a few others?
Amos Jeffries
squid3 at treenet.co.nz
Tue Aug 11 02:20:12 UTC 2015
Hi Linda W,
I see "ltrans0" in your debug trace. Is this the issue you mentioned
in squid-users earlier and followed up by saying was fixed?
On 11/08/2015 10:04 a.m., Linda A. Walsh wrote:
> I hope this is the right place to send Q's on building squid --
> it seems like it's a source issue and not a squid configuration
> issue. BTW, just for clarity. I also tried turning off all
> of the compiler optimization options and just using
> "CFLAGS="-O2 -m64 -march=native -fpie -pipe" -- but that made
> no difference. If I should send this to the user list, let me
> know... all forward it there, but it doesn't seem the Q's on there
> have so much to do with build issues.
CFLAGS is only used by some third-party libraries.
Squid-3 uses CXXFLAGS.
Link issues can be related to --disable-inline and -O usage. Usually
appearing at lower levels of inline optimization.
>
> Sorry to bother you guys, but am having problems building squid unless I
> disable all 'auth' (then it builds)... At this point -- I get a couple
> of errors:
>
> I can see where there are references and a definition in
> compat/debug.{h,cc}. Looks like something pulled in the
> compat/debug.h header, but the compat/debug.cc module isn't getting
> bound in.. (and of course there are symbols missing
> as well. This look like it is creating a library (libtool) --
> wouldn't that imply all the symbols do not have to be present, as it
> isn't a final link?
No this is the libtool compiler using g++ to do final linkage for the
basic_ldap_auth helper. The filename after the "-o" in the line.
>
> What am I missing?
>
> options to configure:
>
> --prefix=/ --bindir=/usr/sbin --datadir=/usr/share/squid
> --datarootdir=/usr/share --libexecdir=/usr/sbin
> --sharedstatedir=/var/squid --sysconfdir=/etc/squid --enable-build-info
--enable-build-info requires a string parameter which will be embeded in
the squid -v output. Helping you identify who built it or any special
patching done.
> --enable-cachemgr-hostname
--enable-cachemgr-hostname requires a string parameter for the FQDN the
cachemgr.cgi will attempt to connect to by default.
> --enable-disk-io
--enable-disk-io requires a list of the Disk I/O modules to be built.
Absence of any module names means synchronous Blocking I/O will be used
by Squid. (VERY slow Squid)
> --enable-eui --enable-htcp
> --enable-icmp --enable-kill-parent-hack --enable-linux-netfilter
> --enable-ltdl-install
--enable-ltdl-install may affect your system provided LTDL library. That
is probably not a good thing as all other LTDL programs are using it.
Squid bundles with the latest LTDL from Debian.
> --enable-referer-log
referer-log is no longer a Squid build option. If you need, it is now a
built-in logformat.
> --enable-removal-policies=lru
> --enable-heap --enable-stacktraces --enable-auth-basic
> --enable-auth-negotiate --enable-auth-ntml
--enable-auth-* without parameters is the default. It means all
available helpers will be auto-detected and used if their dependencies
are present. I dont see digest listed here, which means its on.
So all these --enable-auth-* options are equivalent to the simpler
--enable-auth
> --enable-external-acl-helpers
> --enable-storeio
--enable-storeio requires a list of the cache_dir modules to be built.
Absence of any module names means only UFS will be usable by Squid.
> --enable-useragent-log
useragent-log is no longer a Squid build option. If you need, it is now
a built-in logformat.
> --enable-xmalloc-statistics
> --enable-x-accelerator-vary
x-accelerator-vary is VERY rarely necessary. HTTP/1.1 now supports the
Vary: header as part of HTTP protocol.
> --enable-zph-qos --enable-wccp
> --enable-wccpv2 --disable-ecap --disable-icap-client
> --disable-storeid_rewrite
--disable-storeid-rewrite (note the _ / - change).
> --disable-static
Mumble. Probably not a good idea unless you know very well how static vs
dynamic library linking works. Particularly in relation to the LTDL
situation.
> --disable-auto-locale
> --disable-ident-lookups --disable-ipv6 --disable-snmp
> --disable-translation --disable-static
duplicate --disable-static
> --with-aufs-threads=72
> --with-logdir=/var/log/squid --with-mandir=/usr/share/man
> --with-pidfile=/run/squid.pid --with-default-user=squid
> --with-large-files --with-included-ltdl
--with-included-ltdl see above about --disable-static and
--enable-ltdl-install.
> --with-openssl
>
I dont see anywhere on this list:
--disable-inline to prevent inline optimizations
--disable-optimizations to prevent compiler -O levels
--disable-arch-native to prevent -march=native auto-detection
You said you disabled them ?
>
> libtool: link: g++ -Wall -Wpointer-arith -Wwrite-strings -Wcomments
> -Wshadow -Werror -pipe -D_REENTRANT -m64 -DOPENSSL_LOAD_CONF
> -I/usr/include/p11-kit-1 -O2 -m64 -fasynchronous-unwind-tables
> -fbranch-target-load-optimize -fdelete-null-pointer-checks
> -fgcse-after-reload -fgcse-las -fgcse-sm -fgraphite-identity
> -finline-functions -fipa-pta -fivopts -floop-block -floop-flatten
> -floop-interchange -floop-strip-mine -flto -fmessage-length=0
> -fpredictive-commoning -frename-registers -freorder-blocks-and-partition
> -ftracer -fsched-stalled-insns=1 -fsched-stalled-insns-dep=1
> -ftree-loop-linear -ftree-loop-distribution
> -ftree-loop-distribute-patterns -ftree-loop-im -ftree-loop-ivcanon
> -ftree-vectorize -ftree-slp-vectorize -funswitch-loops -funwind-tables
> -fvariable-expansion-in-unroller -fvect-cost-model -fweb -fwhole-program
> -march=native -fpie -pipe -march=native -std=c++11 -m64 -flto=6 -fpie
> -fuse-linker-plugin -o basic_ldap_auth basic_ldap_auth.o
> ../../../lib/.libs/libmiscencoding.a
> ../../../compat/.libs/libcompat-squid.a -lldap -llber
> /tmp/ccfruVCQ.ltrans0.ltrans.o: In function `checkLDAP(ldap*, char
> const*, char const*, char const*, int)':
> ccfruVCQ.ltrans0.o:(.text+0x30d): undefined reference to `debug_enabled'
> ccfruVCQ.ltrans0.o:(.text+0x469): undefined reference to `debug_enabled'
> ccfruVCQ.ltrans0.o:(.text+0x5ea): undefined reference to `debug_enabled'
> ccfruVCQ.ltrans0.o:(.text+0x69d): undefined reference to `debug_enabled'
> ccfruVCQ.ltrans0.o:(.text+0x7c0): undefined reference to `debug_enabled'
> /tmp/ccfruVCQ.ltrans0.ltrans.o:ccfruVCQ.ltrans0.o:(.text+0x8fc): more
> undefined references to `debug_enabled' follow
> /tmp/ccfruVCQ.ltrans0.ltrans.o: In function `main':
> ccfruVCQ.ltrans0.o:(.text.startup+0x14a): undefined reference to `xstrdup'
> ccfruVCQ.ltrans0.o:(.text.startup+0x1e0): undefined reference to
> `debug_enabled'
> ccfruVCQ.ltrans0.o:(.text.startup+0x9e4): undefined reference to `xstrdup'
> ccfruVCQ.ltrans0.o:(.text.startup+0xa28): undefined reference to `xstrdup'
> ../../../lib/.libs/libmiscencoding.a(rfc1738.o): In function `xfree':
> rfc1738.c:(.text+0x1b): undefined reference to `free_const'
> ../../../lib/.libs/libmiscencoding.a(rfc1738.o): In function
> `rfc1738_do_escape':
> rfc1738.c:(.text+0xa2): undefined reference to `xcalloc'
> collect2: error: ld returned 1 exit status
All of these missing symbols are provided by the libcompat-squid library
in the Squid compat/ directory.
The ltrans thing seems to be just a temporary file used by the compiler
toolchain during the build.
If you are building in side /tmp it is a bad idea. The system requires
that it or any operating program can erase things in there without
notice at any time it wants more space. You should create another
directory somewhere else to build in.
For example my test builds go something like this:
gunzip squid-3.5.6.tar.gz &&
tar -xvf squid-3.5.6.tar &&
mkdir squid-3.5.6/_build &&
cd squid-3.5.6/_build &&
../configure ...blah blah blah... &&
make check && make install
If none of the above helps, then
what OS are you building on?
with what GCC / autoconf / automake / libtool / ltdl versions ?
Amos
More information about the squid-dev
mailing list