Opened 4 years ago

Closed 3 years ago

#59626 closed defect (fixed)

openmpi @4.0.1: opportunistic linking to libevent

Reported by: p-bro Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mascguy (Christopher Nielsen)
Port: openmpi

Description

Several subports of openmpi (I saw it for openmpi-gcc5 openmpi-gcc7 openmpi-gcc8 openmpi-default) opportunistically link to /opt/local/lib/libevent-#.#.#.dylib, a library provided by the libevent port.

Could not open /opt/local/lib/libevent-2.1.6.dylib: Error opening or reading file (referenced from /opt/local/lib/openmpi-mp/libmca_common_monitoring.50.dylib)
...
 openmpi-gcc5 @4.0.1+fortran
 openmpi-gcc7 @4.0.1+fortran
 openmpi-gcc8 @4.0.1+fortran
 openmpi-default @4.0.1+gcc8

libevent is not listed as one of the dependencies of openmpi (not even indirectly), thus an upgrade of libevent triggers a rev-upgrade rebuild of openmpi, and uninstallation of libevent breaks openmpi.

Here's the section from the openmpi configure process confirming its recognition of libevent and then linking to it:

--- MCA component event:external (m4 configuration macro, priority 90)
checking for MCA component event:external compile mode... static
checking --with-libevent-libdir value... simple ok (unspecified value)
checking for external libevent in... (default search paths)
checking event2/event.h usability... yes
checking event2/event.h presence... yes
checking for event2/event.h... yes
looking for library without search path
checking for library containing event_config_new... -levent
checking for evthread_set_lock_callbacks in -levent... yes
checking for evthread_use_pthreads in -levent_pthreads... yes
checking if external libevent version is 2.0.22 or greater... yes
checking if MCA component event:external can compile... yes

Change History (7)

comment:1 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:2 Changed 3 years ago by mascguy (Christopher Nielsen)

I'll take this. Can someone please assign to me?

comment:3 Changed 3 years ago by mascguy (Christopher Nielsen)

Reviewed the OpenMPI developer docs, and apparently an external libevent is preferred starting with release 4.0.

So we need to decide whether we want the MacPorts version (in which case a formal dependency on libevent is needed), or force OpenMPI to build and use it's own private version.

This decision is beyond my pay grade, however. MacPorts maintainers/managers?

Last edited 3 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:4 Changed 3 years ago by mf2k (Frank Schima)

Owner: set to mascguy
Status: newassigned

comment:5 Changed 3 years ago by mascguy (Christopher Nielsen)

Draft pull requested created. Final decision of internal vs. external libevent usage is still being discussed, but hopefully we'll be able to get consensus within the next few days.

https://github.com/macports/macports-ports/pull/9684

comment:6 Changed 3 years ago by mascguy (Christopher Nielsen)

Updated status of PR from draft, to ready-for-review.

comment:7 Changed 3 years ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In acc4e389631220a06f9bb1a454b4ca7dae461da3/macports-ports (master):

openmpi: force use of macports libevent, to eliminate implicit use when already installed

Fixes: #59626

Note: See TracTickets for help on using tickets.