Subject: Re: [libssh2] 2 bugs in libssh2

Re: [libssh2] 2 bugs in libssh2

From: Simon Josefsson <>
Date: Tue, 27 Mar 2007 15:17:54 +0200

Daniel Johnson <> writes:

> The other bug is in tests/ The "AM_LDFLAGS = -no-install"
> should be omitted, since it tells libtool to not use a wrapper
> script. This causes simple to try to link to an already installed
> libssh2, not the one just built. So it either uses the wrong libssh2
> or fails to build if libssh2 isn't installed at all.

That is not what -no-install should be doing, here is the doc for it:

     Link an executable OUTPUT-FILE that can't be installed and
     therefore doesn't need a wrapper script. Useful if the program is
     only used in the build tree, e.g., for testing or generating other

I don't have libssh2 installed on this machine, and building and
linking 'simple' works:

jas_at_mocca:~/src/libssh2/tests$ make clean
 rm -f simple simple
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
jas_at_mocca:~/src/libssh2/tests$ make check
make simple
make[1]: Entering directory `/home/jas/src/libssh2/tests'
gcc -DHAVE_CONFIG_H -I. -I../src -I../include -g -O2 -I/usr/local/include -I/usr/include -MT simple.o -MD -MP -MF .deps/simple.Tpo -c -o simple.o simple.c
mv -f .deps/simple.Tpo .deps/simple.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -I/usr/local/include -I/usr/include -no-install -L/usr/local/lib -lgcrypt -lgpg-error -L/usr/lib -lz -o simple simple.o ../src/
mkdir .libs
gcc -g -O2 -I/usr/local/include -I/usr/include -o simple simple.o -L/usr/local/lib /usr/local/lib/ /usr/local/lib/ -L/usr/lib -lz ../src/.libs/ -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/home/jas/src/libssh2/src/.libs -Wl,--rpath -Wl,/usr/local/lib
make[1]: Leaving directory `/home/jas/src/libssh2/tests'
make check-TESTS
make[1]: Entering directory `/home/jas/src/libssh2/tests'
PASS: simple
All 1 tests passed
make[1]: Leaving directory `/home/jas/src/libssh2/tests'

It uses ../src/ which expands to ../src/.libs/
That seems correct to me.

Could you please describe the symptoms of your problem in more detail?

Which libtool version are you using? I'm using 1.5.22.


Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
libssh2-devel mailing list
Received on 2007-03-27