diff mbox series

[wrynose,16/55] cmake-native: prevent host libidn2 contamination

Message ID 65bed27e9fb2ba89a1c9093ed13099dd88e126c8.1783289522.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/55] bluez5: fix set volume failure | expand

Commit Message

Yoann Congal July 5, 2026, 10:41 p.m. UTC
From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>

The bundled cmcurl in CMake 4.3.x unconditionally enables USE_LIBIDN2
and calls find_package(Libidn2). On hosts with libidn2-devel installed
(common on RHEL/EL8), this detects the host library during configure
but the compile fails because the compiler is correctly restricted to
the native sysroot:

  fatal error: idn2.h: No such file or directory

This was introduced in the upgrade from CMake 3.28.x to 4.3.x, where
the bundled cmcurl added find_package(Libidn2) for IDN support.

cmake-native does not need IDN support in its internal curl usage.
Use CMAKE_DISABLE_FIND_PACKAGE_Libidn2 to prevent the host package
from being found without patching the source.

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Reviewed-by: Anders Heimer <anders.heimer@est.tech>

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
(cherry picked from commit 861eaeb79f12273baddd24f615997ac78cfcb2a3)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 meta/recipes-devtools/cmake/cmake-native_4.3.1.bb | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/cmake/cmake-native_4.3.1.bb b/meta/recipes-devtools/cmake/cmake-native_4.3.1.bb
index 9ab1f0ce738..a859cef1517 100644
--- a/meta/recipes-devtools/cmake/cmake-native_4.3.1.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_4.3.1.bb
@@ -31,6 +31,7 @@  EXTRA_OECMAKE += "\
     -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
     -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
     -DCMAKE_USE_SYSTEM_LIBRARY_CURL=0 \
+    -DCMAKE_DISABLE_FIND_PACKAGE_Libidn2=ON \
     -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
     -DHAVE_SYS_ACL_H=0 \
 "