Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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 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...

Comment on ModPerl not happy with libperl.a
Select or Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://886781]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-10-24 23:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (138 votes), past polls