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

Hi: I cannot seem to get Net-SSLeay-1.25 to compile on a Solaris machine. Everytime I run 'make test', the following error always rears its ugly head:

Can't load 'blib/arch/auto/Net/SSLeay/SSLeay.so' for module Net::SSLeay:
ld.so.1: /usr/local/bin/perl: fatal: relocation error: file blib/arch/auto/Net/SSLeay/SSLeay.so: symbol RAND_egd_bytes: referenced symbol not found
at /usr/local/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200.
at test.pl line 25 Compilation failed in require at test.pl line 25. BEGIN failed--compilation aborted at test.pl line 25. *** Error code 255 make: Fatal error: Command failed for target `test_dynamic'

Here is the output of perl -V on the machine I am trying to compile on: Summary of my perl5 (revision 5.0 version 6 subversion 0)
configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos sic64078 5.8 generic_108528-03 sun4u sparc
sunw,ultra-60 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef
uselongdouble=undef
usesocks=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags=''
ccflags =' -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'

stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8,
d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=4, nvtype='double',
nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/opt/SUNWspro/SC5.0/lib '
libpth=/opt/SUNWspro/SC5.0/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec
libc=/lib/libc.so, so=so, useshrplib=false,
libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags=' '
cccdlflags='-KPIC', lddlflags='-G -L/opt/SUNWspro/SC5.0/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under solaris
Compiled at Apr 2 2001 15:53:58
%ENV:
PERL5LIB="/ford/thishost/u/msmithso/perlib"
@INC:
/ford/thishost/u/msmithso/perlib/sun4-solaris
/ford/thishost/u/msmithso/perlib
/usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl

BTW: I am compiling this module using gcc ver. 3.3.2, not the default (and clunky) C compiler that comes with Solaris.

  • Comment on Problems Compiling Net::SSLeay 1.25 on Solaris

Replies are listed 'Best First'.
Re: Problems Compiling Net::SSLeay 1.25 on Solaris
by Corion (Patriarch) on Jan 31, 2005 at 22:15 UTC
    cc='cc'
    BTW: I am compiling this module using gcc ver. 3.3.2, not the default (and clunky) C compiler that comes with Solaris.

    Here start your problems - your Perl was created with the Sun Solaris C compiler, and you're trying to compile extensions with gcc for it. That will not work - at least the library paths compiled into Perl are for Suns C compiler and not for your gcc, and the two compilers are not binary compatible. I suggest you use Suns compiler, or if that is impossible, recompile Perl using gcc and then try again with your extension.

    The error itself seems to be that the gcc extension cannot find symbols in the libeay dynamic library, which might be a problem of not having set up LD_LIBRARY_PATH or be a problem of gcc against Suns cc.