Page 1 of 1

ssh2-0.10 make--- error ( need help on this)

Posted: Sat Jan 30, 2010 12:05 am
by leepolanco
I need help on : ( Thanks in advanced)

I can't compile ssh2.c... after suggested line modifications..

[root@linuxhost ssh2-0.10]# diff ssh2.c.orig ssh2.c

< #if (LIBSSH2_APINO > 200503221619)
---
> #if LIBSSH2_VERSION_NUM < 0x001000

[root@linuxhost ssh2-0.10]# make
/bin/sh /root/ssh2-0.10/libtool --mode=compile cc -I. -I/root/ssh2-0.10 -DPHP_ATOM_INC -I/root/ssh2-0.10/include -I/root/ssh2-0.10/main -I/root/ssh2-0.10 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2-0.10/ssh2.c -o ssh2.lo
mkdir .libs
cc -I. -I/root/ssh2-0.10 -DPHP_ATOM_INC -I/root/ssh2-0.10/include -I/root/ssh2-0.10/main -I/root/ssh2-0.10 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2-0.10/ssh2.c -fPIC -DPIC -o .libs/ssh2.o
/root/ssh2-0.10/ssh2.c:49: error: duplicate `static'
/root/ssh2-0.10/ssh2.c: In function `zif_ssh2_methods_negotiated':
/root/ssh2-0.10/ssh2.c:481: warning: passing arg 2 of `libssh2_session_methods' makes integer from pointer without a cast
/root/ssh2-0.10/ssh2.c:481: error: too many arguments to function `libssh2_session_methods'
/root/ssh2-0.10/ssh2.c: In function `zif_ssh2_fingerprint':
/root/ssh2-0.10/ssh2.c:536: warning: assignment discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c: In function `zif_ssh2_poll':
/root/ssh2-0.10/ssh2.c:885: error: structure has no member named `is_ref'
/root/ssh2-0.10/ssh2.c:885: error: structure has no member named `refcount'
/root/ssh2-0.10/ssh2.c:895: error: structure has no member named `is_ref'
/root/ssh2-0.10/ssh2.c:896: error: structure has no member named `refcount'
/root/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_add':
/root/ssh2-0.10/ssh2.c:1005: error: structure has no member named `is_ref'
/root/ssh2-0.10/ssh2.c:1006: error: structure has no member named `refcount'
/root/ssh2-0.10/ssh2.c:1038: warning: passing arg 1 of `_efree' discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c: In function `zif_ssh2_publickey_list':
/root/ssh2-0.10/ssh2.c:1097: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c:1098: warning: passing arg 4 of `add_assoc_stringl_ex' discards qualifiers from pointer target type
/root/ssh2-0.10/ssh2.c: In function `zm_startup_ssh2':
/root/ssh2-0.10/ssh2.c:1219: error: `kex' undeclared (first use in this function)
/root/ssh2-0.10/ssh2.c:1219: error: (Each undeclared identifier is reported only once
/root/ssh2-0.10/ssh2.c:1219: error: for each function it appears in.)
/root/ssh2-0.10/ssh2.c:1219: error: `session' undeclared (first use in this function)
make: *** [ssh2.lo] Error 1

[root@linuxhost ssh2-0.10]# pwd
/root/ssh2-0.10

[root@linuxhost ssh2-0.10]# /usr/local/bin/php -v
PHP 5.3.0 (cli) (built: Jan 27 2010 23:34:38)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies


I have these libs installed.. ( still can't this ssh2.o lib.. going)

[root@linuxhost ssh2-0.10]# rpm -qa | grep "ssh"
openssh-3.9p1-8.RHEL4.9
openssh-server-3.9p1-8.RHEL4.9
openssh-askpass-gnome-3.9p1-8.RHEL4.9
libssh2-0.17-1.el4.rf
libssh2-devel-1.2.2-1.el4.pp
libssh2-1.2.2-1.el4.pp
openssh-clients-3.9p1-8.RHEL4.9
openssh-askpass-3.9p1-8.RHEL4.9

[root@linuxhost ssh2-0.10]# uname -a
Linux linuxhost 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux

Re: ssh2-0.10 make--- error ( need help on this)

Posted: Sat Jan 30, 2010 6:46 pm
by redmonkey
If you are compiling this extension purely for PHP versions 5.3.x and above then you can just remove line 48 from ssh2.c, line 48 should be...

Code: Select all

static
...if you also need to compile the extension for PHP versions 5.0.x to 5.2.x then you'll either just have to remember to restore line 48 or check PHP versions during preprocessing to decide if 'static' needs to be declared or not.

Re: ssh2-0.10 make--- error ( need help on this)

Posted: Sun Jan 31, 2010 5:19 pm
by Weirdan

Re: ssh2-0.10 make--- error ( need help on this)

Posted: Tue Feb 02, 2010 10:12 pm
by leepolanco
redmonkey wrote:If you are compiling this extension purely for PHP versions 5.3.x and above then you can just remove line 48 from ssh2.c, line 48 should be...

Code: Select all

static
...if you also need to compile the extension for PHP versions 5.0.x to 5.2.x then you'll either just have to remember to restore line 48 or check PHP versions during preprocessing to decide if 'static' needs to be declared or not.


This is correct..
Thanks... I got it working... now..