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

Greetings Monks and Monkettes,
I have on many occasions installed Net::SSLeay on Solaris boxes and this includes Solaris 10. For reasons I don't understand I can't get it to work this time.

Here's the setup:
Operating SystemSolaris 10
Perl Version5.8.8
OpenSSL Version0.9.7b
gcc version3.3.2

The first indication that I see that somthing might be a tad wrong is when I run the Makefile.PL I see the following:

*** /usr/local/ssl/bin/openssl appears to be compiled with gcc (gcc -B +/usr/ccs/bin/ -DOPENSSL_SYSNAME_ULTRASPARC -DOPENSSL_THREADS -D_REENT +RANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DOPENSSL_NO_ASM -m +64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN ) while perl is compiled with gcc -B/usr/ccs/bin. Both must be compile +d with the same compiler and flags. Mixing and matching compilers is +not supported. at ./Makefile.PL line 137.
This didn't worry me too badly so I plunged on. I'm not sure what in the compiler string it sees that it don't like other than the fact they don't match 100% so I plunged on.

I ran the make and the only thing that struck me as odd there is:

gcc -B/usr/ccs/bin -G -L/usr/local/lib SSLeay.o -o blib/arch/auto/Ne +t/SSLeay/SSLeay.so \ -L/usr/local/ssl -L/usr/local/ssl/lib -lssl -lcrypto \ ld: warning: file /usr/local/lib/libssl.a(s2_meth.o): wrong ELF class: + ELFCLASS64 ld: warning: file /usr/local/lib/libcrypto.a(md5_one.o): wrong ELF cla +ss: ELFCLASS64
Now.. that worried me a bit. I'm not sure why that is happening since gcc was used for both Perl and OpenSSL in their compiles. In fact, they were compiled on the same machine!

Predictably (at least to me) when I ran a make test it failed. The error wasn't quite what I expected, but here it is as well:

Can't load 'blib/arch/auto/Net/SSLeay/SSLeay.so' for module Net::SSLea +y: ld.so.1: perl: fatal: relocation error: file blib/arch/auto/Net/SS +Leay/SSLeay.so: symbol SSLv23_method: referenced symbol not found at +/usr/local/software/perl-5.8.8/lib/5.8.8/sun4-solaris/DynaLoader.pm l +ine 230. at test.pl line 25 Compilation failed in require at test.pl line 25. BEGIN failed--compilation aborted at test.pl line 25. not ok 1

Anybody out there know what magic incantations I sould be inoking at this point? I'm at my wits end with this one.


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re: Net::SSLeay + Solaris 10 + OpenSSL v0.9.7b == frustration
by andyford (Curate) on Nov 10, 2006 at 21:29 UTC

    My guess is that openssl added the -m64 in an autoconf thing, but perl's build did not. Maybe you can recompile openssl and force 32 bit so they match?

    non-Perl: Andy Ford

      Alternatively, you could consider building a 64-bit Perl via ./Configure -Duse64bitall.

        Oh well... that didn't work... Got this:

        Use which C compiler? [cc] gcc -B/usr/ccs/bin/ gcc: language arch=generic64 not recognized ld: fatal: file try.c: unknown file type ld: fatal: File processing errors. No output written to try collect2: ld returned 1 exit status Uh-oh, the C compiler 'gcc -B/usr/ccs/bin/' doesn't seem to be working +. gcc: language arch=generic64 not recognized ld: fatal: file try.c: unknown file type ld: fatal: File processing errors. No output written to try collect2: ld returned 1 exit status Uh-oh, the C compiler 'gcc -B/usr/ccs/bin/' doesn't seem to be working +. You need to find a working C compiler. Either (purchase and) install the C compiler supplied by your OS vendo +r, or for a free C compiler try http://gcc.gnu.org/ I cannot continue any further, aborting.
        Time to try something else...


        Peter L. Berghold -- Unix Professional
        Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: Net::SSLeay + Solaris 10 + OpenSSL v0.9.7b == frustration
by blue_cowdawg (Monsignor) on Nov 13, 2006 at 14:40 UTC

    And the thot plickens! I just restored the copy of OpenSSL that was originally installed on the system and tried the build of the module again. Saw this during the Makefile.PL stage:

    Checking for OpenSSL-0.9.6j or 0.9.7b or newer... You have OpenSSL-0.9.7e installed in /usr/local/ssl *** Could not figure out which C compiler was used to compile /usr/loc +al/ssl/bin/openssl. It is essentiall that OpenSSL, perl, and Net::SSL +eay are compiled with the same compiler and flags. Mixing and matchin +g compilers is not supported. at ./Makefile.PL line 140.
    and in spite of that the module actually compiled. When make test was run I got the same error however. Going back and trying to build a 64 bit Perl and see if that fixes things.

    Solaris is such a PITA at times...


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

      Solaris is such a PITA at times...
      But a dream cakewalk compared to HP-UX...

      non-Perl: Andy Ford

            But a dream cakewalk compared to HP-UX...

        Oh! You won't get any argument out of me there. I remember well the horror show I had just getting Perl built on HPUX back in the day (1989 or so) when I was still a Junior SysAdm and trying to get anything from comp.unix.sources to compile.

        But I think it made a better SysAdm out of me in the long run.


        Peter L. Berghold -- Unix Professional
        Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg