1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
Description: Fix build problems on hurd-i386
This patch allows Open MPI to build on Debian GNU/HURD.
.
Also, the memory:linux MCA component is disabled, since its use of POSIX API
in malloc hooks called very early at startup causes troubles.
.
Also changes by Samuel Thibault <sthibault@debian.org>
See bugs.debian.org/846965
Author: Pino Toscano <pino@debian.org>
Forwarded: partially
Last-Update: 2018-10-24
Index: openmpi/ompi/include/ompi_config.h
===================================================================
--- openmpi.orig/ompi/include/ompi_config.h 2025-11-13 12:15:05.326539024 +0100
+++ openmpi/ompi/include/ompi_config.h 2025-11-13 12:15:05.320309280 +0100
@@ -28,6 +28,10 @@
#include "opal_config.h"
+#ifndef PATH_MAX /* Hurd */
+#define PATH_MAX 65535
+#endif
+
#define OMPI_IDENT_STRING OPAL_IDENT_STRING
/***********************************************************************
Index: openmpi/opal/mca/base/mca_base_var.c
===================================================================
--- openmpi.orig/opal/mca/base/mca_base_var.c 2025-11-13 12:15:05.326539024 +0100
+++ openmpi/opal/mca/base/mca_base_var.c 2025-11-13 12:15:05.321442824 +0100
@@ -61,6 +61,14 @@
#include "opal/util/printf.h"
#include "opal/util/show_help.h"
+#ifndef MAXPATHLEN /* Hurd */
+#define MAXPATHLEN 65535
+#endif
+
+#ifndef PATH_MAX /* Hurd */
+#define PATH_MAX 65535
+#endif
+
/*
* local variables
*/
Index: openmpi/ompi/mca/fbtl/posix/fbtl_posix_preadv.c
===================================================================
--- openmpi.orig/ompi/mca/fbtl/posix/fbtl_posix_preadv.c 2025-11-13 12:15:05.326539024 +0100
+++ openmpi/ompi/mca/fbtl/posix/fbtl_posix_preadv.c 2025-11-13 12:15:05.322394375 +0100
@@ -39,6 +39,10 @@
static ssize_t mca_fbtl_posix_preadv_single (ompio_file_t *fh, struct flock *lock, int *lock_counter);
+#ifndef IOV_MAX
+#define IOV_MAX 1024
+#endif
+
ssize_t mca_fbtl_posix_preadv (ompio_file_t *fh )
{
ssize_t bytes_read=0;
Index: openmpi/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c
===================================================================
--- openmpi.orig/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c 2025-11-13 12:15:05.326539024 +0100
+++ openmpi/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c 2025-11-13 12:15:05.323135878 +0100
@@ -37,6 +37,10 @@
static ssize_t mca_fbtl_posix_pwritev_generic (ompio_file_t *fh, struct flock *lock, int *lock_counter );
static ssize_t mca_fbtl_posix_pwritev_single (ompio_file_t *fh, struct flock *lock, int *lock_counter );
+#ifndef IOV_MAX
+#define IOV_MAX 1024
+#endif
+
ssize_t mca_fbtl_posix_pwritev(ompio_file_t *fh )
{
ssize_t bytes_written=0;
Index: openmpi/3rd-party/romio341/mpl/src/str/mpl_str.c
===================================================================
--- openmpi.orig/3rd-party/romio341/mpl/src/str/mpl_str.c 2025-11-13 12:14:42.194014704 +0100
+++ openmpi/3rd-party/romio341/mpl/src/str/mpl_str.c 2025-11-13 12:15:53.193653561 +0100
@@ -18,6 +18,11 @@
#include <sys/param.h>
#endif
+/* Non-linux systems like hurd might not define PATH_MAX in param.h */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
#ifdef MPL_HAVE_TIME_H
#include <time.h>
#endif
|