Bug#816237: procps: FTBFS[!linux]: fails to compile test_process
Package: procps
Version: 2:3.3.11-3
Severity: important
Tags: patch
Hi,
procps FTBFS on kfreebsd and hurd due to:
| gcc -std=gnu99 -DHAVE_CONFIG_H -I. -include ./config.h -I. -I./include -DLOCALEDIR=\"/usr/share/locale\" -Wdate-time -D_FORTIFY_SOURCE=2 -Iproc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -MT lib/test_process.o -MD -MP -MF $depbase.Tpo -c -o lib/test_process.o lib/test_process.c &&\
| mv -f $depbase.Tpo $depbase.Po
| lib/test_process.c:24:23: fatal error: sys/prctl.h: No such file or directory
| compilation terminated.
https://buildd.debian.org/status/fetch.php?pkg=procps&arch=kfreebsd-amd64&ver=2%3A3.3.11-3&stamp=1451806495
What we could do is comment out the Linux-specific include and function
call. It makes test_process rather non-functional, but it seems to not
matter because it doesn't appear to be used during the package build
anyway. I've attached a patch.
Also, the debian/*.install files needed to be updated for these
architectures. I've attached a debdiff for those, tested on
kfreebsd-amd64, but I tried to fix it for hurd-i386 also.
Thanks.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)
Kernel: kFreeBSD 10.1-0-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- a/lib/test_process.c
+++ b/lib/test_process.c
@@ -21,7 +21,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
+#ifdef __linux__
#include <sys/prctl.h>
+#endif
#include "c.h"
#define DEFAULT_SLEEPTIME 300
@@ -78,8 +80,10 @@
sigaction(SIGUSR1, &signal_action, NULL);
sigaction(SIGUSR2, &signal_action, NULL);
+#ifdef __linux__
/* set process name */
prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL);
+#endif
while (sleep_time > 0) {
sleep_time = sleep(sleep_time);
diff -Nru procps-3.3.11/debian/procps.install.hurd procps-3.3.11/debian/procps.install.hurd
--- procps-3.3.11/debian/procps.install.hurd 2016-01-03 06:10:47.000000000 +0000
+++ procps-3.3.11/debian/procps.install.hurd 2016-02-29 00:25:59.000000000 +0000
@@ -1,4 +1,4 @@
# Files to install for hurd systems
-bin/kill bin
-bin/ps bin
+bbin/kill bin/kill.procps
+bbin/ps bin/ps.procps
bin/* /usr/bin
diff -Nru procps-3.3.11/debian/procps.install.kfreebsd procps-3.3.11/debian/procps.install.kfreebsd
--- procps-3.3.11/debian/procps.install.kfreebsd 2016-01-03 06:10:47.000000000 +0000
+++ procps-3.3.11/debian/procps.install.kfreebsd 2016-02-29 00:29:46.000000000 +0000
@@ -1,4 +1,4 @@
# Files to install for kfreebsd systems
-bin/kill bin
-bin/ps bin
+bbin/kill bin/kill.procps
+bbin/ps bin
bin/* /usr/bin
Reply to: