php / php/php-src

FTBFS against OpenSSL 4.0.0

未关闭
#21,762 4 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

@bukka 已经在做这个了。

开始于 2026年4月19日。

Bug Extension: openssl Status: Needs Triage
主要语言
C
星标
40.4k
派生
8.1k
平均合并
2 天 13 小时
30 天内合并 PR
96

描述

Description

OpenSSL 4.0.0 removed a number of deprecated APIs and made ASN1_STRING an opaque type. This causes PHP to fail to build from source, see ftbfs.txt for the output/

FWIW, here is a patch generated by Claude that fixes:

  1. php_openssl.h — adds #ifndef ERR_NUM_ERRORS / #define ERR_NUM_ERRORS 16 /
    #endif after #include <openssl/err.h>. This constant was removed from OpenSSL
    4.0's err.h and is used in the struct definition plus 3 places in openssl.c.
  2. openssl_backend_common.c — replaces three direct ->data/->length member
    accesses on ASN1_STRING (now an opaque typedef) with the public accessors
    ASN1_STRING_get0_data() and ASN1_STRING_length().
  3. xp_ssl.c — same treatment for the GEN_IPADD block: introduces
    ip_data/ip_len locals via the accessors, used in the IPv4 snprintf, IPv6
    length check, and EXPAND_IPV6_ADDRESS macro.

It is failing several TLS-related test, not sure how much of this is removed APIs (the gettext tests are expected, I disable gettext with gettext-tiny on this system):

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
CURLOPT_SSL* basic client auth tests [ext/curl/tests/curl_setopt_ssl.phpt]
Bug #53251 (bindtextdomain with null dir doesn't return old value) [ext/gettext/tests/bug53251.phpt]
#66265: gettext doesn't switch locales within the same script [ext/gettext/tests/bug66267.phpt]
Gettext basic test with en_US locale that should be on nearly every system [ext/gettext/tests/gettext_basic-enus.phpt]
Gettext basic test [ext/gettext/tests/gettext_basic.phpt]
Test if bindtextdomain() returns string id if no directory path is set(if directory path is 'null') [ext/gettext/tests/gettext_bindtextdomain-cwd.phpt]
Test dcgettext() functionality [ext/gettext/tests/gettext_dcgettext.phpt]
Test dgettext() functionality [ext/gettext/tests/gettext_dgettext.phpt]
Test if dngettext() returns the correct translations (optionally plural). [ext/gettext/tests/gettext_dngettext-plural.phpt]
Test ngettext() functionality [ext/gettext/tests/gettext_ngettext.phpt]
Check if textdomain() returns the new domain [ext/gettext/tests/gettext_textdomain-retval.phpt]
Bug #28382 (openssl_x509_parse extensions support) [ext/openssl/tests/bug28382.phpt]
Bug #74796: TLS encryption fails behind HTTP proxy [ext/openssl/tests/bug74796.phpt]
openssl_*() with OPENSSL_KEYTYPE_EC for ec custom params [ext/openssl/tests/ecc_custom_params.phpt]
openssl_x509_parse() tests [ext/openssl/tests/openssl_x509_parse_basic_openssl32.phpt]
sni_server [ext/openssl/tests/sni_server.phpt]
sni_server with separate pk and cert [ext/openssl/tests/sni_server_key_cert.phpt]
tls stream wrapper with min version 1.0 and max version 1.1 [ext/openssl/tests/tls_min_v1.0_max_v1.1_wrapper.phpt]
tls stream wrapper [ext/openssl/tests/tls_wrapper.phpt]
tls stream wrapper when TLS 1.3 available [ext/openssl/tests/tls_wrapper_with_tls_v1.3.phpt]
tlsv1.0 stream wrapper [ext/openssl/tests/tlsv1.0_wrapper.phpt]
tlsv1.1 stream wrapper [ext/openssl/tests/tlsv1.1_wrapper.phpt]
tlsv1.2 stream wrapper [ext/openssl/tests/tlsv1.2_wrapper.phpt]
Killing server should terminate all worker processes [sapi/cli/tests/php_cli_server_pdeathsig.phpt]
=====================================================================

=====================================================================
WARNED TEST SUMMARY
---------------------------------------------------------------------
Test multiple watch elements pointing to the same watchpoint [sapi/phpdbg/tests/watch_006.phpt] (warn: XFAIL section but test passes)
=====================================================================

php-openssl4.txt

ftbfs.txt

PHP Version
PHP 8.5.5 (cli) (built: Apr 14 2026 22:42:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.5, Copyright (c), by Zend Technologies
Operating System

Alpine Linux 3.23.3

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。