[Pkg-openmpi-maintainers] Bug#433142: openmpi: FTBFS on GNU/kFreeBSD

Petr Salinger Petr.Salinger at seznam.cz
Sat Jul 14 20:26:23 UTC 2007


Package: openmpi
Severity: important
Version: 1.2.3-1
Tags: patch
User: glibc-bsd-devel at lists.alioth.debian.org
Usertags: kfreebsd


Hi,

the current version fails to build on GNU/kFreeBSD.

It needs small fixups for munmap hackery and stacktrace.
It also needs to exclude linux specific build-depends.
Please find attached patch with that.

It would be nice if you can ask upstream
to include changes to opal/util/stacktrace.c and
opal/mca/memory/ptmalloc2/opal_ptmalloc2_munmap.c .

Thanks in advance

                         Petr
-------------- next part --------------
diff -u openmpi-1.2.3/debian/control openmpi-1.2.3/debian/control
--- openmpi-1.2.3/debian/control
+++ openmpi-1.2.3/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian OpenMPI Maintainers <pkg-openmpi-maintainers at lists.alioth.debian.org>
 Uploaders: Dirk Eddelbuettel <edd at debian.org>
-Build-Depends: debhelper (>= 5.0.0), dpatch, libibverbs-dev, gfortran, libsysfs-dev, automake, gcc (>= 4:4.1.2)
+Build-Depends: debhelper (>= 5.0.0), dpatch, libibverbs-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], gfortran, libsysfs-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], automake, gcc (>= 4:4.1.2)
 Standards-Version: 3.7.2
 XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-openmpi/openmpi/trunk/
 XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-openmpi/openmpi/trunk/
only in patch2:
unchanged:
--- openmpi-1.2.3.orig/opal/mca/memory/ptmalloc2/opal_ptmalloc2_munmap.c
+++ openmpi-1.2.3/opal/mca/memory/ptmalloc2/opal_ptmalloc2_munmap.c
@@ -26,7 +26,8 @@
 #elif defined(HAVE_SYSCALL)
 #include <syscall.h>
 #include <unistd.h>
-#elif defined(HAVE_DLSYM)
+#endif
+#if defined(HAVE_DLSYM)
 #ifndef __USE_GNU
 #define __USE_GNU
 #endif
@@ -59,7 +60,7 @@
 int
 opal_mem_free_ptmalloc2_munmap(void *start, size_t length, int from_alloc)
 {
-#if !defined(HAVE___MUNMAP) && !defined(HAVE_SYSCALL) && defined(HAVE_DLSYM)
+#if !defined(HAVE___MUNMAP) && !(defined(HAVE_SYSCALL) && defined(__NR_munmap)) && defined(HAVE_DLSYM)
     static int (*realmunmap)(void*, size_t);
 #endif
 
@@ -67,7 +68,7 @@
 
 #if defined(HAVE___MUNMAP)
     return __munmap(start, length);
-#elif defined(HAVE_SYSCALL)
+#elif defined(HAVE_SYSCALL) && defined(__NR_munmap)
     return syscall(__NR_munmap, start, length);
 #elif defined(HAVE_DLSYM)
     if (NULL == realmunmap) {
only in patch2:
unchanged:
--- openmpi-1.2.3.orig/opal/util/stacktrace.c
+++ openmpi-1.2.3/opal/util/stacktrace.c
@@ -145,8 +145,12 @@
             case FPE_FLTDIV: si_code_str = "Floating point divide-by-zero"; break;
             case FPE_FLTOVF: si_code_str = "Floating point overflow"; break;
             case FPE_FLTUND: si_code_str = "Floating point underflow"; break;
+#ifdef FPE_FLTRES
             case FPE_FLTRES: si_code_str = "Floating point inexact result"; break;
+#endif
+#ifdef FPE_FLTINV            
             case FPE_FLTINV: si_code_str = "Invalid floating point operation"; break;
+#endif            
 #ifdef FPE_FLTSUB
             case FPE_FLTSUB: si_code_str = "Subscript out of range"; break;
 #endif


More information about the Pkg-openmpi-maintainers mailing list