All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/drbd-utils: fix build without threads
@ 2022-08-09 17:22 Fabrice Fontaine
  2022-08-15 12:36 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-08-09 17:22 UTC (permalink / raw)
  To: buildroot; +Cc: Christophe Vu-Brugier, Fabrice Fontaine

Fix the following build failure without threads raised since bump to
version 9.21.4 in commit e4c81885ed487ccb511c4a4c4f8a8c1aa5180f78:

CompactDisplay.cpp:13:14: fatal error: pthread.h: No such file or directory
   13 |     #include <pthread.h>
      |              ^~~~~~~~~~~

For an unknown reason, previously drbdmon (which unconditionally uses
threads) was always wrongly disabled:

configure:5846: checking whether /home/fabrice/buildroot/output/host/bin/arm-linux-g++ supports C++11 features by default
configure:6141: /home/fabrice/buildroot/output/host/bin/arm-linux-g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.cpp >&5
configure:6141: $? = 0
configure:6149: result: yes
configure:6824: WARNING: No C++11 compiler found, disabling drbdmon build.

The correct activation of drbdmon could be a side-effect of
https://github.com/LINBIT/drbd-utils/commit/b235e83409b0daf5a3454cdc83aec2e5b335d38e

Fixes:
 - http://autobuild.buildroot.org/results/2cc7d771176ccde7539cc93d83e9621d9ada8357

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/drbd-utils/drbd-utils.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/drbd-utils/drbd-utils.mk b/package/drbd-utils/drbd-utils.mk
index 3ab3246f49..c1035191f1 100644
--- a/package/drbd-utils/drbd-utils.mk
+++ b/package/drbd-utils/drbd-utils.mk
@@ -20,6 +20,12 @@ else
 DRBD_UTILS_CONF_OPTS += --with-initscripttype=sysv
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+DRBD_UTILS_CONF_OPTS += --with-drbdmon
+else
+DRBD_UTILS_CONF_OPTS += --without-drbdmon
+endif
+
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 DRBD_UTILS_CONF_OPTS += --with-udev=yes
 DRBD_UTILS_DEPENDENCIES += udev
-- 
2.35.1

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-15 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-09 17:22 [Buildroot] [PATCH 1/1] package/drbd-utils: fix build without threads Fabrice Fontaine
2022-08-15 12:36 ` Thomas Petazzoni via buildroot

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.