Can't Install Crypt::SSLeay

Posted by loleson on 2011-11-03 09:51
Forums: PPM | OS: OS X 10.6 (Snow Leopard)

I need some help getting perl to run the pulledpork.pl script. I just downloaded and installed ActivePerl-5.14 onto my MacBook Pro running Snow Leopard (Mac OS X 10.6.8).

Running pulledpork.pl -c etc/pulledpork.conf -v produced this error:
Can't locate Crypt/SSLeay.pm in @INC
[stuff deleted]
BEGIN failed--compilation aborted at ./pulledpork.pl line 28

So, I did this:
sudo perl -MCPAN -e 'install Crypt::SSLeay'

Which produced a bunch of errors and then failed. Here are the more interesting chunks of the output up to the first error:

$ sudo perl -MCPAN -e 'install Crypt::SSLeay'
Set up build environment without MacOSX10.5 SDK (will build i386 binaries)
Set up build environment without MacOSX10.5 SDK (will build i386 binaries)
Going to read '/Volumes/mbp17_5_data-3/luis/.cpan/Metadata'
Database was generated on Thu, 03 Nov 2011 10:32:13 GMT

Running install for module 'Crypt::SSLeay'
Running make for N/NA/NANIS/Crypt-SSLeay-0.58.tar.gz
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/N/NA/NANIS/Crypt-SSLeay-0.58....
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/id/N/NA/NANIS/CHECKSUMS
Checksum for /Volumes/mbp17_5_data-3/luis/.cpan/sources/authors/id/N/NA/NANIS/Crypt-SSLeay-0.58.tar.gz ok

[stuff deleted]

CPAN.pm: Going to build N/NA/NANIS/Crypt-SSLeay-0.58.tar.gz

Set up build environment without MacOSX10.5 SDK (will build i386 binaries)

[more stuff deleted]

BUILD INFORMATION
================================================
ssl library: OpenSSL 0.9.8r in /usr
ssl header: openssl/ssl.h
libraries: -L/usr/lib -lssl -lcrypto -lgcc
include dir: -I/usr/include
================================================
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgcc
Writing Makefile for Crypt::SSLeay
Writing MYMETA.yml

[even more stuff deleted]

Do you want to run the live tests (y/N)? [N] y

/usr/local/ActivePerl-5.14/bin/perl /usr/local/ActivePerl-5.14/lib/ExtUtils/xsubpp -typemap /usr/local/ActivePerl-5.14/lib/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
gcc -c -I/usr/include -fno-common -DPERL_DARWIN -arch i386 -DUSE_SITECUSTOMIZE -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"0.58\" -DXS_VERSION=\"0.58\" "-I/usr/local/ActivePerl-5.14/lib/CORE" SSLeay.c

Running Mkbootstrap for Crypt::SSLeay ()
chmod 644 SSLeay.bs
rm -f blib/arch/auto/Crypt/SSLeay/SSLeay.bundle
LD_RUN_PATH="/usr/lib" cc -mmacosx-version-min=10.5 -bundle -undefined dynamic_lookup -Wl,-search_paths_first -arch i386 -fstack-protector SSLeay.o -o blib/arch/auto/Crypt/SSLeay/SSLeay.bundle \
-L/usr/lib -lssl -lcrypto \

chmod 755 blib/arch/auto/Crypt/SSLeay/SSLeay.bundle
cp SSLeay.bs blib/arch/auto/Crypt/SSLeay/SSLeay.bs
chmod 644 blib/arch/auto/Crypt/SSLeay/SSLeay.bs
Manifying blib/man3/Net::SSL.3
Manifying blib/man3/Crypt::SSLeay.3
NANIS/Crypt-SSLeay-0.58.tar.gz
make -- OK

Running make test
PERL_DL_NONLAZY=1 /usr/local/ActivePerl-5.14/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-basic.t .... 1/12

# Failed test 'use Crypt::SSLeay;'
# at t/00-basic.t line 6.
# Tried to use 'Crypt::SSLeay'.
# Error: Can't load '/Volumes/mbp17_5_data-3/luis/.cpan/build/Crypt-SSLeay-0.58-hrja55/blib/arch/auto/Crypt/SSLeay/SSLeay.bundle' for module Crypt::SSLeay: dlopen(/Volumes/mbp17_5_data-3/luis/.cpan/build/Crypt-SSLeay-0.58-hrja55/blib/arch/auto/Crypt/SSLeay/SSLeay.bundle, 2): no suitable image found.

Did find:
# /Volumes/mbp17_5_data-3/luis/.cpan/build/Crypt-SSLeay-0.58-hrja55/blib/arch/auto/Crypt/SSLeay/SSLeay.bundle: mach-o, but wrong architecture at /usr/local/ActivePerl-5.14/lib/DynaLoader.pm line 195.
# at (eval 4) line 2

grahams
ActiveState Staff
Mon, 2011-11-21 10:45

http://code.activestate.com/ppm/Crypt-SSLeay/

Should save you a great deal of hassle trying to sort out the settings you need to get compatible binaries out of the SDK.