From 8a1ae9e0b151063528e67b8b34a1229dc729df3c Mon Sep 17 00:00:00 2001 From: Scott Fan Date: Mon, 17 Feb 2025 10:38:32 +0800 Subject: [PATCH] package/sqlite: fix build issue if C++ is not enabled since bump to 3.49.0 Buildroot commit [1] bumped sqlite to 3.49.0, and commit [2] fixed the package infra. But if the toolchain does not have C++ support enabled, the following error will occur. Error: failed to find: no The reason was CXX has been set to 'no' in the package/Makefile.in file. ifneq ($(BR2_INSTALL_LIBSTDCPP),y) TARGET_CONFIGURE_OPTS += CXX=no endif Then the autosetup script will look for a required path ('no' above), and will exit with an error if not found. To solve it, we can set CXX to 'false' instead of 'no', so that the autosetup script will skip checking for a C++ compiler. Fixes: https://autobuild.buildroot.org/?reason=sqlite-3.49.0 https://autobuild.buildroot.org/results/569a3750681cc10688ac663450dc2773a317bb07/ [1] https://gitlab.com/buildroot.org/buildroot/-/commit/db85638cea3414ca0293cbbb2352e5b0b63a2579 [2] https://gitlab.com/buildroot.org/buildroot/-/commit/a93680be30bc35f7d2465ef576035fb937ea1d64 Signed-off-by: Scott Fan [Julien: add a link to an actual build failure] Signed-off-by: Julien Olivain --- package/sqlite/sqlite.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk index 255ddc937b..8016ff1c4c 100644 --- a/package/sqlite/sqlite.mk +++ b/package/sqlite/sqlite.mk @@ -65,7 +65,9 @@ endif SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)" LDFLAGS="$(SQLITE_LDFLAGS)" define SQLITE_CONFIGURE_CMDS - (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \ + (cd $(@D); $(TARGET_CONFIGURE_OPTS) \ + $(if $(BR2_INSTALL_LIBSTDCPP),,CXX=false) \ + $(SQLITE_CONF_ENV) ./configure \ --prefix=/usr \ --host="$(GNU_TARGET_NAME)" \ --build="$(GNU_HOST_NAME)" \ @@ -87,7 +89,8 @@ define SQLITE_INSTALL_TARGET_CMDS endef define HOST_SQLITE_CONFIGURE_CMDS - (cd $(@D); $(HOST_CONFIGURE_OPTS) $(SQLITE_CONF_ENV) ./configure \ + (cd $(@D); $(HOST_CONFIGURE_OPTS) \ + $(SQLITE_CONF_ENV) ./configure \ --prefix=/usr \ --host="$(GNU_HOST_NAME)" \ --build="$(GNU_HOST_NAME)" \