Thread: plperl doesn't build in CVS tip?

plperl doesn't build in CVS tip?

From
Tom Lane
Date:
On a RHL 8.0 box, I'm getting this:

gcc -O2 -g -fpic -I. -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE -I../../../src/include   -c -o plperl.o
plperl.c
In file included from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/op.h:480,                from
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h:2209,               from plperl.c:61:
 
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/reentr.h:602: field `_crypt_struct' has incomplete type
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/reentr.h:747: confused by earlier errors, bailing out
make: *** [plperl.o] Error 1

Is anyone else seeing the same?  I'm confused because I'm quite sure
it built there recently.  I suspect one of the recent changes to our
configure stuff broke it, but I don't see the connection offhand.

A little bit of digging suggests that this Perl include file will
compile as-is if and only if _GNU_SOURCE is #define'd (that's the only
way to get <crypt.h> to define the needed struct).  Now Perl's config.h
does define that symbol --- but far too late, because it has to have
been defined the *first* time <features.h> is read, or it won't have any
effect.  So I don't see right now how this could ever have worked.
But it did, and not too long ago.  Any ideas?
        regards, tom lane


Re: plperl doesn't build in CVS tip?

From
Tom Lane
Date:
I said:
> Is anyone else seeing the same?  I'm confused because I'm quite sure
> it built there recently.  I suspect one of the recent changes to our
> configure stuff broke it, but I don't see the connection offhand.

The answer is that it was broken by the recent change to c.h to include
pg_config_os.h later than it had been --- much too late, in fact.  If
you want to muck with _GNU_SOURCE you have to set it before any system
headers are included.

I have reverted that change.  If you need some Windows-specific stuff at
the later spot in the file, please add it without risking breaking
other ports.
        regards, tom lane