#1 Can't build on Solaris

v1.0 (example)
open
nobody
None
5
2005-11-01
2005-11-01
Eric
No

Session looks like:

bash-3.00# make
cp Bignum.pm blib/lib/Crypt/OpenSSL/Bignum.pm
cp Bignum/CTX.pm blib/lib/Crypt/OpenSSL/Bignum/CTX.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.8.7/ExtUtils/xsubpp -
typemap /usr/local/lib/perl5/5.8.7/ExtUtils/typemap -typemap
typemap Bignum.xs > Bignum.xsc && mv Bignum.xsc Bignum.c
gcc -c -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64 -O -DVERSION=\"0.03\" -
DXS_VERSION=\"0.03\" -fPIC "-I/usr/local/lib/perl5/5.8.7/i86pc-
solaris/CORE" -DPERL5 Bignum.c
Running Mkbootstrap for Crypt::OpenSSL::Bignum ()
chmod 644 Bignum.bs
rm -f blib/arch/auto/Crypt/OpenSSL/Bignum/Bignum.so
LD_RUN_PATH="" gcc -G -L/usr/local/lib Bignum.o -o blib/arch/
auto/Crypt/OpenSSL/Bignum/Bignum.so
chmod 755 blib/arch/auto/Crypt/OpenSSL/Bignum/Bignum.so
cp Bignum.bs blib/arch/auto/Crypt/OpenSSL/Bignum/Bignum.bs
chmod 644 blib/arch/auto/Crypt/OpenSSL/Bignum/Bignum.bs
Manifying blib/man3/Crypt::OpenSSL::Bignum::CTX.3
Manifying blib/man3/Crypt::OpenSSL::Bignum.3
bash-3.00# make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-Iblib/lib" "-Iblib/arch"
test.pl
1..52
# Running under perl version 5.008007 for solaris
# Current time local: Tue Nov 1 11:30:47 2005
# Current time GMT: Tue Nov 1 19:30:47 2005
# Using Test.pm version 1.25
Can't load 'blib/arch/auto/Crypt/OpenSSL/Bignum/Bignum.so' for
module Crypt::OpenSSL::Bignum: ld.so.1: /usr/local/bin/perl: fatal:
relocation error: file blib/arch/auto/Crypt/OpenSSL/Bignum/
Bignum.so: symbol BN_clear_free: referenced symbol not found
at /usr/local/lib/perl5/5.8.7/i86pc-solaris/DynaLoader.pm line 230.
at test.pl line 10
Compilation failed in require at test.pl line 10.
BEGIN failed--compilation aborted at test.pl line 10.
make: *** [test_dynamic] Error 2
bash-3.00# ls -l blib/arch/auto/Crypt/OpenSSL/Bignum/
.exists Bignum.bs Bignum.so
bash-3.00# ls -l blib/arch/auto/Crypt/OpenSSL/Bignum/Bignum.so
-rwxr-xr-x 1 root mpl 33540 Nov 1 11:30 blib/arch/auto/
Crypt/OpenSSL/Bignum/Bignum.so

Discussion

  • Eric
    Eric
    2005-11-01

    Logged In: YES
    user_id=822688

    Found problem. On Solaris, you need to specify to the linker that it must
    link to libssl.so. By adding -lssl the make test succeeded.