[squid-dev] squid-3.5.7 -- xstrerror missing

Linda A. Walsh squid-user at tlinx.org
Tue Aug 11 22:58:50 UTC 2015


Amos Jeffries wrote:
> 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?
>   
----
Well, I thought it was --- I've been busy trying multiple things since
I wrote the original.


>
> 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.
>   
----
    A generic script I use to run configure's set CFLAGS and usually
CXXFLAGS=CFLAGS+ c++ specific flags ...

I'm not disabling inline that I know of. 
>
> 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.
>
>   
> --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.
>   
---
       Oh... in 'perl' and the kernel, the build options are included
automatically -- they don't trust a user-supplied string.  ;-)....


>
>   
>> --enable-cachemgr-hostname
>>     
>
> --enable-cachemgr-hostname requires a string parameter for the FQDN the
> cachemgr.cgi will attempt to connect to by default.
>   
----
    Again, thought that was filled in from the FQDN of the build host
(if not supplied), on assumption this would run on the buildhost....  I'll
just toss it as well...

>   
>> --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)
>   
-----
    I  think that is where I am stuck now... --- currently options look 
like:

array with=( 
            aufs-threads=$async_io_threads
            default-user=$user
            dl
            filedescriptors=2048
            gnu-ld
            logdir=/var/log/$pkg                   
            mandir=/usr/share/man        pidfile=/run/$pkg.pid
            large-files included-ltdl openssl    )   


array enable=(
            disk-io="DiskThreads,AIO,Blocking,IpcIo,Mmapped"
            eui htcp     icmp
            kill-parent-hack   
            linux-netfilter   
            ltdl-install     
            removal-policies="heap,lru"
            auth
            log-daemon-helpers="file"
            silent-rules
            stacktraces
            storeio="aufs,ufs"
            useragent-log wccp wccpv2
            xmalloc-statistics x-accelerator-vary zph-qos )


array disable=( ecap        icap-client        storeid_rewrite
            auth-basic auth-ntlm auth-negotiate auth-digest 
url-rewrite-helpers
            external-acl-helpers
            storeid-rewrite-helpers
            auto-locale ident-lookups ipv6     translation )

array  without=()
---------------------

As you can see I filled in the diskio --- I had it filled in on last
build -- but left it empty this time to try to see if any other modules 
built --
thinking that if I didn't specify the modules the default was to try to 
build
all of them.???  Seems that's a minor inconsistency in the build script?



>
>   
>> --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.
>   
----
    been using ltdl w/other builds, so by default, I throw it in here...

>
>   
>> --enable-referer-log
>>     
----
    Figured that one out --  I started with a build-script from a
few versions ago -- and have worked on updating that to the new options.

>
>   
>> --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.
>   
I think all of them are in the disable category (above), now...
> 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.
>   
--- just the opposite of auth...
I think some of these have changed defaults since I last built them --
i.e. thought most of them were to try to build any that it could. *sigh*...
>   
>> --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).
>   
----
must have caught that, don't see it in my ops now...

>   
>> --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.
>   
----
I "undisabled" it -- but in the past, static builds haven't been an option
on suse as they generally didn't provide the static libs...they are starting
to... so I re-enabled it..
>
>   
>> --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 ?  
>   
I did?....I don't think so...

>
>   
>> 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.
>   
--- yeah have seen them there,... not sure why they aren't building in.
> If you are building in side /tmp it is a bad idea.
----
Not building in tmp --- /home/tools/squid/squid-Version -- I think the
compiler was using tmp?

latest error is on xstrerr:
le'
  CXX      log_file_daemon.o
  CXXLD    log_file_daemon
/tmp/cc1skyFO.ltrans0.ltrans.o: In function `rotate':
/home/tools/squid/squid-3.5.7/helpers/log_daemon/file/log_file_daemon.cc:62: 
undefined reference to `xstrerr(int)'
/home/tools/squid/squid-3.5.7/helpers/log_daemon/file/log_file_daemon.cc:73: 
undefined reference to `xstrerr(int)'
/tmp/cc1skyFO.ltrans0.ltrans.o: In function `main':
/home/tools/squid/squid-3.5.7/helpers/log_daemon/file/log_file_daemon.cc:127: 
undefined reference to `xstrerr(int)'
collect2: error: ld returned 1 exit status
make[3]: *** [log_file_daemon] Error 1
make[3]: Leaving directory 
`/home/tools/squid/squid-3.5.7/helpers/log_daemon/file'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/home/tools/squid/squid-3.5.7/helpers/log_daemon'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tools/squid/squid-3.5.7/helpers'
make: *** [all-recursive] Error 1

which seems to be a wrapper for the strerror (convert errno to a string)
as some systems return NULL on a not-found error ... so why would
the logdaemon not bring in the compat options it needs?


> If none of the above helps, then
>  what OS are you building on?
>  with what GCC / autoconf / automake / libtool / ltdl versions ?
>   
----
    suse 13.1/2 (upgrading... )
gcc 4.9
autoconf (GNU Autoconf) 2.69
automake (GNU automake) 1.13.4
libtool in /usr/bin is 2.4.2, but one keeps appearing in the build dir.
(which is the same version...hmmm).

>  for f in /usr/lib64/libltdl*; do echo "$(rpm -qf "$f"): $f";done
libtool-2.4.2-15.2.2.x86_64: /usr/lib64/libltdl.a
libtool-2.4.2-15.2.2.x86_64: /usr/lib64/libltdl.la
libtool-2.4.2-15.2.2.x86_64: /usr/lib64/libltdl.so
libltdl3-1.5.26-27.1.2.x86_64: /usr/lib64/libltdl.so.3
libltdl3-1.5.26-27.1.2.x86_64: /usr/lib64/libltdl.so.3.1.6
libltdl7-2.4.2-15.2.2.x86_64: /usr/lib64/libltdl.so.7
libltdl7-2.4.2-15.2.2.x86_64: /usr/lib64/libltdl.so.7.3.0

---
looks like 2 versions are dl'd 3 and 7 -- had both of them on there
before, and in installing the rpms -- they don't conflict, so
I assumed the compilers chose one or the other based on something
I didn't know about.

So what should be pulling in the compat modules that I'm not getting
(was just about to put in a copy of the xstrerror from compat
into the disk module...)..... I try alot of non-standard things
sometimes to figure out problems (most don't work out, but it's
better than twiddling my thumbs -- usually)..;-)



thx,
linda
>   


More information about the squid-dev mailing list