Subject: [libssh2] Does not build on Cygwin with --disable-shared

[libssh2] Does not build on Cygwin with --disable-shared

From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 30 Mar 2007 16:25:52 +0200

Failure building on Cygwin with --disable-shared (CVS version of course)

ssh2.o:ssh2.c:(.text+0x104): undefined reference to
`__imp__libssh2_session_init_ex'
ssh2.o:ssh2.c:(.text+0x11b): undefined reference to
`__imp__libssh2_session_startup'
ssh2.o:ssh2.c:(.text+0x158): undefined reference to
`__imp__libssh2_hostkey_hash'
ssh2.o:ssh2.c:(.text+0x20d): undefined reference to
`__imp__libssh2_userauth_password_ex'
ssh2.o:ssh2.c:(.text+0x25e): undefined reference to
`__imp__libssh2_userauth_publickey_fromfile_ex'
ssh2.o:ssh2.c:(.text+0x2b0): undefined reference to
`__imp__libssh2_channel_open_ex'
ssh2.o:ssh2.c:(.text+0x303): undefined reference to
`__imp__libssh2_channel_setenv_ex'
ssh2.o:ssh2.c:(.text+0x350): undefined reference to
`__imp__libssh2_channel_request_pty_ex'
ssh2.o:ssh2.c:(.text+0x39b): undefined reference to
`__imp__libssh2_channel_process_startup'
ssh2.o:ssh2.c:(.text+0x3cc): undefined reference to
`__imp__libssh2_channel_free'
ssh2.o:ssh2.c:(.text+0x3f8): undefined reference to
`__imp__libssh2_session_disconnect_ex'
ssh2.o:ssh2.c:(.text+0x405): undefined reference to
`__imp__libssh2_session_free'

How to reproduce:

./buildconf
./configure --disable-shared
make

And the full output is:

Making all in src
make[1]: Entering directory `/home/Administrador/libssh2/src'
make all-am
make[2]: Entering directory `/home/Administrador/libssh2/src'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT packet.lo -MD -MP -MF .deps/packet.Tpo -c -o packet.lo packet.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT packet.lo -MD -MP -MF
.deps/packet.Tpo -c packet.c -o packet.o
mv -f .deps/packet.Tpo .deps/packet.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT publickey.lo -MD -MP -MF .deps/publickey.Tpo -c -o publickey.lo
publickey.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT publickey.lo -MD -MP -MF
.deps/publickey.Tpo -c publickey.c -o publickey.o
mv -f .deps/publickey.Tpo .deps/publickey.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT scp.lo -MD -MP -MF .deps/scp.Tpo -c -o scp.lo scp.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT scp.lo -MD -MP -MF .deps/scp.Tpo -c
scp.c -o scp.o
mv -f .deps/scp.Tpo .deps/scp.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT session.lo -MD -MP -MF .deps/session.Tpo -c -o session.lo
session.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT session.lo -MD -MP -MF
.deps/session.Tpo -c session.c -o session.o
mv -f .deps/session.Tpo .deps/session.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT sftp.lo -MD -MP -MF .deps/sftp.Tpo -c -o sftp.lo sftp.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT sftp.lo -MD -MP -MF .deps/sftp.Tpo
-c sftp.c -o sftp.o
mv -f .deps/sftp.Tpo .deps/sftp.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT userauth.lo -MD -MP -MF .deps/userauth.Tpo -c -o userauth.lo
userauth.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT userauth.lo -MD -MP -MF
.deps/userauth.Tpo -c userauth.c -o userauth.o
mv -f .deps/userauth.Tpo .deps/userauth.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT pem.lo -MD -MP -MF .deps/pem.Tpo -c -o pem.lo pem.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT pem.lo -MD -MP -MF .deps/pem.Tpo -c
pem.c -o pem.o
mv -f .deps/pem.Tpo .deps/pem.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT transport.lo -MD -MP -MF .deps/transport.Tpo -c -o transport.lo
transport.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT transport.lo -MD -MP -MF
.deps/transport.Tpo -c transport.c -o transport.o
mv -f .deps/transport.Tpo .deps/transport.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I../include -I../src -DLIBSSH2_WIN32 -I/usr/include -I/usr/include
-MT openssl.lo -MD -MP -MF .deps/openssl.Tpo -c -o openssl.lo
openssl.c
 gcc -DHAVE_CONFIG_H -I../include -I../src -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -MT openssl.lo -MD -MP -MF
