Source: condor Version: 7.8.2~dfsg.1-1 Severity: normal Tags: patch User: debian-al...@lists.debian.org Usertags: alpha X-Debbugs-CC: debian-al...@lists.debian.org
condor FTBFS on Alpha due to the missing getpid and getppid syscalls: [50%] Building CXX object src/condor_utils/CMakeFiles/condor_utils.dir/__/condor_daemon_core.V6/daemon_core.cpp.o cd "/«PKGBUILDDIR»/obj-alpha-linux-gnu/src/condor_utils" && /usr/bin/c++ -Dcondor_utils_EXPORTS -D_FORTIFY_SOURCE=2 -DLINUX=\"LINUX_3.2.25-TITAN-AP+\" -DPLATFORM=\"ALPHA-Debian_\" -DPRE_RELEASE_STR="\" Debian-7.8.2~dfsg.1-1\"" -DCONDOR_VERSION=\"7.8.2\" -DBUILD_DATE="\"Aug 16 2012\"" -DHAVE_CONFIG_H -DWITH_OPENSSL -DGLIBC=GLIBC -DGLIBC213=GLIBC213 -DALPHA=ALPHA -DENABLE_STATE_DUMP -Wall -W -Wextra -Wfloat-equal -Wshadow -Wendif-labels -Wpointer-arith -Wcast-qual -Wcast-align -Wvolatile-register-var -fstack-protector -rdynamic -g -fPIC -I"/«PKGBUILDDIR»/obj-alpha-linux-gnu/bld_external/classads-7.8.2/install/include" -I/usr/include/globus -I/usr/lib64/globus/include -I/usr/lib/globus/include -I/usr/local/globus/include/globus -I"/«PKGBUILDDIR»/src/condor_includes" -I"/«PKGBUILDDIR»/obj-alpha-linux-gnu/src/condor_includes" -I"/«PKGBUILDDIR»/src/condor_utils" -I"/«PKGBUILDDIR»/obj-alpha-linux-gnu/src/condor_utils" -I"/«PKGBUILDDIR»/src/condor_daemon_core.V6" -I"/«PKGBUILDDIR»/src/condor_daemon_client" -I"/«PKGBUILDDIR»/src/ccb" -I"/«PKGBUILDDIR»/src/condor_io" -I"/«PKGBUILDDIR»/src/h" -I"/«PKGBUILDDIR»/obj-alpha-linux-gnu/src/h" -I"/«PKGBUILDDIR»/src/classad" -I"/«PKGBUILDDIR»/src/safefile" -I"/«PKGBUILDDIR»/obj-alpha-linux-gnu/src/safefile" -o CMakeFiles/condor_utils.dir/__/condor_daemon_core.V6/daemon_core.cpp.o -c "/«PKGBUILDDIR»/src/condor_daemon_core.V6/daemon_core.cpp" /«PKGBUILDDIR»/src/condor_daemon_core.V6/daemon_core.cpp:1:0: warning: -fstack-protector not supported for this target [enabled by default] /«PKGBUILDDIR»/src/condor_daemon_core.V6/daemon_core.cpp: In member function 'pid_t CreateProcessForkit::clone_safe_getpid()': /«PKGBUILDDIR»/src/condor_daemon_core.V6/daemon_core.cpp:5326:17: error: 'SYS_getpid' was not declared in this scope /«PKGBUILDDIR»/src/condor_daemon_core.V6/daemon_core.cpp: In member function 'pid_t CreateProcessForkit::clone_safe_getppid()': /«PKGBUILDDIR»/src/condor_daemon_core.V6/daemon_core.cpp:5335:17: error: 'SYS_getppid' was not declared in this scope Full build log is at: http://buildd.debian-ports.org/status/fetch.php?pkg=condor&arch=alpha&ver=7.8.2~dfsg.1-1&stamp=1345139577 Alpha Linux provides the getxpid syscall (to be compatible with OSF/1). I attach a patch that patches condor to use the getxpid syscall when compiled on Alpha. Cheers Michael.
--- condor-7.8.2~dfsg.1/src/condor_daemon_core.V6/daemon_core.cpp 2012-08-16 18:19:43.000000000 +1200 +++ condor-7.8.2~dfsg.1-new/src/condor_daemon_core.V6/daemon_core.cpp 2012-08-26 13:43:06.000000000 +1200 @@ -5323,7 +5323,11 @@ // the pid of the parent process (presumably due to internal // caching in libc). Therefore, use the syscall to get // the answer directly. +#ifdef __alpha__ + return syscall(SYS_getxpid); +#else return syscall(SYS_getpid); +#endif #else return ::getpid(); #endif @@ -5332,7 +5336,14 @@ #if HAVE_CLONE // See above comment for clone_safe_getpid() for explanation of // why we need to do this. +#if defined(__alpha__) && defined(__GNUC__) + pid_t ppid; + syscall(SYS_getxpid); + __asm__("mov $20, %0" : "=r"(ppid) : :); + return ppid; +#else return syscall(SYS_getppid); +#endif #else return ::getppid(); #endif