[Buildroot] [PATCH 1/1] package/php: fix OpenSSL detection for SNMP extension
Bernd Kuhls <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Buildroot commit a9e5cf6ac2cb7ba62d23c842899b3f7816eca14c bumped the package to version 8.4.13 which added upstream commit: https://github.com/php/php-src/commit/dbdc79df954a22495d0939eceb3ab4e09ced1c1e introducing changes for netsnmp detection. Since this bump building php with its SNMP extension enabled and openssl globally disabled is broken: /home/autobuild/autobuild/instance-12/output-1/host/lib/gcc/i686-buildroot-linux-gnu/15.3.0/../../../../i686-buildroot-linux-gnu/bin/ld: ext/snmp/snmp.o: in function `snmp_session_set_security': snmp.c:(.text+0x677): undefined reference to `usmHMAC384SHA512AuthProtocol' /home/autobuild/autobuild/instance-12/output-1/host/lib/gcc/i686-buildroot-linux-gnu/15.3.0/../../../../i686-buildroot-linux-gnu/bin/ld: snmp.c:(.text+0x9c2): undefined reference to `usmHMAC192SHA256AuthProtocol' because php configure misdetects the presence of openssl support in netsnmp although it is not present. To fix the problem we add some autoconf variables to forcefully disable OpenSSL support in the SNMP extension when OpenSSL is disabled. The build error could be reproduced with php 8.4.17 but could not be reproduced with php 8.3.24 so a backport to LTS branches should be considered. To reproduce the build error this minimal defconfig can be used: BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_PHP=y BR2_PACKAGE_PHP_EXT_SNMP=y Fixes: https://autobuild.buildroot.org/results/45c9271bf504c8f241544806ad52b82d6efb711a/ Signed-off-by: Bernd Kuhls <[email protected]> --- Gitlab pipelines passed: https://gitlab.com/bkuhls/buildroot/-/commits/3f95ee27031eb6f7bbe082f3a65e398f6882e77a package/php/php.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/php/php.mk b/package/php/php.mk index 05eb4b9092..5e2ff442cb 100644 --- a/package/php/php.mk +++ b/package/php/php.mk @@ -294,6 +294,11 @@ endif ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y) PHP_CONF_OPTS += --with-snmp=$(STAGING_DIR)/usr PHP_DEPENDENCIES += netsnmp +ifeq ($(BR2_PACKAGE_OPENSSL),) +PHP_CONF_ENV += \ + ac_cv_have_decl_usmHMAC192SHA256AuthProtocol=no \ + ac_cv_have_decl_usmHMAC384SHA512AuthProtocol=no +endif endif ifeq ($(BR2_PACKAGE_PHP_EXT_GD),y) -- 2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot