Subject: Re: [libssh2] 2 bugs in libssh2

Re: [libssh2] 2 bugs in libssh2

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

Daniel Johnson <daniel_at_daniel-johnson.org> writes:

> The other bug is in tests/Makefile.in. 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:

`-no-install'
     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
     files.

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/libssh2.la
mkdir .libs
gcc -g -O2 -I/usr/local/include -I/usr/include -o simple simple.o -L/usr/local/lib /usr/local/lib/libgcrypt.so /usr/local/lib/libgpg-error.so -L/usr/lib -lz ../src/.libs/libssh2.so -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'
jas_at_mocca:~/src/libssh2/tests$

It uses ../src/libssh2.la which expands to ../src/.libs/libssh2.so.
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.

/Simon

-------------------------------------------------------------------------
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-27