php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80250 Cannot compile ssh2 extension
Submitted: 2020-10-17 13:14 UTC Modified: 2021-01-14 13:19 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: 51w_ozhj at powerencry dot com Assigned: cmb (profile)
Status: Closed Package: ssh2 (PECL)
PHP Version: 8.0.0RC2 OS: Linux 5.8.15-301.fc33.x86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 + 19 = ?
Subscribe to this entry?

 
 [2020-10-17 13:14 UTC] 51w_ozhj at powerencry dot com
Description:
------------
ssh2 extension cannot be compiled.
gcc version 10.2.1 20201005 (Red Hat 10.2.1-5) (GCC)

git clone --depth 1 https://git.php.net/repository/pecl/networking/ssh2.git /root/ssh2

cd /root/ssh2 && \
    phpize && ./configure && \
    make -j4 && make install

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
/bin/sh /root/ssh2/libtool --mode=compile cc -I. -I/root/ssh2 -I/root/ssh2/include -I/root/ssh2/main -I/root/ssh2 -I/root/release/php/include/php -I/root/release/php/include/php/main -I/root/release/php/include/php/TSRM -I/root/release/php/include/php/Zend -I/root/release/php/include/php/ext -I/root/release/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /root/ssh2/ssh2.c -o ssh2.lo
/bin/sh /root/ssh2/libtool --mode=compile cc -I. -I/root/ssh2 -I/root/ssh2/include -I/root/ssh2/main -I/root/ssh2 -I/root/release/php/include/php -I/root/release/php/include/php/main -I/root/release/php/include/php/TSRM -I/root/release/php/include/php/Zend -I/root/release/php/include/php/ext -I/root/release/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /root/ssh2/ssh2_fopen_wrappers.c -o ssh2_fopen_wrappers.lo
/bin/sh /root/ssh2/libtool --mode=compile cc -I. -I/root/ssh2 -I/root/ssh2/include -I/root/ssh2/main -I/root/ssh2 -I/root/release/php/include/php -I/root/release/php/include/php/main -I/root/release/php/include/php/TSRM -I/root/release/php/include/php/Zend -I/root/release/php/include/php/ext -I/root/release/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -c /root/ssh2/ssh2_sftp.c -o ssh2_sftp.lo
mkdir .libs
 cc -I. -I/root/ssh2 -I/root/ssh2/include -I/root/ssh2/main -I/root/ssh2 -I/root/release/php/include/php -I/root/release/php/include/php/main -I/root/release/php/include/php/TSRM -I/root/release/php/include/php/Zend -I/root/release/php/include/php/ext -I/root/release/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2/ssh2_fopen_wrappers.c  -fPIC -DPIC -o .libs/ssh2_fopen_wrappers.o
 cc -I. -I/root/ssh2 -I/root/ssh2/include -I/root/ssh2/main -I/root/ssh2 -I/root/release/php/include/php -I/root/release/php/include/php/main -I/root/release/php/include/php/TSRM -I/root/release/php/include/php/Zend -I/root/release/php/include/php/ext -I/root/release/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2/ssh2.c  -fPIC -DPIC -o .libs/ssh2.o
 cc -I. -I/root/ssh2 -I/root/ssh2/include -I/root/ssh2/main -I/root/ssh2 -I/root/release/php/include/php -I/root/release/php/include/php/main -I/root/release/php/include/php/TSRM -I/root/release/php/include/php/Zend -I/root/release/php/include/php/ext -I/root/release/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/ssh2/ssh2_sftp.c  -fPIC -DPIC -o .libs/ssh2_sftp.o
/root/ssh2/ssh2.c:49:2: warning: implicit declaration of function 'ZEND_ARG_PASS_INFO'; did you mean 'ZEND_ARG_OBJ_INFO'? [-Wimplicit-function-declaration]
   49 |  ZEND_ARG_PASS_INFO(1)
      |  ^~~~~~~~~~~~~~~~~~
      |  ZEND_ARG_OBJ_INFO
