Skip to contentSkip to conversation

package/libqb: needs threads and dynamic library

PATCH New Fabrice Fontaine 2 participants 2 messages Jul 16, 2021 – Jul 18, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/libqb: needs threads and dynamic library

libqb fails to build without threads or dynamic library since the addition of the package in commit 22864d570dd18d78a77dedab8fbcc5e0122c0acc

Also add ac_cv_prog_cc_c99=-std=gnu99 to fix build failure without wchar

Fixes:
- http://autobuild.buildroot.org/results/21c1b5d29da4949f4582056ab4e2335ec225d8d6
- http://autobuild.buildroot.org/results/aa4df6364cdf3c862be13b6b738595f420ec6105
- http://autobuild.buildroot.org/results/376d316094238ba7097e8bdc51960ba38532683a

---
Changes v1 -> v2:
- Fix title (static -> dynamic)

 package/libqb/Config.in    | 5 +++++
 package/libqb/libqb.mk     | 4 ++++
 package/usbguard/Config.in | 4 ++--
 3 files changed, 11 insertions(+), 2 deletions(-)
package/libqb/Config.in +5 -0
index 4ab010ca50..e481835dfc 100644
@@ -1,7 +1,12 @@
 config BR2_PACKAGE_LIBQB
 	bool "libqb"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LIBXML2
 	help
 	  Library for client-server applications
 
 	  https://github.com/ClusterLabs/libqb
+
+comment "libqb needs a toolchain w/ threads, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/libqb/libqb.mk +4 -0
index a0d97d5eb8..a9cf5e3fb9 100644
@@ -13,4 +13,8 @@ LIBQB_INSTALL_STAGING = YES
 LIBQB_AUTORECONF = YES
 LIBQB_DEPENDENCIES = libxml2
 
+# ac_cv_prog_cc_c99 is required for BR2_USE_WCHAR=n because the C99 test
+# provided by autoconf relies on wchar_t.
+LIBQB_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
+
 $(eval $(autotools-package))
package/usbguard/Config.in +2 -2
index 582e9b3852..34e24a2156 100644
@@ -2,9 +2,9 @@ config BR2_PACKAGE_USBGUARD
 	bool "usbguard"
 	depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf
 	depends on BR2_INSTALL_LIBSTDCPP # protobuf
-	depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libqb, protobuf
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # protobuf
-	depends on !BR2_STATIC_LIBS # protobuf
+	depends on !BR2_STATIC_LIBS # libqb, protobuf
 	select BR2_PACKAGE_PROTOBUF
 	select BR2_PACKAGE_LIBQB
 	help
Signature · 1 line
2.30.2
#1 lore raw

PATCH v2 1/1 package/libqb: needs threads and dynamic library

Quoted 11 lines · On Fri, 16 Jul 2021 23:04:32 +0200 Fabrice Fontaine…

libqb fails to build without threads or dynamic library since the addition of the package in commit 22864d570dd18d78a77dedab8fbcc5e0122c0acc

Also add ac_cv_prog_cc_c99=-std=gnu99 to fix build failure without wchar

Fixes:
- http://autobuild.buildroot.org/results/21c1b5d29da4949f4582056ab4e2335ec225d8d6
- http://autobuild.buildroot.org/results/aa4df6364cdf3c862be13b6b738595f420ec6105
- http://autobuild.buildroot.org/results/376d316094238ba7097e8bdc51960ba38532683a

Quoted 4 lines

---
Changes v1 -> v2:
- Fix title (static -> dynamic)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com