php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57779 make fails
Submitted: 2007-08-10 04:03 UTC Modified: 2008-12-20 12:31 UTC
From: edward at confirmat dot nl Assigned:
Status: Closed Package: ssh2 (PECL)
PHP Version: 4.3.4 OS: suse 9.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: edward at confirmat dot nl
New email:
PHP Version: OS:

 

 [2007-08-10 04:03 UTC] edward at confirmat dot nl
Description:
------------
I loaded ssh2-0.10.tzr.gz and unzipped it and phpized it.
There some warnings, like:


/usr/share/aclocal/gsl.m4:5: warning: underquoted definition of AM_PATH_GSL
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
/usr/share/aclocal/gconf-1.m4:4: warning: underquoted definition of AM_PATH_GCONF
/usr/share/aclocal/gconf-1.m4:71: warning: underquoted definition of AM_GCONF_SOURCE
/usr/share/aclocal/avifile.m4:21: warning: underquoted definition of AM_PATH_AVIFILE
/opt/gnome/share/aclocal/libIDL.m4:6: warning: underquoted definition of AM_PATH_LIBIDL
/opt/gnome/share/aclocal/gnome--.m4:10: warning: underquoted definition of AM_PATH_GNOMEMM
/opt/gnome/share/aclocal/ORBit.m4:4: warning: underquoted definition of AM_PATH_ORBIT

Then I ./configure and did fine, then make and that resulted in error, see below:

Reproduce code:
---------------
make



Expected result:
----------------
it should create ssh2.so and not fail make

Actual result:
--------------
/bin/sh /home/edward/tmp/ssh2-0.10/libtool --mode=compile gcc  -I. -I/home/edward/tmp/ssh2-0.10 -DPHP_ATOM_INC -I/home/edward/tmp/ssh2-0.10/include -I/home/edward/tmp/ssh2-0.10/main -I/home/edward/tmp/ssh2-0.10 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2  -prefer-pic -c /home/edward/tmp/ssh2-0.10/ssh2.c -o ssh2.lo
mkdir .libs
 gcc -I. -I/home/edward/tmp/ssh2-0.10 -DPHP_ATOM_INC -I/home/edward/tmp/ssh2-0.10/include -I/home/edward/tmp/ssh2-0.10/main -I/home/edward/tmp/ssh2-0.10 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/edward/tmp/ssh2-0.10/ssh2.c  -fPIC -DPIC -o .libs/ssh2.o
/home/edward/tmp/ssh2-0.10/ssh2.c: In function `zif_ssh2_methods_negotiated':
/home/edward/tmp/ssh2-0.10/ssh2.c:481: warning: passing arg 2 of `libssh2_session_methods' makes integer from pointer without a cast
/home/edward/tmp/ssh2-0.10/ssh2.c:481: error: too many arguments to function `libssh2_session_methods'
/home/edward/tmp/ssh2-0.10/ssh2.c: In function `zif_ssh2_fingerprint':
/home/edward/tmp/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type
/home/edward/tmp/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_add':
/home/edward/tmp/ssh2-0.10/ssh2.c:1038: warning: passing arg 1 of `_efree' discards qualifiers from pointer target type
/home/edward/tmp/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_list':
/home/edward/tmp/ssh2-0.10/ssh2.c:1097: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/home/edward/tmp/ssh2-0.10/ssh2.c:1098: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/home/edward/tmp/ssh2-0.10/ssh2.c:1106: warning: initialization discards qualifiers from pointer target type
/home/edward/tmp/ssh2-0.10/ssh2.c:1107: warning: passing arg 2 of `zend_hash_add_or_update' discards qualifiers from pointer target type
make: *** [ssh2.lo] Fout 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-17 08:24 UTC] njt1982 at yahoo dot com
I am having this exact same problem...
php-4.3.9
libssh2-0.17
ssh2-0.10
 [2007-11-07 12:34 UTC] rpeters+pecl at icomproductions dot ca
Ditto. Any ideas?
 [2007-11-07 12:35 UTC] rpeters+pecl at icomproductions dot ca
I guess I should provide my versions:
PHP 5.2.4
lib-ssh2 0.17
ssh2-0.10
 [2007-11-26 11:50 UTC] i dot galic at brainsware dot org
I stumbled over this problem and found a solution:

diff -Naur ssh2-0.10-orig/ssh2.c ssh2-0.10/ssh2.c          
--- ssh2-0.10-orig/ssh2.c       2005-11-02 00:40:23.000000000 +0100
+++ ssh2-0.10/ssh2.c    2007-11-26 17:29:16.000000000 +0100
@@ -476,9 +476,10 @@
        }
 
        ZEND_FETCH_RESOURCE(session, LIBSSH2_SESSION*, &zsession, -1, PHP_SSH2_SESSION_RES_NAME, le_ssh2_session);
-
-#if LIBSSH2_APINO < 200412301450
+#ifdef LIBSSH2_APINO
+# if LIBSSH2_APINO < 200412301450
        libssh2_session_methods(session, &kex, &hostkey, &crypt_cs, &crypt_sc, &mac_cs, &mac_sc, &comp_cs, &comp_sc, &lang_cs, &lang_sc);
+# endif
 #else
        kex = libssh2_session_methods(session, LIBSSH2_METHOD_KEX);
        hostkey = libssh2_session_methods(session, LIBSSH2_METHOD_HOSTKEY);




Seems to fix it.
[I'm running with the latest versions of both ssh2 extension and libssh2]
 [2007-11-29 05:12 UTC] spam2 at rhsoft dot net
It would be nice if anyone makes a download of fixed sources available - What is with the maintainer from the extension? The guy seems to have died :-(
 [2008-05-08 10:21 UTC] volkirik at yahoo dot com dot tr
LIBSSH2_APINO was removed from libssh2...


ssh2.c patch:


LINE 480:
search and change following line:
#if LIBSSH2_APINO < 200412301450
...
#else

to:
#if (defined(LIBSSH2_APINO) && LIBSSH2_APINO < 200412301450)
...
#else /* if LIBSSH2_APINO is not defined its v0.14 or higher. no problem! */

LINE 1216:
search and change following line:
#if (LIBSSH2_APINO > 200503221619)

to:
#if (defined(LIBSSH2_APINO) && (LIBSSH2_APINO > 200503221619)) || (defined(LIBSSH2_VERSION_NUM) && LIBSSH2_VERSION_NUM >= 0x001000)

Compile again.

----
Volkan K.
 [2008-06-06 13:59 UTC] ketan08081980 at yahoo dot com
What version of libssh2 did you modify this into? I have libssh2-0.18 and I cannot fine these lines in code. Can you please help?
 [2008-08-06 00:55 UTC] codeslinger at compsalot dot com
in response to ketan08081980 above.

it's not libssh2 that you need to modify, 

it is  "ssh2.c"  which you find after you download the php-ssh2 package from PECL and unpack it.
 [2008-12-20 12:31 UTC] mikesul@php.net
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/ssh2


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC