Opened 13 years ago

Closed 13 years ago

#87 closed defect (fixed)

Perl and -fPIC

Reported by: Joe Ciccone Owned by: clfs-commits@…
Priority: critical Milestone: CLFS Standard 1.0.0
Component: BOOK Version: CLFS Standard 1.0.0
Keywords: perl fPIC DynaLoader Cc:

Description

Programs like xchat and gaim can't build their perl plugins (as shared libraries) because the DynaLoader?.a library provided by perl is not linked with -fPIC.

This patch makes it so that the objects in DynaLoader?.a are built with -fPIC. http://cross-lfs.org/~jciccone/perl-5.8.8-fPIC-1.patch

I'd like to see this go into the book before RC4.

Change History (5)

comment:1 Changed 13 years ago by Joe Ciccone

Resolution: fixed
Status: newclosed

Added in r2368.

comment:2 Changed 13 years ago by ryan@…

Resolution: fixed
Status: closedreopened

From backscrolling through IRC, saw issues...

This fix was in the cross-lfs scripts for getting perl to build properly with -fPIC

# if not creating a shared libperl (ie useshrplib not true), still use pic
sed -i -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \
       -e "s@static_target='static'@static_target='static_pic'@g" \
   Makefile.SH

Should properly fix the issue (at least it did between perl 5.8.5, 5.8.6 ...)

comment:3 Changed 13 years ago by Joe Ciccone

Adding -Duseshrplib will do the same as you thought and build a libperl.so. I'd rather use -Duseshrplib instead of the sed.

comment:4 Changed 13 years ago by ryan@…

sed works regardless of shared or static build, always. Note perl advisories concerning use of shared perl.

comment:5 Changed 13 years ago by Jim Gifford

Resolution: fixed
Status: reopenedclosed

Fixed with Ryan's sed.

Note: See TracTickets for help on using tickets.