Re: Bug in Makefile.shlib - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug in Makefile.shlib
Date
Msg-id 9192.1031174053@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug in Makefile.shlib  (Olivier PRENANT <ohp@pyrenet.fr>)
Responses Re: Bug in Makefile.shlib  (Olivier PRENANT <ohp@pyrenet.fr>)
List pgsql-hackers
Olivier PRENANT <ohp@pyrenet.fr> writes:
> The problem is that at link time, ld complains about text segment beeing
> written to in Dynaloader.
> I agree this sounded stupid. But I can't think of something else.
> This is with perl-5.6.1 FWIW

Ah.  This is a bug in Perl's build process: even if you request a shared
library, it builds DynaLoader as static code.  My own notes about
installing perl 5.6.1 on HPUX read:
makefix DynaLoader.o per belowmake testmake install

At least in 5.6.1, even with "build shared" request, DynaLoader.o is not
made with +z, which will cause plperl to fail.  To fix, simply go into
perl-5.6.1/ext/DynaLoader, rm DynaLoader.o, and "make".  I wonder why
toplevel makefile thinks it's okay to build DynaLoader static??


I'm just now in the middle of installing Perl 5.8.0, and it seems that
the oversight has been fixed; DynaLoader is now built sharable:

cc -c   -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DDEBUGGING -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64-g   -DVERSION=\"1.04\" -DXS_VERSION=\"1.04\" +Z "-I../.."  -DPERL_CORE -DLIBC="/lib/libc.sl"
DynaLoader.c

There seem to be some other problems --- 7.2 plperl dumps core for me
even with the above fix.  Still looking into that (I'm sorta hoping that
5.8.0 will fix it, but won't know for a little while...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Olivier PRENANT
Date:
Subject: Re: Bug in Makefile.shlib
Next
From: Scott Shattuck
Date:
Subject: locking of referenced table during constraint construction