I've been trying to compile Crypt::OpenSSL::X509 on my Solaris boxes and I am losing my hair too fast over it. It compiled fine under Mac OSX.

So I'm down to wondering if it something with the way the Perl binaries were compiled.

Here's the rundown, I'm hoping someone has some wisdom for me.

Initial problems right away with the execution of 'perl Makefile.PL', complaining about about an option (-lcrypt). I wonder if this isn't a linux thing so I comment that out of the Makefile.PL and adjust the inc and lib paths in the PL to point to a known, good, 64bit OpenSSL library and the include file for the opencsw location:

use inc::Module::Install; name('Crypt-OpenSSL-X509'); license('perl'); perl_version('5.005'); all_from('X509.pm'); homepage 'https://github.com/dsully/perl-crypt-openssl-x509'; bugtracker 'https://github.com/dsully/perl-crypt-openssl-x509/issues'; requires_external_cc(); cc_inc_paths('/opt/csw/include'); cc_lib_paths('/opt/csw/lib/sparcv9'); #cc_lib_links('crypto'); cc_optimize_flags('-O2 -g -Wall -Werror -mcpu=v9 -m64 '); auto_install(); WriteAll();
I have a 64 bit perl compiled.
ckevinj@wbz-r01:Crypt-OpenSSL-X509-1.800.2 $file `which perl` /tools/perl/5_14_2/bin/perl: ELF 64-bit MSB executable SPARCV9 Vers +ion 1, dynamically linked, not stripped
The Makefile is made cleanly.
ckevinj@wbz-r01:Crypt-OpenSSL-X509-1.800.2 $perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Crypt::OpenSSL::X509 Writing MYMETA.yml and MYMETA.json
The gmake is clean.
ckevinj@wbz-r01:Crypt-OpenSSL-X509-1.800.2 $gmake -i cp X509.pm blib/lib/Crypt/OpenSSL/X509.pm /tools/perl/5_14_2/bin/perl "-Iinc" /tools/perl/5_14_2/lib/5.14.2/ExtU +tils/xsubpp -typemap /tools/perl/5_14_2/lib/5.14.2/ExtUtils/typemap +-typemap typemap X509.xs > X509.xsc && mv X509.xsc X509.c gcc -c -I/opt/csw/include -mcpu=v9 -m64 -fno-strict-aliasing -pipe -f +stack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE +_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -O2 -g -Wall -Werror -mcpu=v9 -m6 +4 -DVERSION=\"1.800.2\" -DXS_VERSION=\"1.800.2\" -fPIC "-I/tools/p +erl/5_14_2/lib/5.14.2/sun4-solaris-64/CORE" X509.c Running Mkbootstrap for Crypt::OpenSSL::X509 () chmod 644 X509.bs rm -f blib/arch/auto/Crypt/OpenSSL/X509/X509.so gcc -mcpu=v9 -m64 -G -L/usr/lib/sparcv9 -fstack-protector -G X509.o +-o blib/arch/auto/Crypt/OpenSSL/X509/X509.so \ \ chmod 755 blib/arch/auto/Crypt/OpenSSL/X509/X509.so cp X509.bs blib/arch/auto/Crypt/OpenSSL/X509/X509.bs chmod 644 blib/arch/auto/Crypt/OpenSSL/X509/X509.bs Manifying blib/man3/Crypt::OpenSSL::X509.3
But the object is not useable. It has so many missing symbols that seem to be mostly Perl related.
ckevinj@wbz-r01:Crypt-OpenSSL-X509-1.800.2 $ldd -d blib/arch/auto/Cryp +t/OpenSSL/X509/X509.so libssp.so.0 => /opt/csw/lib/sparcv9/libssp.so.0 libc.so.1 => /lib/64/libc.so.1 libgcc_s.so.1 => /opt/csw/lib/sparcv9/libgcc_s.so.1 symbol not found: main (blib/arch/auto/Crypt/OpenSSL/ +X509/X509.so) symbol not found: PL_sv_undef (blib/arch/auto/Crypt/ +OpenSSL/X509/X509.so) symbol not found: PL_markstack_ptr (blib/arch/aut +o/Crypt/OpenSSL/X509/X509.so) symbol not found: PL_stack_sp (blib/arch/auto/Crypt/ +OpenSSL/X509/X509.so) symbol not found: PL_stack_base (blib/arch/auto/Crypt/ +OpenSSL/X509/X509.so) symbol not found: PL_op (blib/arch/auto/Crypt/OpenSSL/ +X509/X509.so) symbol not found: PL_curpad (blib/arch/auto/Crypt/ +OpenSSL/X509/X509.so) symbol not found: PL_sv_no (blib/arch/auto/Crypt/ +OpenSSL/X509/X509.so) symbol not found: PL_sv_yes (blib/arch/auto/Crypt/ +OpenSSL/X509/X509.so) symbol not found: i2d_ASN1_HEADER (blib/arch/aut +o/Crypt/OpenSSL/X509/X509.so) symbol not found: PL_unitcheckav (blib/arch/aut +o/Crypt/OpenSSL/X509/X509.so) symbol not found: PL_scopestack_ix (blib/arch/aut +o/Crypt/OpenSSL/X509/X509.so) libm.so.2 => /lib/64/libm.so.2 /platform/SUNW,Sun-Fire-T1000/lib/sparcv9/libc_psr.so.1
My Perl binary is not multi-threaded. I looked for libperl.so in the /tools/perl/5_14_2 path to put in my LD_LIBRARY_PATH_64, but there was only a libperl.a.

I did find some issues with a tool where some one was getting similar symbol issues when they were trying to run a module that expected a multi-threaded perl but it wasn't. So I'm attempting to recompile Perl again as multi-threaded to test that possibility.


In reply to Solaris problem or compile options by ckevinj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.