Source: condor
Version: 8.0.5~dfsg.1-1
Severity: important
Tags: patch
User: [email protected]
Usertags: alpha
Justification: fails to build from source but built in the past
Condor FTBFS on Alpha due to the missing getpid and getppid syscalls. Build
log is at:
http://buildd.debian-ports.org/status/fetch.php?pkg=condor&arch=alpha&ver=8.0.5%7Edfsg.1-1&stamp=1389314332
This bug was once reported as bug #685892, was fixed, but has now reappeared
again presumably due to changes upstream has made in the relevant section of
code.
I attach an updated alpha-fix-getpid.patch patch that now applies cleanly and
fixes the failure to build.
Cheers
Michael
Index: condor-8.0.5~dfsg.1/src/condor_daemon_core.V6/daemon_core.cpp
===================================================================
--- condor-8.0.5~dfsg.1.orig/src/condor_daemon_core.V6/daemon_core.cpp 2014-01-26 12:09:02.000000000 +1300
+++ condor-8.0.5~dfsg.1/src/condor_daemon_core.V6/daemon_core.cpp 2014-01-26 12:17:31.951595080 +1300
@@ -5427,8 +5427,12 @@
// caching in libc). Therefore, use the syscall to get
// the answer directly.
- int retval = syscall(SYS_getpid);
-
+ pid_t retval;
+#ifdef __alpha__
+ retval = syscall(SYS_getxpid);
+#else
+ retval = syscall(SYS_getpid);
+#endif
// If we were fork'd with CLONE_NEWPID, we think our PID is 1.
// In this case, ask the parent!
if (retval == 1) {
@@ -5448,7 +5452,13 @@
// See above comment for clone_safe_getpid() for explanation of
// why we need to do this.
- int retval = syscall(SYS_getppid);
+ pid_t retval;
+#if defined(__alpha__) && defined(__GNUC__)
+ syscall(SYS_getxpid);
+ __asm__("mov $20, %0" : "=r"(retval) : :);
+#else
+ retval = syscall(SYS_getppid);
+#endif
// If ppid is 0, then either Condor is init (DEAR GOD) or we
// were created with CLONE_NEWPID; ask the parent!