diff mbox series

[wrynose,v2] cmake-native: use bundled nghttp2 with bundled curl

Message ID 20260909135153.4017038-1-deeratho@cisco.com
State New
Headers show
Series [wrynose,v2] cmake-native: use bundled nghttp2 with bundled curl | expand

Commit Message

Deepak Rathore Sept. 9, 2026, 1:51 p.m. UTC
From: Himanshu Jadon <hjadon@cisco.com>

cmake.inc enables system library lookup through
CMAKE_USE_SYSTEM_LIBRARIES=1. cmake-native already keeps curl bundled,
but it did not also disable system nghttp2 lookup. With CMake 4.3.1,
the bundled cmcurl configure can enable nghttp2 when headers are found
on the host. The later compile uses only the OE native sysroot, so the
build can fail with:

  fatal error: nghttp2/nghttp2.h: No such file or directory

Disable system nghttp2 lookup for cmake-native also. This keeps it
consistent with the existing bundled curl setting instead of adding a
new native dependency because the host happened to expose nghttp2
during configure.

Add the bundled cmnghttp2 license checksum because the native build now
uses that copy explicitly.

Signed-off-by: Himanshu Jadon <hjadon@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0b20ba549d6f17af40b9877eb9ab0c52ca62a18c)
Backport note:
CMake 4.3.1 used by Wrynose has the same behavior: with
CMAKE_USE_SYSTEM_LIBRARIES=1 and system curl disabled,
CMAKE_USE_SYSTEM_NGHTTP2 defaults to ON. If the host provides nghttp2,
configure records the host include and library paths, while do_compile
uses only the OE native sysroot. Therefore this setting is needed for
Wrynose as well.
Signed-off-by: Deepak Rathore <deeratho@cisco.com>
---
Changes in v2:
- Clarify that the host nghttp2 detection failure also affects CMake 4.3.1
  used by Wrynose.
- Add a backport note explaining why the setting is required on Wrynose.

 meta/recipes-devtools/cmake/cmake-native_4.3.1.bb | 2 ++
 1 file changed, 2 insertions(+)
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 a859cef151..911155773c 100644
--- a/meta/recipes-devtools/cmake/cmake-native_4.3.1.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_4.3.1.bb
@@ -15,6 +15,7 @@  LIC_FILES_CHKSUM:append = " \
     file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
     file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \
     file://Utilities/cmcurl/COPYING;md5=72f4e9890e99e68d77b7e40703d789b8 \
+    file://Utilities/cmnghttp2/COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec \
     file://Utilities/cmcppdap/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
 "
 
@@ -34,6 +35,7 @@  EXTRA_OECMAKE += "\
     -DCMAKE_DISABLE_FIND_PACKAGE_Libidn2=ON \
     -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
     -DHAVE_SYS_ACL_H=0 \
+    -DCMAKE_USE_SYSTEM_LIBRARY_NGHTTP2=0 \
 "
 
 # Ensure e2fsprogs isn't found on the host to remove a build dependency and reproducible builds.