Pecl install ssh2, make failed
I'm trying really hard since two hours to install ssh2 with pecl... But all I get is:
/bin/sh /root/ssh2-0.11.0/libtool --mode=compile cc -I. -I/root/ssh2-0.11.0 -DPHP_ATOM_INC -I/root/ssh2-0.11.0/include -I/root/ssh2-0.11.0/main -I/root/ssh2-0.11.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2-0.11.0/ssh2.c -o ssh2.lo
mkdir .libs
cc -I. -I/root/ssh2-0.11.0 -DPHP_ATOM_INC -I/root/ssh2-0.11.0/include -I/root/ssh2-0.11.0/main -I/root/ssh2-0.11.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2-0.11.0/ssh2.c -fPIC -DPIC -o .libs/ssh2.o
/root/ssh2-0.11.0/ssh2.c:52: error: duplicate 'static'
/root/ssh2-0.11.0/ssh2.c: In function 'zif_ssh2_methods_negotiated':
/root/ssh2-0.11.0/ssh2.c:503: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:504: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:508: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:509: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:510: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:511: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:516: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:517: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:518: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c:519: warning: passing argument 4 of 'add_assoc_string_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected 'char *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c: In function 'zif_ssh2_publickey_add':
/root/ssh2-0.11.0/ssh2.c:1045: warning: passing argument 1 of '_efree' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_alloc.h:46: note: expected 'void *' but argument is of type 'const char *'
/root/ssh2-0.11.0/ssh2.c: In function 'zif_ssh2_publickey_list':
/root/ssh2-0.11.0/ssh2.c:1104: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:361: note: expected 'char *' but argument is of type 'const unsigned char *'
/root/ssh2-0.11.0/ssh2.c:1105: warning: passing argument 4 of 'add_assoc_stringl_ex' discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:361: note: expected 'char *' but argument is of type 'const unsigned char *'
make: *** [ssh2.lo] Error 1
I looked on google a lot, I found some patches which didn't worked at all. So if you think you could help me, go ahead!
Thanks!
I know this is an old post but thought I would answer it as I have just come across the same error and had to fix it. Not sure if you found this patch on your travels but it worked for me.
The link bellow will lead you to patch that should fix this build error
http://pecl.php.net/bugs/bug.php?id=16727&edit=1