Re: Bug in Makefile.shlib

From: Olivier PRENANT <ohp(at)pyrenet(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Larry Rosenman <ler(at)lerctr(dot)org>, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in Makefile.shlib
Date: 2002-09-04 21:59:20
Message-ID: Pine.UW2.4.21.0209042356560.22926-100000@server
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tom,

Thanks fr your reply.. Not sure I understood!
I've tried your hack with no luck. Further more, README in
perl/ext/Dynaloader says it has to be static to be effective.

What concerns me more is that with same perl (5.6.1) it compiles ok with
722.

Regards
On Wed, 4 Sep 2002, Tom Lane wrote:

> Date: Wed, 04 Sep 2002 17:14:13 -0400
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> To: ohp(at)pyrenet(dot)fr
> Cc: Larry Rosenman <ler(at)lerctr(dot)org>,
> pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
> Subject: Re: [HACKERS] Bug in Makefile.shlib
>
> Olivier PRENANT <ohp(at)pyrenet(dot)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:
>
> make
> fix DynaLoader.o per below
> make test
> make 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
>

--
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-04 22:05:40 Re: fix for palloc() of user-supplied length
Previous Message Sean Chittenden 2002-09-04 21:53:18 Schemas not available for pl/pgsql %TYPE....