Opened 17 years ago

Closed 17 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:


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.

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

Change History (5)

comment:1 Changed 17 years ago by Joe Ciccone

Resolution: fixed
Status: newclosed

Added in r2368.

comment:2 Changed 17 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" \

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

comment:3 Changed 17 years ago by Joe Ciccone

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

comment:4 Changed 17 years ago by ryan@…

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

comment:5 Changed 17 years ago by Jim Gifford

Resolution: fixed
Status: reopenedclosed

Fixed with Ryan's sed.

Note: See TracTickets for help on using tickets.