From: Thomas Petazzoni Date: Sun, 7 Aug 2016 09:19:11 +0000 (+0200) Subject: procps-ng: fix BR2_STATIC_LIBS=y build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bccca26fb9a18f1afd03dd30c63fcefe85e4d41;p=buildroot.git procps-ng: fix BR2_STATIC_LIBS=y build The procps-ng package currently fails to build on BR2_STATIC_LIBS=y configurations. Indeed, by default NUMA support is enabled, and it requires dlopen(). As hinted by the configure script, passing --disable-numa allows to disable NUMA support. However, once this is done, another issue pops up: dlopen() is also used by the SELinux support. But even when SELinux support is disabled, the procps-ng code incorrectly includes . This is addressed by the addition of a patch. Fixes: http://autobuild.buildroot.net/results/b385bf435085728aece6323a5006ba9fa6631744/ Signed-off-by: Thomas Petazzoni --- diff --git a/package/procps-ng/0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch b/package/procps-ng/0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch new file mode 100644 index 0000000000..dca28fab14 --- /dev/null +++ b/package/procps-ng/0003-ps-output.c-include-dlfcn.h-only-when-necessary.patch @@ -0,0 +1,32 @@ +From 4fc9a348026a945aec8eddffc7613de9cb10b10c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 7 Aug 2016 11:08:26 +0200 +Subject: [PATCH] ps/output.c: include only when necessary + +dlopen() functionality is only used when SELinux support is enabled, so + only needs to be included when ENABLE_LIBSELINUX is +defined. This fixes the build in configurations where is not +available. + +Signed-off-by: Thomas Petazzoni +--- + ps/output.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ps/output.c b/ps/output.c +index 42c04cf..f540832 100644 +--- a/ps/output.c ++++ b/ps/output.c +@@ -46,7 +46,9 @@ + */ + + #include ++#if ENABLE_LIBSELINUX + #include ++#endif + #include + #include + #include +-- +2.7.4 + diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk index 51a70a5dc5..ce0f68a88c 100644 --- a/package/procps-ng/procps-ng.mk +++ b/package/procps-ng/procps-ng.mk @@ -47,4 +47,10 @@ PROCPS_NG_CONF_OPTS += \ --enable-watch8bit endif +# numa support requires libdl, so explicitly disable it when +# BR2_STATIC_LIBS=y +ifeq ($(BR2_STATIC_LIBS),y) +PROCPS_NG_CONF_OPTS += --disable-numa +endif + $(eval $(autotools-package))