package/apache: fix build
PATCH 1/1 package/apache: fix build
When cross-compiling apache wrongly detects that gettid is usable via syscall() due to AC_TRY_RUN being used in configure.in:
https://github.com/apache/httpd/blob/2.4.62/configure.in#L533
Add ac_cv_func_gettid=no to fix the problem.
Fixes:
http://autobuild.buildroot.net/results/2f6/2f6b7bbb4c97e4c91b3abd6bb205e237e57045fa/
and many more.
The bug was introduced by bumping apache to 2.4.59 with buildroot commit e0bbfaea0e983c1ce42a9c3085f3ca3dd796852f which includes
https://github.com/apache/httpd/commit/008e6afcfdae36bce1b5f3fc0cb9519375fd99cf
--- package/apache/apache.mk | 1 + 1 file changed, 1 insertion(+)
package/apache/apache.mk +1 -0
@@ -21,6 +21,7 @@ APACHE_DEPENDENCIES = host-pkgconf apr apr-util pcre2 APACHE_CONF_ENV= \ ap_cv_void_ptr_lt_long=no \ + ac_cv_func_gettid=no \ PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre2-config ifeq ($(BR2_PACKAGE_APACHE_MPM_EVENT),y)
Signature · 6 lines
2.39.5 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
package/apache/apache.mk APACHE_DEPENDENCIES = host-pkgconf apr apr-util pcre2 · line 24
Quoted 9 lines · On Mon, 28 Oct 2024 20:26:09 +0100 Bernd Kuhls <[email protected]> wrote:
package/apache/apache.mk +1
-0@@ -21,6 +21,7 @@ APACHE_DEPENDENCIES = host-pkgconf apr apr-util pcre2 APACHE_CONF_ENV= \ ap_cv_void_ptr_lt_long=no \ + ac_cv_func_gettid=no \
I'm afraid this is not the proper fix. You're pointing to a build issue on glibc, which does provide gettid(), which is why the test successfully detects it. The issue comes from the fact that the apache code forgets to include <unistd.h> with _GNU_SOURCE defined, which is needed to access gettid().
See https://man7.org/linux/man-pages/man2/gettid.2.html.
Could you have a look into this, and submit a patch to upstream Apache?
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot