[Buildroot] [PATCH 1/1] package/apr: link with -lm

Bernd Kuhls bernd at kuhls.net
Sun Oct 5 12:32:46 UTC 2025


Fixes Apache runtime error:

    /usr/bin/httpd: Relink `/usr/lib64/libapr-1.so.0' with `/lib64/libm.so.6' for IFUNC symbol `modf'

caused by glibc bump to 2.42 with buildroot commit
fb6256c0efbc93d242e9ae2aa2d3b4a2e7fd149c.

Configure check of apr does not detect the need for -lm:
    checking for library containing modf... none required

Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
 package/apr/apr.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/apr/apr.mk b/package/apr/apr.mk
index 1c7553a501..98a7ece620 100644
--- a/package/apr/apr.mk
+++ b/package/apr/apr.mk
@@ -50,6 +50,10 @@ APR_CONF_ENV = \
 	apr_preload_done=yes
 APR_CONFIG_SCRIPTS = apr-1-config
 
+ifeq ($(BR2_PACKAGE_GLIBC),y)
+APR_CONF_ENV += LIBS=-lm
+endif
+
 # Doesn't even try to guess when cross compiling
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
-- 
2.47.3



More information about the buildroot mailing list