- 
                Notifications
    You must be signed in to change notification settings 
- Fork 929
Closed
Milestone
Description
I'm guessing this is also in v4.0.x, v5.0.x, and master, but have not yet confirmed. On Ubuntu 18.04, when configuring Open MPI with:
--prefix=/opt/amazon/openmpi --with-hwloc=/usr --with-libevent=/usr
We end up with wrapper link line:
mpicc --show-me
gcc -I/opt/amazon/openmpi/include -pthread -L/usr/lib -Wl,-rpath -Wl,/usr/lib -Wl,-rpath -Wl,/opt/amazon/openmpi/lib -Wl,--enable-new-dtags -L/opt/amazon/openmpi/lib -lmpi
There are two problems with this link line:
- It appears the code to avoid leaking system includes / library search paths into the CFLAGS/LDFLAGS is not working, given the -L/usr/lib -Wl,-rpath -Wl,/usr/lib.
- We are placing dependency search paths before our -L<libdir>search path, which means that if any of the dependency directories have a libmpi.so installed in them, we will find the wrong libmpi.so and confusion will reign.