/root/ssh2/ssh2.c:49:2: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
/root/ssh2/ssh2.c:49:2: note: (near initialization for 'php_ssh2_first_arg_force_ref[1].name')
/root/ssh2/ssh2.c:49:2: error: initializer element is not constant
/root/ssh2/ssh2.c:49:2: note: (near initialization for 'php_ssh2_first_arg_force_ref[1].name')
/root/ssh2/ssh2.c: In function 'php_ssh2_debug_cb':
/root/ssh2/ssh2.c:103:17: warning: implicit declaration of function 'call_user_function_ex'; did you mean 'call_user_function'? [-Wimplicit-function-declaration]
  103 |  if (FAILURE == call_user_function_ex(NULL, NULL, data->disconnect_cb, NULL, 3, args, 0, NULL)) {
      |                 ^~~~~~~~~~~~~~~~~~~~~
      |                 call_user_function
/root/ssh2/ssh2.c: In function 'zif_ssh2_disconnect':
/root/ssh2/ssh2.c:443:6: error: void value not ignored as it ought to be
  443 |  if (zend_list_close(Z_RES_P(zsession)) != SUCCESS) {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ssh2/ssh2.c:443:41: error: invalid operands to binary != (have 'const zend_internal_arg_info[1]' {aka 'const struct _zend_internal_arg_info[1'} and 'int')
  443 |  if (zend_list_close(Z_RES_P(zsession)) != SUCCESS) {
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~
      |      |
      |      void
/root/ssh2/ssh2_sftp.c:203:2: warning: initialization of 'ssize_t (*)(php_stream *, const char *, size_t)' {aka 'long int (*)(struct _php_stream *,const char *, long unsigned int)'} from incompatible pointer type 'size_t (*)(php_stream *, const char *, size_t)' {aka 'long unsigned int (*)(struct _php_stream *, const char *, long unsigned int)'} [-Wincompatible-pointer-types]
  203 |  php_ssh2_sftp_stream_write,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ssh2/ssh2_sftp.c:203:2: note: (near initialization for 'php_ssh2_sftp_stream_ops.write')
/root/ssh2/ssh2_sftp.c:204:2: warning: initialization of 'ssize_t (*)(php_stream *, char *, size_t)' {aka 'long int (*)(struct _php_stream *, char *, long unsigned int)'} from incompatible pointer type 'size_t (*)(php_stream *, char *, size_t)' {aka 'long unsigned int (*)(struct _php_stream *, char *, long unsigned int)'} [-Wincompatible-pointer-types]
  204 |  php_ssh2_sftp_stream_read,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/ssh2/ssh2_sftp.c:204:2: note: (near initialization for 'php_ssh2_sftp_stream_ops.read')
/root/ssh2/ssh2_sftp.c:309:2: warning: initialization of 'ssize_t (*)(php_stream *, char *, size_t)' {aka 'long int (*)(struct _php_stream *, char *, long unsigned int)'} from incompatible pointer type 'size_t (*)(php_stream *, char *, size_t)' {aka 'long unsigned int (*)(struct _php_stream *, char *, long unsigned int)'} [-Wincompatible-pointer-types]
  309 |  php_ssh2_sftp_dirstream_read,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ssh2/ssh2_sftp.c:309:2: note: (near initialization for 'php_ssh2_sftp_dirstream_ops.read')
make: *** [Makefile:209: ssh2.lo] Error 1
make: *** Waiting for unfinished jobs....
/root/ssh2/ssh2_fopen_wrappers.c:184:2: warning: initialization of 'ssize_t (*)(php_stream *, const char *, size_t)' {aka 'long int (*)(struct _php_stream *, const char *, long unsigned int)'} from incompatible pointer type 'size_t (*)(php_stream *, const char *, size_t)' {aka 'long unsigned int (*)(struct _php_stream *, const char *, long unsigned int)'} [-Wincompatible-pointer-types]
  184 |  php_ssh2_channel_stream_write,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ssh2/ssh2_fopen_wrappers.c:184:2: note: (near initialization for 'php_ssh2_channel_stream_ops.write')
/root/ssh2/ssh2_fopen_wrappers.c:185:2: warning: initialization of 'ssize_t (*)(php_stream *, char *, size_t)' {aka 'long int (*)(struct _php_stream *, char *, long unsigned int)'} from incompatible pointer type 'size_t (*)(php_stream *, char *, size_t)' {aka 'long unsigned int (*)(struct _php_stream *, char *, long unsigned int)'} [-Wincompatible-pointer-types]
  185 |  php_ssh2_channel_stream_read,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ssh2/ssh2_fopen_wrappers.c:185:2: note: (near initialization for 'php_ssh2_channel_stream_ops.read')



Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-17 13:27 UTC] cmb@php.net
-Summary: 无法编译 ssh2 扩展 +Summary: Cannot compile ssh2 extension
 [2020-10-18 22:16 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix for PHP 7.4 and 8
On GitHub:  https://github.com/php/pecl-networking-ssh2/pull/44
Patch:      https://github.com/php/pecl-networking-ssh2/pull/44.patch
 [2021-01-14 13:19 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC