Ticket #87 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Perl and -fPIC

Reported by: jciccone Assigned to: clfs-commits@lists.cross-lfs.org.
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

08/20/06 21:13:45 changed by jciccone

  • status changed from new to closed.
  • resolution set to fixed.

Added in r2368.

09/06/06 13:11:55 changed by ryan@linuxfromscratch.org

  • status changed from closed to reopened.
  • resolution deleted.

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

09/06/06 19:08:38 changed by jciccone

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

09/07/06 14:13:47 changed by ryan@linuxfromscratch.org

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

09/08/06 17:23:47 changed by jim

  • status changed from reopened to closed.
  • resolution set to fixed.

Fixed with Ryan's sed.