Perl 5.8.2 problems (was Re: how to build Spamassassin)

Tony Jones tony at tonyjones.com
Wed Dec 10 20:32:18 PST 2003


> Install Perl 5.8.2 from ports (or source)

I did this (/usr/ports/lang/perl5.8).

Made fine, but grokked during 'make install':

/bin/mkdir -p /usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils
install -c -o root -g wheel -m 444  /usr/ports/lang/perl5.8/work/BSDPAN-5.8.0/ExtUtils/MM_Unix.pm /usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils/MM_Unix.pm
/bin/mkdir -p /usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils
install -c -o root -g wheel -m 444  /usr/ports/lang/perl5.8/work/BSDPAN-5.8.0/ExtUtils/Packlist.pm /usr/local/perl/lib/perl5/5.8.2/BSDPAN/ExtUtils/Packlist.pm
/usr/libexec/ld-elf.so.1: /usr/local/perl/bin/perl: Undefined symbol "PL_exit_flags"
*** Error code 1

At this point, /usr/local/perl/bin/perl is installed (above error is some later
foo) but any attempt to run /usr/local/perl/bin/perl gets the same error from
the dynamic loader -- but I am trying it as root (see later).

Found a post from 'tom at www.paniert.net' to freebsd.ports (on 11/12) with the
same problem (he was on 4.8,  I'm on 4.9) but no answer.

Looks like PL_exit_flags is defined in the BSS segment of 
{/usr/local/perl}/lib/perl5/5.8.2/mach/CORE/libperl.so.

But this seems too deep a path for addition to LD_LIBRARY_PATH.

Looking back through the build logs, I could see places where commands were
run with LD_LIBRARY_PATH prepended with /usr/ports/lang/perl5.8/work/perl-5.8.2
to pick up a copy of libperl.so in that directory but not in the case where
the make failed.   So, I prepended the path to LD_LIBRARY_PATH in the
parent environment and reran make.  This solved the problem and make install
completed.

But now I get this, which is baffling me a bit:

$ /usr/local/perl/bin/perl -v
This is perl, v5.8.2 built for i386-freebsd
Copyright 1987-2003, Larry Wall
[snip]

$ su
Password:
# /usr/local/perl/bin/perl -v
/usr/libexec/ld-elf.so.1: /usr/local/perl/bin/perl: Undefined symbol "PL_exit_flags"
# exit 
$ script
Script started, output file is typescript
$ /usr/local/perl/bin/perl -v
/usr/libexec/ld-elf.so.1: /usr/local/perl/bin/perl: Undefined symbol "PL_exit_flags"
$ ^D
Script done, output file is typescript
$ ksh
$ /usr/local/perl/bin/perl -v
This is perl, v5.8.2 built for i386-freebsd
Copyright 1987-2003, Larry Wall
[snip]
$ ^D

Something is getting screwed up in the su and pty/script cases, as "su -" works
fine as does starting a subshell (.kshrc).

LD_LIBRARY_PATH is in the environment in all cases (=/usr/lib).

Anyone got any ideas.  It's probably something obvious but it isn't dawning
on me. Yes, I have rebooted post installing perl.  This is all 4.9 FreeBSD.

thanks!

Tony



More information about the freebsd-questions mailing list