Bug#1120617: openmpi: FTBFS on hurd-amd64 since PATH_MAX is not defined
Drew Parsons
dparsons at debian.org
Thu Nov 13 11:26:41 GMT 2025
Source: openmpi
Followup-For: Bug #1120617
X-Debbugs-Cc: debian-hurd at lists.debian.org
User: debian-hurd at lists.debian.org
Usertags: hurd-amd64
Control: tags -1 ftbfs
Linux sets PATH_MAX to 4096 in /usr/include/linux/limits.h
(included in sys/param.h)
We already have a debian patch for hurd, so easy to update it to add
3rd-party/romio341/mpl/src/str/mpl_str.c.
Updated build_hurd patch attached (patched against salsa debian/latest)
-------------- next part --------------
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 at debian.org>
See bugs.debian.org/846965
Author: Pino Toscano <pino at 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
More information about the debian-science-maintainers
mailing list