[Buildroot] [PATCH 1/1] package/drbd-utils: fix build without threads
Fabrice Fontaine
fontaine.fabrice at gmail.com
Tue Aug 9 17:22:57 UTC 2022
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 at 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
More information about the buildroot
mailing list