Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

ModPerl not happy with libperl.a

by RachunZero (Novice)
on Feb 07, 2011 at 19:18 UTC ( #886781=perlquestion: print w/replies, xml ) Need Help??
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 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.


Actually my compile just finished and libperl.a still doesn't have a GOT, but by adding the -fPIC flag to my perl compile, 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
    I had to compile 64 bit application using gcc on solaris 10 , I was able to sucessfully do it using -fPIC flag option. Thank you very much -Narasimha

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://886781]
Approved by ww
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2017-06-27 11:07 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (604 votes). Check out past polls.