.deps/openssl.Tpo -c openssl.c -o openssl.o
mv -f .deps/openssl.Tpo .deps/openssl.Plo
/bin/sh ../libtool --tag=CC --mode=link gcc -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -version-info 1:0:0 -no-undefined
-L/usr/lib -lcrypto -L/usr/lib -lz -o libssh2.la -rpath /usr/local/lib
channel.lo comp.lo crypt.lo hostkey.lo kex.lo mac.lo misc.lo packet.lo
publickey.lo scp.lo session.lo sftp.lo userauth.lo pem.lo transport.lo
 openssl.lo
mkdir .libs
ar cru .libs/libssh2.a 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 pem.o
transport.o openssl.o
ranlib .libs/libssh2.a
creating libssh2.la
(cd .libs && rm -f libssh2.la && ln -s ../libssh2.la libssh2.la)
make[2]: Leaving directory `/home/Administrador/libssh2/src'
make[1]: Leaving directory `/home/Administrador/libssh2/src'
Making all in example
make[1]: Entering directory `/home/Administrador/libssh2/example'
Making all in simple
make[2]: Entering directory `/home/Administrador/libssh2/example/simple'
gcc -DHAVE_CONFIG_H -I../../include -DLIBSSH2_WIN32 -I/usr/include
-I/usr/include -MT ssh2.o -MD -MP -MF .deps/ssh2.Tpo -c -o ssh2.o
ssh2.c
mv -f .deps/ssh2.Tpo .deps/ssh2.Po
/bin/sh ../../libtool --tag=CC --mode=link gcc -DLIBSSH2_WIN32
-I/usr/include -I/usr/include -L/usr/lib -lcrypto -L/usr/lib -lz -o
ssh2.exe ssh2.o ../../src/libssh2.la
mkdir .libs
gcc -DLIBSSH2_WIN32 -I/usr/include -I/usr/include -o ssh2.exe ssh2.o
-L/usr/lib ../../src/.libs/libssh2.a -lcrypto -lz
ssh2.o:ssh2.c:(.text+0x104): undefined reference to
`__imp__libssh2_session_init_ex'
ssh2.o:ssh2.c:(.text+0x11b): undefined reference to
`__imp__libssh2_session_startup'
ssh2.o:ssh2.c:(.text+0x158): undefined reference to
`__imp__libssh2_hostkey_hash'
ssh2.o:ssh2.c:(.text+0x20d): undefined reference to
`__imp__libssh2_userauth_password_ex'
ssh2.o:ssh2.c:(.text+0x25e): undefined reference to
`__imp__libssh2_userauth_publickey_fromfile_ex'
ssh2.o:ssh2.c:(.text+0x2b0): undefined reference to
`__imp__libssh2_channel_open_ex'
ssh2.o:ssh2.c:(.text+0x303): undefined reference to
`__imp__libssh2_channel_setenv_ex'
ssh2.o:ssh2.c:(.text+0x350): undefined reference to
`__imp__libssh2_channel_request_pty_ex'
ssh2.o:ssh2.c:(.text+0x39b): undefined reference to
`__imp__libssh2_channel_process_startup'
ssh2.o:ssh2.c:(.text+0x3cc): undefined reference to
`__imp__libssh2_channel_free'
ssh2.o:ssh2.c:(.text+0x3f8): undefined reference to
`__imp__libssh2_session_disconnect_ex'
ssh2.o:ssh2.c:(.text+0x405): undefined reference to
`__imp__libssh2_session_free'
collect2: ld returned 1 exit status
make[2]: *** [ssh2.exe] Error 1
make[2]: Leaving directory `/home/Administrador/libssh2/example/simple'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Administrador/libssh2/example'
make: *** [all-recursive] Error 1

-- 
-=[Yang]=-
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-03-30