Skip to content
Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions

Q9401

Question

On BSDI 4.0, Exim built with Perl support exits with the error message

./exim: can't load library 'libperl.so'

Answer

You probably compiled perl5 yourself, without looking into

/usr/src/contrib/perl5/perl5.004_02/hints/bsdos.sh

first. The problem is that the command

perl5 -MExtUtils::Embed -e ldopts

doesn't give you sufficient flags to link something with libperl. Since 5.004_02 the hints/bsdos.sh file has changed to adapt to the changes between BSDI 3.1 and 4.0, but it is still not entirely right. The solution is, when you compile perl, change the ccdlflags variable in config.sh to:

-rdynamic -Wl,-rpath,/usr/local/lib/perl5/5.00502/i386-bsdos/CORE

(or something similar). Alternatively, you can run ./Configure and answering the question Any special flags to pass to cc to use dynamic loading? with the above line. It is not known what -rdynamic means (it's not apparently documented in any man page), but that's what BSDI guys did to compile perl5 which comes with BSDI 4.0 distribution.


Clone this wiki locally