All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexis Lothoré via buildroot" <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Alexis Lothoré" <alexis.lothore@bootlin.com>
Subject: [Buildroot] [PATCH] package/openscap: set dependency on C++ support
Date: Mon, 16 Feb 2026 10:40:42 +0100	[thread overview]
Message-ID: <20260216-openscap_cpp-v1-1-3372149da5b0@bootlin.com> (raw)

When the toolchain involved in openscap build does not support C++, the
configure step fails with the following error:

  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - failed
  -- Check for working CXX compiler: /bin/false
  -- Check for working CXX compiler: /bin/false - broken
  CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:73 (message):
    The C++ compiler

      "/bin/false"

    is not able to compile a simple test program.

    It fails with the following output:

      Change Dir: '/home/autobuild/autobuild/instance-6/output-1/build/openscap-1.3.12/buildroot-build/CMakeFiles/CMakeScratch/TryCompile-tUydqI'

      Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_1834b/fast
      make[1]: Entering directory '/home/autobuild/autobuild/instance-6/output-1/build/openscap-1.3.12/buildroot-build/CMakeFiles/CMakeScratch/TryCompile-tUydqI'
      /usr/bin/make  -f CMakeFiles/cmTC_1834b.dir/build.make CMakeFiles/cmTC_1834b.dir/build
      make[2]: Entering directory '/home/autobuild/autobuild/instance-6/output-1/build/openscap-1.3.12/buildroot-build/CMakeFiles/CMakeScratch/TryCompile-tUydqI'
      Building CXX object CMakeFiles/cmTC_1834b.dir/testCXXCompiler.cxx.o
      /bin/false    -o CMakeFiles/cmTC_1834b.dir/testCXXCompiler.cxx.o -c /home/autobuild/autobuild/instance-6/output-1/build/openscap-1.3.12/buildroot-build/CMakeFiles/CMakeScratch/TryCompile-tUydqI/testCXXCompiler.cxx
      make[2]: *** [CMakeFiles/cmTC_1834b.dir/build.make:81: CMakeFiles/cmTC_1834b.dir/testCXXCompiler.cxx.o] Error 1
      make[2]: Leaving directory '/home/autobuild/autobuild/instance-6/output-1/build/openscap-1.3.12/buildroot-build/CMakeFiles/CMakeScratch/TryCompile-tUydqI'
      make[1]: *** [Makefile:134: cmTC_1834b/fast] Error 2
      make[1]: Leaving directory '/home/autobuild/autobuild/instance-6/output-1/build/openscap-1.3.12/buildroot-build/CMakeFiles/CMakeScratch/TryCompile-tUydqI'

    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:11 (project)

  -- Configuring incomplete, errors occurred!
  make: *** [package/pkg-generic.mk:263: /home/autobuild/autobuild/instance-6/output-1/build/openscap-1.3.12/.stamp_configured] Error 1
  make: Leaving directory '/home/autobuild/autobuild/instance-6/buildroot'

Make openscap depend on proper C++ support.

Fixes: https://autobuild.buildroot.org/results/1fe550ffa79f0a083a450ae03fe067a8ab7336be
Fixes: https://autobuild.buildroot.org/results/e9d52b52658544916022050c78dcb137ca6c97e0
Fixes: https://autobuild.buildroot.org/results/4a9c21763aaddb217ee5f8bb8947faad9767baa3
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
 package/openscap/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/openscap/Config.in b/package/openscap/Config.in
index 317055c75327..375fcacc2d05 100644
--- a/package/openscap/Config.in
+++ b/package/openscap/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_OPENSCAP
 	bool "openscap"
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS  # libgcrypt
 	depends on !BR2_STATIC_LIBS # dlfcn.h
+	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_LIBCURL
 	# In theory should build without crypto, but in practice it
 	# doesn't: https://github.com/OpenSCAP/openscap/issues/2310
@@ -19,6 +20,6 @@ config BR2_PACKAGE_OPENSCAP
 	  https://www.open-scap.org/
 	  https://github.com/OpenSCAP/openscap
 
-comment "openscap needs a toolchain w/ dynamic library"
+comment "openscap needs a toolchain w/ C++, dynamic library"
 	depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS
-	depends on BR2_STATIC_LIBS
+	depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP

---
base-commit: 78d38d9ddda81d7c6bff9b520656fe4f46f0f692
change-id: 20260216-openscap_cpp-5e4035d7dbf8

Best regards,
-- 
Alexis Lothoré <alexis.lothore@bootlin.com>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2026-02-16  9:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16  9:40 Alexis Lothoré via buildroot [this message]
2026-02-16  9:56 ` [Buildroot] [PATCH] package/openscap: set dependency on C++ support Thomas Petazzoni via buildroot
2026-02-16 12:59   ` Alexis Lothoré via buildroot
2026-02-16 14:23     ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260216-openscap_cpp-v1-1-3372149da5b0@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=alexis.lothore@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.