[rrd-users] Relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object
johan.segers at ext.ec.europa.eu
johan.segers at ext.ec.europa.eu
Tue Sep 28 08:33:31 CEST 2010
Joshua,
So, you did not use the Perl modules coming with the Red Hat Linux OS. You just downloaded them from perl.org and compiled yourself. Do I need the whole perl suite of just a part of it ?
Rgds,
Johan
________________________________
From: jkeroes at gmail.com [mailto:jkeroes at gmail.com] On Behalf Of Joshua Keroes
Sent: Monday, September 27, 2010 8:12 PM
To: SEGERS Johan (OLAF-EXT)
Cc: rrd-users at lists.oetiker.ch
Subject: Re: [rrd-users] Relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object
I had to rebuild Perl with those flags; that's what let all the dependent src tarballs (e.g. net-snmp, rrdtool) build. Furthermore, I didn't have to do anything fancy with the dependent tarballs; they built without anything tricky.
Good luck,
Joshua
On Mon, Sep 27, 2010 at 1:26 AM, <johan.segers at ext.ec.europa.eu> wrote:
Hi Joshua,
I have tried to run sh configure --enable-shared CXXFLAGS=-fPIC CFLAGS=-fPIC CPPFLAGS=-fPIC but that did not help....
These are the Perl .rpm that are on my BB-server:
perl-Compress-Zlib-1.42-1.fc6
perl-5.8.8-27.el5
perl-URI-1.35-3
perl-HTML-Tagset-3.10-2.1.1
perl-DBI-1.52-2.el5
perl-Convert-ASN1-0.20-1.1
newt-perl-1.08-9.2.2
perl-HTML-Parser-3.55-1.fc6
perl-BSD-Resource-1.28-1.fc6.1
mod_perl-2.0.4-6.el5
perl-libwww-perl-5.805-1.1.1
perl-String-CRC32-1.4-2.fc6
Any other idea ?
I have no idea how I can solve this problem ....
Rgds,
Johan
________________________________
From: jkeroes at gmail.com [mailto:jkeroes at gmail.com] On Behalf Of Joshua Keroes
Sent: Thursday, September 23, 2010 7:11 PM
To: SEGERS Johan (OLAF-EXT)
Cc: rrd-users at lists.oetiker.ch
Subject: Re: [rrd-users] Relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object
I solved a suspiciously similar problem yesterday trying to build net-snmp-5.5 against perl-5.12.2. Both were built from source on a 64bit CentOS VM using physical Opteron 8300's. The net-snmp-5.5 compile was breaking during 'make' complaining of -fPIC issues, too.
I rebuilt net-snmp-5.5 a dozen times with different strategies - all failed. I finally resolved the compile problem by rebuilding Perl with an explicit -fPIC. This might get you running:
CFLAGS='-m64 -mtune=nocona' ./Configure -des -A ccflags=-fPIC && make && make test && make install
Given your reference to X86_64_32, you might not want the -m64 flag. Anyway, adjust or delete CFLAGS depending on your CPU's and architecture.
After Perl was built, the net-snmp-5.5 compile ran smoothly without any fancy args.
Good luck,
Joshua
On Thu, Sep 23, 2010 at 7:17 AM, Johans <johan.segers at ext.ec.europa.eu> wrote:
I am migrating my BB with LARRD/RRDTOOL 1.0.49 from 32-bit Red hat Linux 3 to
a virtual Red Hat 5.4 64-bit.
BB is installed and works bit I get the following problem when I try to
compile/link the RRDTOOL.
I run:
1. sh configure --enable-shared -> OK
2. make -> I get the message below even after changing in the Makefile the
CCFLAGS .. -fPIC and CXXFLAGS= ..-fPIC (see in red)
The essential line below is : relocation R_X86_64_32 against `a local
symbol' can not be used when making a shared object; recompile with -fPIC
Changes made to Makefile:
CFLAGS = -g -O2 -fPIC -Wall -pedantic -Ws ….
CXXFLAGS = -g -O2 -fPIC
Has anyone an idea how to solve this problem ?
Rgds,
Johan
make[3]: Entering directory `/usr/local/rrdtool-1.0.49/perl-shared'
gcc -c -I.. -I../src -I../gd1.3 -D_REENTRANT -D_GNU_SOURCE
-fno-strict-aliasing -pipe -Wdeclaration-after-statement
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -DHAVE_CONFIG_H -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.000491\"
-DXS_VERSION=\"1.000491\" -fPIC
"-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"
-DPERLPATCHLEVEL=8 RRDs.c
In file included from ../src/rrd_tool.h:24,
from RRDs.xs:13:
../config.h:191:1: warning: "VERSION" redefined
<command line>:1:1: warning: this is the location of the previous definition
RRDs.c: In function âXS_RRDs_xportâ:
RRDs.c:302: warning: unused variable âtargâ
RRDs.c:301: warning: unused variable âRETVALâ
RRDs.xs:227: warning: unused variable ârow_cntâ
Running Mkbootstrap for RRDs ()
chmod 644 RRDs.bs
rm -f blib/arch/auto/RRDs/RRDs.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic RRDs.o
-L../src/.libs/ -lrrd_private -lm -o blib/arch/auto/RRDs/RRDs.so \
\
/usr/bin/ld: ../src/.libs//librrd_private.a(parsetime.o): relocation
R_X86_64_32 against `a local symbol' can not be used when making a shared
object; recompile with -fPIC
../src/.libs//librrd_private.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [blib/arch/auto/RRDs/RRDs.so] Error 1
make[3]: Leaving directory `/usr/local/rrdtool-1.0.49/perl-shared'
make[2]: *** [perl_shared] Error 2
make[2]: Leaving directory `/usr/local/rrdtool-1.0.49'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/rrdtool-1.0.49'
make: *** [all] Error 2
--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Relocation-R-X86-64-32-against-a-local-symbol-can-not-be-used-when-making-a-shared-object-tp5563232p5563232.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
_______________________________________________
rrd-users mailing list
rrd-users at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20100928/7744d662/attachment-0001.htm
More information about the rrd-users
mailing list