Subject: | Re: Compilation Error |
Hi,
I'm having problems compiling.
--Matteo
[root@makalu Net-SSH2-0.06]# perl Makefile.PL
Net::SSH2: using library -L/usr/local/lib -lssh2 and include path -
I/usr/local/include.
Checking if your kit is complete...
Looks good
Writing Makefile for Net::SSH2
[root@makalu Net-SSH2-0.06]# make
cp lib/Net/SSH2/File.pm blib/lib/Net/SSH2/File.pm
cp lib/Net/SSH2/Dir.pm blib/lib/Net/SSH2/Dir.pm
cp lib/Net/SSH2/SFTP.pm blib/lib/Net/SSH2/SFTP.pm
cp lib/Net/SSH2/Listener.pm blib/lib/Net/SSH2/Listener.pm
cp lib/Net/SSH2/Channel.pm blib/lib/Net/SSH2/Channel.pm
cp lib/Net/SSH2.pm blib/lib/Net/SSH2.pm
AutoSplitting blib/lib/Net/SSH2.pm (blib/lib/auto/Net/SSH2)
/usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -
typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap -typemap typemap
SSH2.xs > SSH2.xsc && mv SSH2.xsc SSH2.c
gcc -c -I/usr/local/include -I. -D_REENTRANT -D_GNU_SOURCE -
DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -
pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"0.06\" -
DXS_VERSION=\"0.06\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-
multi/CORE" SSH2.c
Running Mkbootstrap for Net::SSH2 ()
chmod 644 SSH2.bs
rm -f blib/arch/auto/Net/SSH2/SSH2.so
gcc -shared -L/usr/local/lib SSH2.o -o
blib/arch/auto/Net/SSH2/SSH2.so -L/usr/local/lib -lssh2
chmod 755 blib/arch/auto/Net/SSH2/SSH2.so
cp SSH2.bs blib/arch/auto/Net/SSH2/SSH2.bs
chmod 644 blib/arch/auto/Net/SSH2/SSH2.bs
Manifying blib/man3/Net::SSH2::File.3pm
Manifying blib/man3/Net::SSH2::Dir.3pm
Manifying blib/man3/Net::SSH2::SFTP.3pm
Manifying blib/man3/Net::SSH2::Listener.3pm
Manifying blib/man3/Net::SSH2::Channel.3pm
Manifying blib/man3/Net::SSH2.3pm
[root@makalu Net-SSH2-0.06]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-
e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Net-SSH2....# Failed test (t/Net-SSH2.t at line 19)
# Tried to use 'Net::SSH2'.
# Error: Can't load '/root/Net-SSH2-
0.06/blib/arch/auto/Net/SSH2/SSH2.so' for module Net::SSH2:
libssh2.so: cannot open shared object file: No such file or directory
at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
# at (eval 1) line 2
# Compilation failed in require at (eval 1) line 2.
t/Net-SSH2....NOK 1&Net::SSH2::constant not defined at t/Net-SSH2.t
line 22
# Looks like you planned 72 tests but only ran 1.
# Looks like your test died just after 1.
t/Net-
SSH2....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-72
Failed 72/72 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-----------------------------------------------------------------------
--------
t/Net-SSH2.t 255 65280 72 143 198.61% 1-72
Failed 1/1 test scripts, 0.00% okay. 72/72 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 2
[root@makalu Net-SSH2-0.06]# locate libssh2.so
/usr/local/lib/libssh2.so
[root@makalu Net-SSH2-0.06]#
and before this I installed "libssh2-0.12" with the following results
[root@makalu libssh2-0.12]# make all install
make[1]: Entering directory `/root/libssh2-0.12/src'
gcc -o channel.o channel.c -c -g -O2 -I/usr/include -I/usr/include -
Wall -g -I../include/ -fPIC
gcc -o comp.o comp.c -c -g -O2 -I/usr/include -I/usr/include -Wall -g -
I../include/ -fPIC
gcc -o crypt.o crypt.c -c -g -O2 -I/usr/include -I/usr/include -Wall -
g -I../include/ -fPIC
gcc -o hostkey.o hostkey.c -c -g -O2 -I/usr/include -I/usr/include -
Wall -g -I../include/ -fPIC
gcc -o kex.o kex.c -c -g -O2 -I/usr/include -I/usr/include -Wall -g -
I../include/ -fPIC
gcc -o mac.o mac.c -c -g -O2 -I/usr/include -I/usr/include -Wall -g -
I../include/ -fPIC
gcc -o misc.o misc.c -c -g -O2 -I/usr/include -I/usr/include -Wall -g -
I../include/ -fPIC
gcc -o packet.o packet.c -c -g -O2 -I/usr/include -I/usr/include -
Wall -g -I../include/ -fPIC
gcc -o publickey.o publickey.c -c -g -O2 -I/usr/include -
I/usr/include -Wall -g -I../include/ -fPIC
gcc -o scp.o scp.c -c -g -O2 -I/usr/include -I/usr/include -Wall -g -
I../include/ -fPIC
gcc -o session.o session.c -c -g -O2 -I/usr/include -I/usr/include -
Wall -g -I../include/ -fPIC
gcc -o sftp.o sftp.c -c -g -O2 -I/usr/include -I/usr/include -Wall -g -
I../include/ -fPIC
gcc -o userauth.o userauth.c -c -g -O2 -I/usr/include -I/usr/include -
Wall -g -I../include/ -fPIC
gcc -o libssh2.so channel.o comp.o crypt.o hostkey.o kex.o mac.o
misc.o packet.o publickey.o scp.o session.o sftp.o userauth.o -L-
L/usr/kerberos/lib -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -
lk5crypto -lresolv -ldl -lz -lcrypto -L/usr/lib -lz -shared -lm
make[1]: Leaving directory `/root/libssh2-0.12/src'
gcc -o ssh2_sample.o ssh2_sample.c -c -g -O2 -I/usr/include -
I/usr/include -Iinclude/ -Wall -g
gcc -o ssh2_sample ssh2_sample.o -lssh2 -Lsrc/
./mkinstalldirs /usr/local/include
./mkinstalldirs /usr/local/lib
make[1]: Entering directory `/root/libssh2-0.12/src'
/usr/bin/install -c libssh2.so /usr/local/lib
make[1]: Leaving directory `/root/libssh2-0.12/src'
/usr/bin/install -c -m 644 include/libssh2.h /usr/local/include/
/usr/bin/install -c -m 644 include/libssh2_sftp.h /usr/local/include/
/usr/bin/install -c -m 644
include/libssh2_publickey.h /usr/local/include/
[root@makalu libssh2-0.12]#