Subject: [libssh2] 2 bugs in libssh2

[libssh2] 2 bugs in libssh2

From: Daniel Johnson <>
Date: Sun, 25 Mar 2007 13:50:06 -0400

There are a couple of bugs that I've found. One is that in, the $SHLIB_SUFFIX_NAME variable never gets defined to
anything. When checking for libcrypt and libz, configure looks for
files named "libfoo.a" or "libfoo.$SHLIB_SUFFIX_NAME". Since
$SHLIB_SUFFIX_NAME isn't set, this works out to "libfoo.a" or
"libfoo." with the later ending in ".". On Linux, this works since
"libfoo.a" is found first, but Darwin doesn't have libcrypt.a or
libz.a just libcrypt.dylib and libz.dylib and therefore configure
fails. It would also fail on any other platform without static
versions of the libs.

So $SHLIB_SUFFIX_NAME needs to be set to the correct value. Libtool
sets $shrext_cmds to the correct suffix. This variable can contain
commands, so it needs to be eval'd like this: eval SHLIB_SUFFIX_NAME=
\"$shrext_cmds\". It will also begin with a "." so when
$SHLIB_SUFFIX_NAME is used, it mustn't be prefixed with an other ".".
The patch below should fix things for all platforms.

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.

This patch fixes both issues.

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