RachunZero has asked for the wisdom of the Perl Monks concerning the following question:
I've been meditating unsuccessfully on a perplexing problem oh wise ones. When I try to compile modperl.so against 5.12.2 libperl.a, I get a PIC error:
ld: fatal: relocation error: R_SPARC_H44: file /dsk01/apache/app/build +2064/perl-5.12.2/lib/5.12.2/sun4-solaris-thread-multi-64/CORE/libperl +.a(op.o): symbol <unknown>: relocations based on the ABS44 coding mod +el can not be used in building a shared object
When I check libperl.a using elfdump, it has no GOT.
My compiler is sparc-sun-solaris2.10-gcc (GCC) 4.3.3 (20091210) (gccfss)
My perl is built as:
CC="gcc -m64 -mcpu=niagara2 -O3 -R${GCCRT_DIR}/lib/sparcv9 -L${GCCRT_D +IR}/lib/sparcv9 -R/usr/sfw/lib/64 -L/usr/sfw/lib/64" sh Configure -d -Dcc="${CC}" -Dprefix=${PERL_DIR} -Dusethreads
Most of the links I can find on this problem relate it to the Solaris compiler cc option -xcode, but I'm using gcc. I assumed that meant I needed to add the -fPIC option to gcc; however, that did not create a GOT either.
Addendum:
Actually my compile just finished and libperl.a still doesn't have a GOT, but by adding the -fPIC flag to my perl compile, mod_perl.so was able to link. I'm now thoroughly confused...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: ModPerl not happy with libperl.a
by Anonymous Monk on Feb 07, 2013 at 00:39 UTC |