relocation error: R_AMD64_PC32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




  Hello,

  I wanted to build 32 and 64 bit binaries of perl under OpenSolaris.
I am suing gcc that was configured as shown below:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i386-pc-solaris2.11/4.5.2/lto-wrapper
Target: i386-pc-solaris2.11
ÎÏÎÎ ÏÏÎÎÎÏÏÎÎ ÎÎ: ../gcc-4.5.2/configure --prefix=/usr
--program-suffix=-4.5.2 --infodir=/usr/share/info
--mandir=/usr/share/man --libexecdir=/usr/lib --enable-shared
--disable-static --disable-libtool-lock
--target= --enable-objc-gc --disable-libada --enable-libssp
--enable-languages=c,c++,fortran,objc,obj-c++
--enable-threads=posix --enable-tls=yes --with-system-zlib
--without-gnu-ld --with-ld=/usr/ccs/bin/ld
--with-gnu-as --with-as=/usr/sfw/bin/gas --with-gmp-lib=/usr/lib
--with-mpfr-lib=/usr/lib --enable-c99
--enable-nls --enable-wchar_t --enable-libstdcxx-allocator=mt
--with-pic --enable-multilib
ÎÎÎÏÎÎÎ ÎÎÎÎÏÏÎ: posix
gcc version 4.5.2 (GCC)

The 32bit was easy and works as it should. However, the 64bit does not
compile and it stops with the following error message:

./perl -f -Ilib pod/buildtoc --build-toc -q
Can't load 'lib/auto/re/re.so' for module re: ld.so.1: perl: fatal:
relocation error: R_AMD64_PC32:
file lib/auto/re/re.so: symbol main: value 0x28006b7dd34 does not fit
at lib/XSLoader.pm line 70.

I did a Google search and I had found out that this error message is
produced when the compile
tries to link position dependent code into a shared object. According
to the GCC manual one needs
to specify the -fPIC flag to ensure that position independent code is
produced. In my case, the perl
configuration script says that it will use this flag by default and it
is used yet it does not help. Also,
the -mimpure-text does not help when used when linking. So can anybody
suggest a way to deal
with this problem? Note that solstudio12.2 compiles perl with no
problem, but there are a number
of things that cannot be compiled with solstudio12.2.

Regards,
Apostolos




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux