Installing Crypt::OpenSSL::RSA on Solaris 10
Posted by jad on Apr 13th, 2007
I just spent a frustrating hour trying to get the Crypt::OpenSSL::RSA perl module running on Solaris 10. I kept getting errors like
Note (probably harmless): No library found for -lssl Note (probably harmless): No library found for -lcrypto
when running perlgcc Makefile.PL. Eventually I realized that you need to hack Makefile.PL and change the LIBS and INC lines so that they contain the paths to the openssl headers and libraries. What is more the order of the LIBS arguments is very important. the -L must come before -lssl -lcrypto. Like this:
'LIBS' => ['-L/opt/openssl-0.9.8d/lib -lssl -lcrypto'],
'INC' => '-I/opt/openssl-0.9.8d/include',
If anyone knows how to tell cpan to prepend the LIBS then please comment and let me know.

(2 votes, average: 4.5 out of 5)
September 23rd, 2007 at 6:12 pm
Great tip, thank you.
I found that for compilation using gcc, one also has to go into Makefile and strip out all “-x” options. Packaged compiled without a problem after that.
September 24th, 2007 at 1:05 pm
Did you use perlgcc Makefile.PL to compile the package? See http://blog.nominet.org.uk/tech/2007/04/17/perl-on-solaris-10/