Open kevinjc opened 12 years ago
I found that if I remove the -Werror GCC option from the Makefile.PL that it will compile. But that doesn't mean it runs.
But perhaps this will help someone shed some light on a solution to my plight?
Can't load '/tools/perl/5_8_7/lib/site_perl/5.8.7/sun4-solaris-64/auto/Crypt/OpenSSL/X509/X509.so' for module Crypt::OpenSSL::X509:
ld.so.1: perl: fatal: relocation error: file /tools/perl/5_8_7/lib/site_perl/5.8.7/sun4-solaris-64/auto/Crypt/OpenSSL/X509/X509.so:
symbol NETSCAPE_X509_it: referenced symbol not found at /tools/perl/5_8_7/lib/5.8.7/sun4-solaris-64/DynaLoader.pm line 230.
at /tools/perl/5_8_7/lib/site_perl/5.8.7/sun4-solaris-64/Crypt/OpenSSL/X509.pm line 97
Compilation failed in require at /sao/home/kcreason/perl/certwatch.pl line 12.
BEGIN failed--compilation aborted at /sao/home/kcreason/perl/certwatch.pl line 12.
Can't locate object method "__X509_cleanup" via package "Crypt::OpenSSL::X509" at /tools/perl/5_8_7/lib/site_perl/5.8.7/sun4-
solaris-64/Crypt/OpenSSL/X509.pm line 101.
END failed--call queue aborted at ./certwatch.pl line 12.
@kevinjc, I just wanted to follow up on this and see if you are still having issues compiling on Solaris or not. I don't have access to a Solaris environment, but may still be able to assist.
@kevinjc I am seeing same issue, please post changes you have to do to solve this issue. Thanks
Yikes. That was a long time ago. I don't have all those original notes, but I was able to find some.
So, following the unused variable "ax" warning/error, my notes pick up here. No information in between, but I appear to have switched to using the 1.0 version of headers from the OpenCSW. I also switched build hosts, so not sure if that was just in an effort to get off the user's system onto a sandbox or something else.
kcreason@iss-wbz-r01:Crypt-OpenSSL-X509-1.800.2 $make
Skip blib/lib/Crypt/OpenSSL/X509.pm (unchanged)
gcc -c -I/opt/csw/include -I/opt/csw/include/openssl -mcpu=v9 -m64 -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -DPERL_USE_SAFE_PUTENV -O2 -g -Wall -Werror -mcpu=v9 -m64 -DVERSION=\"1.800.2\" -DXS_VERSION=\"1.800.2\" -fPIC "-I/tools/perl/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 -G -m64 -mcpu=v9 -m64 -G -L/usr/lib/sparcv9 -fstack-protector -mcpu=v9 -m64 -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
So then my notes indicated I ran the following to command to re-link properly.. WTF, I don't remember this really...
NOW, re-link it properly
kcreason@iss-wbz-r01:Crypt-OpenSSL-X509-1.800.2 $gcc -mpcu=v9 -m64 -G -L/opt/csw/lib/sparcv9 -fstack-protector -G X509.o –o blib/arch/auto/Crypt/OpenSSL/X509/X509.so -L/opt/csw/lib/sparcv9 -lssl -lcrypto
And from here I note to myself it might complain about missing symbols if you run an LDD on it, but it really runs:
PROOF it worked --
We don't worry about the PL symbols because the perl interpretter will provide those at execution time. The bad missing symbol before that killed it was i2d_ASN1_HEADER.
kcreason@iss-wbz-r01:Crypt-OpenSSL-X509-1.800.2 $ldd -d blib/arch/auto/Crypt/OpenSSL/X509/X509.so
libssl.so.0.9.8 => /opt/csw/lib/sparcv9/libssl.so.0.9.8
libcrypto.so.0.9.8 => /opt/csw/lib/sparcv9/libcrypto.so.0.9.8
libssp.so.0 => /opt/csw/lib/sparcv9/libssp.so.0
libc.so.1 => /lib/64/libc.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/auto/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: PL_unitcheckav (blib/arch/auto/Crypt/OpenSSL/X509/X509.so)
symbol not found: PL_scopestack_ix (blib/arch/auto/Crypt/OpenSSL/X509/X509.so)
libm.so.2 => /lib/64/libm.so.2
/platform/SUNW,Sun-Fire-T1000/lib/sparcv9/libc_psr.so.1
/platform/SUNW,Sun-Fire-T1000/lib/sparcv9/libmd_psr.so.1
AND most importantly, after installing it,
kcreason@iss-wbz-r01:Crypt-OpenSSL-X509-1.800.2 $for i in `find certificates/ -name *.cert`
> do
> ~/perl/certwatch.pl $i
> done
The certificate certificates/dir-di3/server.cert.nodos.cert will expire within the threshold of 47 days.
The certificate certificates/dir-di3/server.cert will expire within the threshold of 47 days.
The certificate certificates/dir-p03/server.cert will expire within the threshold of 47 days.
kcreason@iss-wbz-r01:Crypt-OpenSSL-X509-1.800.2 $
I have two openssl version compiled for 64 bits (0.9.7g, and 1.0.0e) and a third for 32 bits (1d). I have two perls (both 5.8.7), one 32 and one 64. Errors are about the same, can't verify that they are exactly the same but I think they are.
Here is the output from the 64 bit version of Perl and OpenSSL 0.9.7g
/tools/gcc/3_4_2/bin/gcc -c -I/tools/openssl/0_9_7g/include -mcpu=v9 -m64 -Wa,-xarch=v9 -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -Werror -DVERSION=\"1.800.2\" -DXS_VERSION=\"1.800.2\" -fPIC "-I/tools/perl/5_8_7/lib/5.8.7/sun4-solaris-64/CORE" X509.c
X509.xs: In function
sv_bio_utf8_on': X509.xs:107: warning: implicit declaration of function
is_utf8_string_loclen' X509.xs: In function_decode_netscape': X509.xs:231: warning: assignment from incompatible pointer type X509.xs:234: error:
i2d_of_void' undeclared (first use in this function) X509.xs:234: error: (Each undeclared identifier is reported only once X509.xs:234: error: for each function it appears in.) X509.xs:234: error: parse error before ')' token X509.c: In functionXS_Crypt__OpenSSL__X509___X509_cleanup': X509.c:360: warning: unused variable
ax'Hmm, or maybe there is a difference in the OpenSSL version:
make
Skip blib/lib/Crypt/OpenSSL/X509.pm (unchanged) gcc -c -I/tools/openssl/1.0.0e/include -mcpu=v9 -m64 -Wa,-xarch=v9 -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -Werror -DVERSION=\"1.800.2\" -DXS_VERSION=\"1.800.2\" -fPIC "-I/tools/perl/5_8_7/lib/5.8.7/sun4-solaris-64/CORE" X509.c X509.xs: In function
sv_bio_utf8_on': X509.xs:107: warning: implicit declaration of function
is_utf8_string_loclen' X509.c: In functionXS_Crypt__OpenSSL__X509___X509_cleanup': X509.c:360: warning: unused variable
ax' *\ Error code 1 make: Fatal error: Command failed for target `X509.o'Any ideas appreciated.