Bug 256037 - net/openmpi: Fails to build if net/libfabric is installed
Summary: net/openmpi: Fails to build if net/libfabric is installed
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo Egea Gondolfo
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2021-05-20 17:20 UTC by Martin Birgmeier
Modified: 2021-07-05 23:40 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (danilo)
koobs: maintainer-feedback? (yuri)
koobs: merge-quarterly?


Attachments
patch_Makefile_disable_libfabric (369 bytes, patch)
2021-07-05 23:40 UTC, alt2600
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2021-05-20 17:20:05 UTC
Scenario:
- FreeBSD 12.2 latest (from git)
- latest ports (from git)
- upgrade using portmaster
- tries to upgrade openmpi to latest 4.1.1

Result:
- Build fails with unknown ENODATA referenced from /usr/local/include/rdma/fi_errno.h

Fix:
- in Makefile, add --without-ofi to CONFIGURE_ARGS

Root cause:
- libfabric installs a questionable /usr/local/include/rdma/fi_errno.h which wants ENODATA, and that does not exist in FreeBSD 12.2

-- Martin
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-05-21 02:42:41 UTC
^Triage: Request feedback from net/libfabric maintainer
Comment 2 Yuri Victorovich freebsd_committer 2021-05-26 06:41:18 UTC
Adding CONFLICTS_BUILD=libfabric is also a way to solve this.
Comment 3 Martin Birgmeier 2021-05-26 12:07:34 UTC
Not really because it would preclude using portmaster if libfabric is already installed.

-- Martin
Comment 4 Oleg Sidorkin 2021-05-26 12:16:35 UTC
net/mpich requires libfabric and is required by other ports, so blindly adding CONFLICTS entry will cause some troubles for end users.

mpich workarounds the problem using
#define ENODATA ENOMSG 
in freebsd-specific header

So for my local installation I've just patched libfabric:
-#define       FI_ENODATA              ENODATA         /* No data available */
+#define       FI_ENODATA              ENOMSG          /* No data available */
Comment 5 alt2600 2021-07-05 23:40:42 UTC
Created attachment 226257 [details]
patch_Makefile_disable_libfabric

Not sure what the status of all this is with the header issue, but openmpi is a reasonably important port for workstation use. Openmpi in ports is implied to not support OFI as libfabric is not a listed dependency of it. Openmpi configure automatically pulls it in if it finds it. So can we just do as the original post suggested and turn if off during the configure stage. --without-ofi into CONFIGURE_ARGS . This will ensure its just ignored if installed.

Openmpi then builds fine and installs fine from ports. 

As indicated the problem isn't an OpenMPI issue, but can we at least get that building again for us heathens using live system building/upgrading? 

patch attached

===>  Deinstalling for openmpi
===>   Deinstalling openmpi-4.1.0_1
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        openmpi: 4.1.0_1

Number of packages to be removed: 1

The operation will free 9 MiB.
[1/1] Deinstalling openmpi-4.1.0_1...
[1/1] Deleting files for openmpi-4.1.0_1: 100%
===>  Deinstalling for openmpi
===>   openmpi not installed, skipping
===>  Installing for openmpi-4.1.1
===>  Checking if openmpi is already installed
===>   Registering installation for openmpi-4.1.1
Installing openmpi-4.1.1...