php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80466 compile issue with PHP 8
Submitted: 2020-12-02 09:40 UTC Modified: 2021-01-14 12:49 UTC
Votes:3
Avg. Score:4.3 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:2 (66.7%)
From: shop1 at mokraemer dot de Assigned: cmb (profile)
Status: Duplicate Package: ssh2 (PECL)
PHP Version: 8.0.0 OS: Linux
Private report: No CVE-ID: None
 [2020-12-02 09:40 UTC] shop1 at mokraemer dot de
Description:
------------
Some compile issues arise with compiling this extension for php8:

Some compile issues arise with compiling this extension for php8:

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
ssh2.c:49:2: warning: initialization of 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
ssh2.c:49:2: note: (near initialization for 'php_ssh2_first_arg_force_ref[1].name')
ssh2.c:49:2: error: initializer element is not constant
ssh2.c:49:2: note: (near initialization for 'php_ssh2_first_arg_force_ref[1].name')
ssh2.c: In function 'php_ssh2_debug_cb':
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
ssh2.c: In function 'zif_ssh2_disconnect':
ssh2.c:443:6: error: void value not ignored as it ought to be
  443 |  if (zend_list_close(Z_RES_P(zsession)) != SUCCESS) {
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-03 16:23 UTC] terrafrost@php.net
I have the same issue. Here's a Dockerfile that reproduces the issue:

FROM php:8.0

RUN apt-get update \
    && apt-get -y install libgmp-dev libmcrypt-dev libssh2-1 libssh2-1-dev \
    && pecl install mcrypt ssh2-1.2 \
    && docker-php-ext-install gmp bcmath \
    && docker-php-ext-enable mcrypt ssh2
 [2020-12-29 05:32 UTC] fin at lasermail dot co dot uk
I can confirm that this error is still present.
I would be very interested to know when a fix is found.

Thanks to all in advance
 [2020-12-30 10:22 UTC] shop1 at mokraemer dot de
see bug #80250, there is a patch which works for me
 [2021-01-14 12:49 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2021-01-14 12:49 UTC] cmb@php.net
Duplicate of bug #80250.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 07 17:01:31 2024 UTC