Req #76238 [Com]: Warning when compiling with latest OpenSSL and XML libraries

From: Date: Wed, 03 Feb 2021 04:31:03 +0000
Subject: Req #76238 [Com]: Warning when compiling with latest OpenSSL and XML libraries
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231896@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76238&edit=1

 ID:                 76238
 Comment by:         harbercandelario6kzj at gmail dot com
 Reported by:        dev dot dertin at gmail dot com
 Summary:            Warning when compiling with latest OpenSSL and XML
                     libraries
 Status:             Verified
 Type:               Feature/Change Request
 Package:            Compile Warning
 Operating System:   Debian 9
 PHP Version:        7.2.4
 Block user comment: N
 Private report:     N

 New Comment:

Using the version of iOS and Apple's new dual-core A5 processor, ipad2 is likely to deliver
substantially Whatsapp GB performance. Even twice as quickly the olderiPad claimed by Iphone. And
let's look to be found at Otherwhatsapp.com and strategies about how it relates to Whatsapp GB.
The graphic performanceis believed be nine times faster than your old ipad booklet. New version of
iOS let's you affect what mute move to a rotation lock. Download whatsapp gb here: https://otherwhatsapp.com/


Previous Comments:
------------------------------------------------------------------------
[2018-05-02 12:46:16] r1d3r at abv dot bg

on ubuntu 18.04 curl which has certificate stopped working for me. I am hoping that those openssl
warnings are going to be resolved and curl_setopt($ch, CURLOPT_SSLCERT, $pemfile);  will start
working again

------------------------------------------------------------------------
[2018-04-19 16:15:34] cmb@php.net

> It seems that the documentation of xmlHashScanner does not fit
> the implementation; a distro issue?

FTR: the prototype has been changed as of libxml 2.9.8[1].

[1] <https://github.com/GNOME/libxml2/commit/e03f0a199a67017b2f8052354cf732b2b4cae787#diff-7eff597457d578c6e602a3b6dc3d2f03R88>

------------------------------------------------------------------------
[2018-04-18 22:14:04] cmb@php.net

Thanks for reporting this issue!  Unless I've overlooked
something, there are acutally four issues:

  (1) TLSv(1|)_(client|server)_method are deprecated
  (2) passing argument 2 of 'xmlHashScan' from incompatible pointer type
  (3) uidna_IDNTo(ASCII|Unicode) are deprecated
  (4) readdir_r is deprecated

(2) does not appear to be a problem, since itemHashScanner[1] does
not even use the name parameter, so declaring that as `const
xmlChar *name` should cure the compiler warning.  (It seems that
the documentation of xmlHashScanner [2] does not fit the
implementation; a distro issue?)

(3) can easily be resolved when INTL_IDNA_VARIANT_2003 will be
removed[3].  Until then there may not be the need to take any
action from our side.

[1] <https://github.com/php/php-src/blob/PHP-7.2.5/ext/dom/dom_iterators.c#L45>
[2] <http://xmlsoft.org/html/libxml-hash.html#xmlHashScanner>
[3] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003>

------------------------------------------------------------------------
[2018-04-18 17:05:11] dev dot dertin at gmail dot com

Description:
------------
PHP 7.2.4
- OpenSSL 1.1.0h
- LibXML2 2.9.8
- Libxslt 1.1.33-rc1

I wonder if you can avoid these warning by creating a patch. Those related to OpenSSL don't
worry me so much, but the XML library I don't know which impact it has, and if this can cause a
problem.

Test script:
---------------
https://travis-ci.org/dertin/lemp-stack-debian

Actual result:
--------------
/var/tmp/php_build/php_src/ext/openssl/xp_ssl.c: In function
'php_openssl_select_crypto_method':
/var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:963:3: warning: 'TLSv1_client_method' is
deprecated [-Wdeprecated-declarations]
   return is_client ? TLSv1_client_method() : TLSv1_server_method();
   ^~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
                 from /usr/local/include/openssl/ssl.h:61,
                 from /var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:34:
/usr/local/include/openssl/ssl.h:1629:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
 ^
/var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:963:3: warning: 'TLSv1_server_method' is
deprecated [-Wdeprecated-declarations]
   return is_client ? TLSv1_client_method() : TLSv1_server_method();
   ^~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
                 from /usr/local/include/openssl/ssl.h:61,
                 from /var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:34:
/usr/local/include/openssl/ssl.h:1628:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) /* TLSv1.0 */
 36m^
/var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:966:3: warning: 'TLSv1_1_client_method' is
deprecated [-Wdeprecated-declarations]
   return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
   ^~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
                 from /usr/local/include/openssl/ssl.h:61,
                 from /var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:34:
/usr/local/include/openssl/ssl.h:1635:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) /* TLSv1.1 */
 ^
/var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:966:3: warning: 'TLSv1_1_server_method' is
deprecated [-Wdeprecated-declarations]
   return is_client ? TLSv1_1_client_method() : TLSv1_1_server_method();
   ^~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
                 from /usr/local/include/openssl/ssl.h:61,
                 from /var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:34:
/usr/local/include/openssl/ssl.h:1634:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) /* TLSv1.1 */
 ^
/var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:974:3: Kwarning: 'TLSv1_2_client_method'
is deprecated [-Wdeprecated-declarations]
   return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
   ^~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
                 from /usr/local/include/openssl/ssl.h:61,
                 from /var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:34:
/usr/local/include/openssl/ssl.h:1641:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) /* TLSv1.2 */
 ^
