Ineffectual has asked for the wisdom of the Perl Monks concerning the following question:

Greetings all, I installed perl and all appears to be fine until one of my scripts tries to use POSIX and gets the following error:
Can't load '/tools/lib/perl5/5.8.9/x86_64-linux//auto/Fcntl/Fcntl.so' + for module Fcntl: /tools/lib/perl5/5.8.9/x86_64-linux//auto/Fcntl/Fc +ntl.so: undefined symbol: PL_sv_undef at /tools/lib/perl5/5.8.9/x86_6 +4-linux//XSLoader.pm line 70. BEGIN failed--compilation aborted at /tools/lib/perl5/5.8.9/x86_64-lin +ux//Fcntl.pm line 216. Compilation failed in require at /tools/lib/perl5/5.8.9/x86_64-linux// +POSIX.pm line 21. BEGIN failed--compilation aborted at /tools/lib/perl5/5.8.9/x86_64-lin +ux//POSIX.pm line 21. Compilation failed in require at /tools/lib/perl5/site_perl/5.8.9//Bio +/Root/IO.pm line 106.
The offending piece of code in Bio::Root::IO is: use POSIX qw(dup);

Since trying to re-install any of those leads to perl try to recompile itself, what did I compile wrong? This is perl 5.8.9 on an x86 linux machine (2.4.21-58.EL). I built without threads using cc 3.2.3 with dynamic loading and a shared libperl.so. I accepted fast stdio.

The other SoPW node that contains information talks about POLLUTE=1, but I don't know where to set that (and the docs seem to indicate that it's set to 1 by default now).

I edited the Fcntl.xs to have the #define statement from there and reran configure.
update: This failed. The module refused to compile.

Make has the following info:
CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -pipe -I/usr/local/include -I/tools/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  -std=c89 -O2  -Wall -ansi -pedantic -W -Wdeclaration-after-statement -DPERL_GCC_PEDANTIC

Replies are listed 'Best First'.
Re: Error compiling perl? PL_sv_undef error with POSIX
by Anonymous Monk on Jul 29, 2009 at 21:07 UTC