Re: [squid-users] Re: Re: Re: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Sun, 22 Dec 2013 20:40:37 +0200

OK so summary:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise

$ uname -a
Linux storeid 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14
16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ ./squid -v
Squid Cache: Version 3.4.1
configure options: --enable-ltdl-convenience

$ ps aux |grep squid
eliezer 1419 0.0 0.1 26416 1612 ? Ss 20:24 0:00 ./squid
eliezer 1421 0.1 0.9 31404 9264 ? S 20:24 0:00 (squid-1)
eliezer 1422 0.0 0.0 4316 352 ? S 20:24 0:00
(logfile-daemon) /usr/local/squid/var/logs/access.log
eliezer 1426 0.0 0.0 9364 612 pts/0 S+ 20:24 0:00 grep
--color=auto squid

eliezer_at_storeid:/usr/local/squid/sbin$ tail ../var/logs/access.log -f
1387736915.750 221 192.168.10.100 TCP_MISS/301 636 GET
http://help.ubuntu.com/community/CheckingYourUbuntuVersion -
HIER_DIRECT/91.189.89.122 text/html
1387736936.723 20880 192.168.10.100 TCP_MISS/200 1023 CONNECT
help.ubuntu.com:443 - HIER_DIRECT/91.189.89.122 -

And for now the conclusion is that "build-essential" virtual package is
needed for basic squid compilation.

If there are specific flags that prevents squid from being compiled it's
another story..

What commands do you use to build squid?
it's a bit weird all this rm at the beginning of the build...

First try to build squid from sources in the basic way of squid while
using "build-essential" virtual package.(configure with no options at all!!)
Then add *manually* the debian configure flags.
Only and Only then see what happens..

Thanks,
Eliezer

On 22/12/13 19:58, Brian J. Murrell wrote:
> On Sun, 2013-12-22 at 18:46 +0200, Eliezer Croitoru wrote:
>> Hey there,
>
> Hi,
>
>> The exact case is that squid will not be compiled on ubuntu 12.04?
>
> Yes.
>
>> What is the problem again?
>
> The error message is below, but also in the URL linked below.
>
>> We need a full OS details
>
> Up-to-date Ubuntu LTS 12.04
>
>> full hardware details and configure options.
>
> X86_64
>
> Full build output from dpkg-buildpackage including configure options and
> output, etc. can be found here:
>
> http://brian.interlinx.bc.ca/squid_build_error
>
>> I would be happy to run a test here to make sure what the problem is and
>
> Thanks!
>
> b.
>
>> On 22/12/13 16:55, Brian J. Murrell wrote:
>>> Interesting. I wonder if we can be more surgical and figure out which
>>> one(s) are causing the problems? I suppose I can start though by
>>> removing them all and seeing if that is my problem also.
>>>
>>> Sadly, removing all CFLAGS/CXXFLAGS options done at configure time
>>> didn't help:
>>>
>>> make[4]: Entering directory `/usr/src/squid-3.4.1/helpers/basic_auth/LDAP'
>>> g++ -DHAVE_CONFIG_H -I../../.. -I../../../include -I../../../lib -I../../../src -I../../../include -I/usr/include -I/usr/include/libxml2 -D_FORTIFY_SOURCE=2 -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -m64 -march=native -std=c++0x -c -o basic_ldap_auth.o basic_ldap_auth.cc
>>> /bin/bash ../../../libtool --tag=CXX --mode=link g++ -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -m64 -march=native -std=c++0x -m64 -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -o basic_ldap_auth basic_ldap_auth.o ../../../lib/libmiscencoding.la -L../../../compat -lcompat-squid -lldap -llber
>>> libtool: link: g++ -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -m64 -march=native -std=c++0x -m64 -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -o basic_ldap_auth basic_ldap_auth.o ../../../lib/.libs/libmiscencoding.a -L/usr/src/squid-3.4.1/compat -lcompat-squid -lldap -llber
>>> /usr/bin/ld.bfd.real: basic_ldap_auth.o: relocation R_X86_64_32 against `ber_pvt_opt_on' can not be used when making a shared object; recompile with -fPIC
>>> basic_ldap_auth.o: could not read symbols: Bad value
>>> collect2: ld returned 1 exit status
>>>
>>> I do notice at the end of the configure it reports:
>>>
>>> configure: Multi-Language support enabled: yes
>>> configure: BUILD LIBRARIES:
>>> configure: BUILD EXTRA LIBRARIES: -lm -lnsl -lresolv -lrt -ldl -ldl
>>> configure: BUILD OBJECTS:
>>> configure: BUILD EXTRA OBJECTS:
>>> configure: BUILD C FLAGS: -m64 -Wall
>>> configure: BUILD EXTRA C FLAGS: -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments -Wshadow -Werror -pipe -D_REENTRANT
>>> configure: BUILD C++ FLAGS: -m64 -march=native -std=c++0x
>>> configure: BUILD EXTRA C++ FLAGS: -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT
>>>
>>> Those must be flags that configure has decided to add.
>>>
>>> Cheers,
>>> b.
>>
>>
>
>
Received on Sun Dec 22 2013 - 18:40:59 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 23 2013 - 12:00:06 MST