/var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:974:3: warning: 'TLSv1_2_server_method' is
deprecated [-Wdeprecated-declarations]
   return is_client ? TLSv1_2_client_method() : TLSv1_2_server_method();
   ^~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
                 from /usr/local/include/openssl/ssl.h:61,
                 from /var/tmp/php_build/php_src/ext/openssl/xp_ssl.c:34:
/usr/local/include/openssl/ssl.h:1640:1: note: declared here
 DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) /* TLSv1.2 */
 ^
/var/tmp/php_build/php_src/ext/dom/dom_iterators.c: In function
'php_dom_libxml_hash_iter':
/var/tmp/php_build/php_src/ext/dom/dom_iterators.c:94:19: warning: passing argument 2 of
'xmlHashScan' from incompatible pointer type [-Wincompatible-pointer-types]
   xmlHashScan(ht, itemHashScanner, iter);
                   ^~~~~~~~~~~~~~~
In file included from /usr/local/include/libxml2/libxml/parser.h:18:0,
                 from /var/tmp/php_build/php_src/ext/dom/php_dom.h:33,
                 from /var/tmp/php_build/php_src/ext/dom/dom_iterators.c:28:
/usr/local/include/libxml2/libxml/hash.h:212:4: note: expected 'xmlHashScanner {aka void
(*)(void *, void *, const unsigned char *)}' but argument is of type 'void (*)(void *,
void *, xmlChar *) {aka void (*)(void *, void *, unsigned char *)}'
    xmlHashScan (xmlHashTablePtr table,
    ^~~~~~~~~~~
/var/tmp/php_build/php_src/ext/dom/dom_iterators.c: In function
'php_dom_libxml_notation_iter':
/var/tmp/php_build/php_src/ext/dom/dom_iterators.c:115:19: warning: passing argument 2 of
'xmlHashScan' from incompatible pointer type [-Wincompatible-pointer-types]
   xmlHashScan(ht, itemHashScanner, iter);
                   ^~~~~~~~~~~~~~~
In file included from /usr/local/include/libxml2/libxml/parser.h:18:0,
                 from /var/tmp/php_build/php_src/ext/dom/php_dom.h:33,
                 from /var/tmp/php_build/php_src/ext/dom/dom_iterators.c:28:
/usr/local/include/libxml2/libxml/hash.h:212:4: note: expected 'xmlHashScanner {aka void
(*)(void *, void *, const unsigned char *)}' but argument is of type 'void (*)(void *,
void *, xmlChar *) {aka void (*)(void *, void *, unsigned char *)}'
    xmlHashScan (xmlHashTablePtr table,
    ^~~~~~~~~~~
/var/tmp/php_build/php_src/ext/intl/idn/idn.c: In function 'php_intl_idn_to':
/var/tmp/php_build/php_src/ext/intl/idn/idn.c:227:4: warning: 'uidna_IDNToASCII_57' is
deprecated [-Wdeprecated-declarations]
    converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN,
(int32_t)option, &parse_error, &status);
    ^~~~~~~~~~~~~~~~~
In file included from /usr/include/unicode/platform.h:23:0,
                 from /usr/include/unicode/ptypes.h:50,
                 from /usr/include/unicode/umachine.h:44,
                 from /usr/include/unicode/utypes.h:36,
                 from /usr/include/unicode/uidna.h:20,
                 from /var/tmp/php_build/php_src/ext/intl/idn/idn.c:28:
/usr/include/unicode/uidna.h:673:1: note: declared here
 uidna_IDNToASCII(  const UChar* src, int32_t srcLength,
 ^
/var/tmp/php_build/php_src/ext/intl/idn/idn.c:229:4: warning: 'uidna_IDNToUnicode_57' is
deprecated [-Wdeprecated-declarations]
    converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN,
(int32_t)option, &parse_error, &status);
    ^~~~~~~~~~~~~~~~~
In file included from /usr/include/unicode/platform.h:23:0,
                 from /usr/include/unicode/umachine.h:44,
                 from /usr/include/unicode/utypes.h:36,
                 from /usr/include/unicode/uidna.h:20,
                 from /var/tmp/php_build/php_src/ext/intl/idn/idn.c:28:
/usr/include/unicode/uidna.h:720:1: note: declared here
 uidna_IDNToUnicode(  const UChar* src, int32_t srcLength,
 ^
/var/tmp/php_build/php_src/ext/session/mod_files.c: In function 'ps_files_cleanup_dir':
/var/tmp/php_build/php_src/ext/session/mod_files.c:315:2: warning: 'readdir_r' is
deprecated [-Wdeprecated-declarations]
  while (php_readdir_r(dir, (struct dirent *) dentry, &entry) == 0 && entry) {
  ^~~~~
In file included from /var/tmp/php_build/php_src/Zend/zend_virtual_cwd.h:78:0,
                 from /var/tmp/php_build/php_src/main/php.h:470,
                 from /var/tmp/php_build/php_src/ext/session/mod_files.c:55:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~
/var/tmp/php_build/php_src/main/streams/plain_wrapper.c: In function
'php_plain_files_dirstream_read':
/var/tmp/php_build/php_src/main/streams/plain_wrapper.c:908:2: warning: 'readdir_r' is
deprecated [-Wdeprecated-declarations]
  if (php_readdir_r(dir, (struct dirent *)entry, &result) == 0 && result) {
  ^~
In file included from /var/tmp/php_build/php_src/Zend/zend_virtual_cwd.h:78:0,
                 from /var/tmp/php_build/php_src/main/php.h:470,
                 from /var/tmp/php_build/php_src/main/streams/plain_wrapper.c:21:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76238&edit=1


Thread (17 messages)

« previous php.bugs (#231896) next »