develooper Front page | perl.perl5.porters | Postings from February 2003

[perl #20758] DynaLoader not compiled PI on Solaris/GCC

Thread Next
Jean-Marc Tanzi
February 6, 2003 10:03
[perl #20758] DynaLoader not compiled PI on Solaris/GCC
Message ID:
# New Ticket Created by  Jean-Marc Tanzi 
# Please include the string:  [perl #20758]
# in the subject line of all future correspondence about this issue. 
# <URL: >


this problem appears on the following configuration (at least):

Perl:                         5.6.1 and 5.8.0
System:                       Solaris 2.8
Compilers:              gcc 2.95.3
Specific Configure option:    --Duseshrplib


  trying to link the shared library (in my case, to enable
PL/Perl support in PostgreSQL database) results in the following messages:

   Text relocation remains                       referenced
       against symbol                  offset      in file
   Perl_free_tmps                      0x104
   ......<lots of similar lines removed>....
   ld: fatal: relocations remain against allocatable but non-writable
   collect2: ld returned 1 exit status
   make: *** [] Error 1


    The .../perl-5.8.0/ext/DynaLoaderDynaLoader.c file is not compiled with
   the -fPIC option, and so the DynaLoader.a lib contains some position
   dependent code that the linker refuses to include in another shared

Possible fix (let's say bad hack, was actually too lazy to track the
generation of the Makefile in ext/DynaLoader, sorry):

      - rename .../perl-5.8.0/ext/DynaLoader/dl_dlopen.xs to
      - start make
      - when compil. stops with error (dl_dlopen.xs not found):
      - rename dl_dlopen.xs back
      - modify .../perl-5.8.0/ext/DynaLoader/Makefile so CCFLAGS includes
      - restart make

It worked for me at least...

 Best regards,

     Jean-Marc Tanzi

Amadeus ADP - Erding         Tel: +49 8122 43 5095               Fax: +49 8122 43 3470

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About