Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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
choroba waves in
Corion has to work on his mood today.
[Corion]: I have to write at least one not so nice mail, give a stern word to some colleagues who took changes into production without getting approval and actually get some work done...
[choroba]: too busy to work on my mood :-(

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2017-03-29 07:27 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (344 votes). Check out past polls.