* [openembedded-core] [master] [PATCH] cmake-native: disable libidn2 for native build
@ 2026-02-12 5:03 Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-02-16 13:55 ` [OE-core] " Ross Burton
0 siblings, 1 reply; 4+ messages in thread
From: Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco) @ 2026-02-12 5:03 UTC (permalink / raw)
To: openembedded-core
From: Deepak Rathore <deeratho@cisco.com>
CMake's bundled curl forces USE_LIBIDN2 to ON, which makes the build include
<idn2.h>. The native sysroot does not provide that header, so the build fails
and we end up with a native dependency loop. Allow the option to be overridden
and default it to OFF when it is not preset.
Signed-off-by: Deepak Rathore <deeratho@cisco.com>
diff --git a/meta/recipes-devtools/cmake/cmake-native_4.2.2.bb b/meta/recipes-devtools/cmake/cmake-native_4.2.2.bb
index 128fef8a6e..9e1aae379e 100644
--- a/meta/recipes-devtools/cmake/cmake-native_4.2.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_4.2.2.bb
@@ -7,6 +7,7 @@ SRC_URI += "file://OEToolchainConfig.cmake \
file://environment.d-cmake.sh \
file://0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch \
file://0002-CMakeLists.txt-disable-USE_NGHTTP2.patch \
+ file://0003-Disable-libidn2-in-bundled-curl.patch \
"
LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl"
diff --git a/meta/recipes-devtools/cmake/cmake/0003-Disable-libidn2-in-bundled-curl.patch b/meta/recipes-devtools/cmake/cmake/0003-Disable-libidn2-in-bundled-curl.patch
new file mode 100644
index 0000000000..bafa0ae89b
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0003-Disable-libidn2-in-bundled-curl.patch
@@ -0,0 +1,26 @@
+From 7c6b3d07d8087cae729ba7d82602f50b82086e39 Mon Sep 17 00:00:00 2001
+From: Deepak Rathore <deeratho@cisco.com>
+Date: Mon, 10 Feb 2026 00:00:00 +0000
+Subject: [PATCH] cmcurl: disable libidn2 for native build
+
+CMake's bundled curl forces USE_LIBIDN2 to ON, which makes the build include
+<idn2.h>. The native sysroot does not provide that header, so the build fails
+and we end up with a native dependency loop. Allow the option to be overridden
+and default it to OFF when it is not preset.
+
+Upstream-Status: Inappropriate [native-only configuration]
+
+Signed-off-by: Deepak Rathore <deeratho@cisco.com>
+---
+ Utilities/cmcurl/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
+index ab5f1c50c6..c1fb0e3e6d 100644
+--- a/Utilities/cmcurl/CMakeLists.txt
++++ b/Utilities/cmcurl/CMakeLists.txt
+@@ -105,1 +105,3 @@
+-set(USE_LIBIDN2 ON)
++if(NOT DEFINED USE_LIBIDN2)
++ set(USE_LIBIDN2 OFF)
++endif()
--
2.35.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [OE-core] [openembedded-core] [master] [PATCH] cmake-native: disable libidn2 for native build
2026-02-12 5:03 [openembedded-core] [master] [PATCH] cmake-native: disable libidn2 for native build Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
@ 2026-02-16 13:55 ` Ross Burton
2026-02-17 5:22 ` Deepak Rathore
[not found] ` <920657.1771264467737815347@lists.openembedded.org>
0 siblings, 2 replies; 4+ messages in thread
From: Ross Burton @ 2026-02-16 13:55 UTC (permalink / raw)
To: deeratho@cisco.com; +Cc: openembedded-core@lists.openembedded.org
On 12 Feb 2026, at 05:03, Deepak Rathore via lists.openembedded.org <deeratho=cisco.com@lists.openembedded.org> wrote:
> CMake's bundled curl forces USE_LIBIDN2 to ON, which makes the build include
> <idn2.h>. The native sysroot does not provide that header, so the build fails
> and we end up with a native dependency loop. Allow the option to be overridden
> and default it to OFF when it is not preset.
If this is the case then how does cmake-native build without this change?
Ross
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [openembedded-core] [master] [PATCH] cmake-native: disable libidn2 for native build
2026-02-16 13:55 ` [OE-core] " Ross Burton
@ 2026-02-17 5:22 ` Deepak Rathore
[not found] ` <920657.1771264467737815347@lists.openembedded.org>
1 sibling, 0 replies; 4+ messages in thread
From: Deepak Rathore @ 2026-02-17 5:22 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
If I don't include this change then I am not able to build cmake-native package at my end. I am getting compilation failure with cmake-native package as following:
build/tmp/work/x86_64-linux/cmake-native/4.2.3/sources/cmake-4.2.3/Utilities/cmcurl/lib/idn.c:37:10: fatal error: idn2.h: No such file or directory
37 | #include <idn2.h>
| ^~~~~~~~
compilation terminated.
make[2]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/build.make:1062: Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/idn.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 29%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/llist.c.o
And just now, I checked and it is still failed. Are you able to build cmake-native package at your end without any failure?
[-- Attachment #2: Type: text/html, Size: 916 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [OE-core] [openembedded-core] [master] [PATCH] cmake-native: disable libidn2 for native build
[not found] ` <920657.1771264467737815347@lists.openembedded.org>
@ 2026-02-18 17:00 ` Ross Burton
0 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2026-02-18 17:00 UTC (permalink / raw)
To: deeratho@cisco.com; +Cc: Patches and discussions about the oe-core layer
Re-copying the list, as this discussion is related to the patch.
On 16 Feb 2026, at 17:54, Deepak Rathore via Lists.Openembedded.Org <deeratho=cisco.com@lists.openembedded.org> wrote:
>
> Hi Ross,
> I am not able to build cmake-native in my machine and cmake-native is failed during compilation with the following errors:
>
> build/tmp/work/x86_64-linux/cmake-native/4.2.3/sources/cmake-4.2.3/Utilities/cmcurl/lib/idn.c:37:10: fatal error: idn2.h: No such file or directory
> 37 | #include <idn2.h>
> | ^~~~~~~~
> compilation terminated.
> make[2]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/build.make:1062: Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/idn.c.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> [ 29%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/llist.c.o
> And with this patch, i am able to compile cmake-native.
We’ve had no reports of this and our builds are all in containers that don’t have any headers, so this might be on you to root-cause.
Ross
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-18 17:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12 5:03 [openembedded-core] [master] [PATCH] cmake-native: disable libidn2 for native build Deepak Rathore -X (deeratho - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-02-16 13:55 ` [OE-core] " Ross Burton
2026-02-17 5:22 ` Deepak Rathore
[not found] ` <920657.1771264467737815347@lists.openembedded.org>
2026-02-18 17:00 ` [OE-core] " Ross Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox