|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-09-01 16:32 UTC] potsofdirt at yahoo dot com
Description: ------------ ssh2-0.10 When I try to install via PEAR, or if I try to compile it into php as a static extension I get an error about not having libssh2 0.4 or above even though libssh2 0.14 is installed. Per recommendation of http://us3.php.net/manual/en/ref.ssh2.php#68806 I removed the -ldl flag from the config.m4 file in the extension and it compiled fine through pear. To compile it as a static extension into php I had to remove the same flag from configure. I am not familiar enough with how configure is built to know why it was not removed even after I performed `rm configure` and `./buildconf --force`. After removal of this flag, everything seems to work fine. Reproduce code: --------------- ./configure --with-apxs2=/usr/local/apache/bin/apxs \ --with-mysql=/usr/local/mysql \ --with-pgsql=/usr/local/pgsql \ --enable-calendar \ --enable-trans-sid \ --with-curl=/usr/local \ --with-sybase=/usr/local/freetds \ --enable-ftp \ --with-mcrypt \ --with-pspell \ --with-xdiff \ --with-zlib \ --with-openssl \ --enable-soap \ --with-ssh2 Expected result: ---------------- Php should have configured correctly Actual result: -------------- checking for libssh2_banner_set in -lssh2... no configure: error: libssh2 version >= 0.4 not found PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 00:00:01 2025 UTC |
I created the following patch for config.m4 that should solve compilation issues on systems without libdl: --- old/config.m4 Thu Sep 21 08:55:10 2006 +++ new/config.m4 Thu Sep 21 08:56:13 2006 @@ -29,6 +29,11 @@ LIBNAME=ssh2 LIBSYMBOL=libssh2_banner_set + EXTRA_LIBS="-lm" + AC_CHECK_LIB(dl, dlopen, [ + EXTRA_LIBS="$EXTRA_LIBS -ldl" + ]) + PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, [ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SSH2_DIR/lib, SSH2_SHARED_LIBADD) @@ -36,7 +41,7 @@ ],[ AC_MSG_ERROR([libssh2 version >= 0.4 not found]) ],[ - -L$SSH2_DIR/lib -lm -ldl + -L$SSH2_DIR/lib $EXTRA_LIBS ]) PHP_CHECK_LIBRARY($LIBNAME,libssh2_channel_forward_listen_ex,