{"action":"created","issue":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/1776","repository_url":"https://api.github.com/repos/open-mpi/ompi","labels_url":"https://api.github.com/repos/open-mpi/ompi/issues/1776/labels{/name}","comments_url":"https://api.github.com/repos/open-mpi/ompi/issues/1776/comments","events_url":"https://api.github.com/repos/open-mpi/ompi/issues/1776/events","html_url":"https://github.com/open-mpi/ompi/issues/1776","id":159788393,"number":1776,"title":"OpenMPI puts `-L/usr/lib` into `libmpi.la`","user":{"login":"eschnett","id":213514,"avatar_url":"https://avatars.githubusercontent.com/u/213514?v=3","gravatar_id":"","url":"https://api.github.com/users/eschnett","html_url":"https://github.com/eschnett","followers_url":"https://api.github.com/users/eschnett/followers","following_url":"https://api.github.com/users/eschnett/following{/other_user}","gists_url":"https://api.github.com/users/eschnett/gists{/gist_id}","starred_url":"https://api.github.com/users/eschnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eschnett/subscriptions","organizations_url":"https://api.github.com/users/eschnett/orgs","repos_url":"https://api.github.com/users/eschnett/repos","events_url":"https://api.github.com/users/eschnett/events{/privacy}","received_events_url":"https://api.github.com/users/eschnett/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-11T18:57:57Z","updated_at":"2016-06-11T20:39:05Z","closed_at":"2016-06-11T20:39:05Z","body":"OpenMPI 1.10 (and 1.8) put the system library directory `/usr/lib` into the library search path. This leads to the following problem:\r\n- I have installed OpenMPI myself\r\n- I am now building HDF5 with MPI support (using `CC=/my/openmpi/location/bin/mpicc` etc.)\r\n- HDF5 examines the linker flags that OpenMPI needs, and then uses `-L/usr/lib` in its `LDFLAGS`\r\n- The system already has (a different version of) OpenMPI installed in `/usr/lib`\r\n- With `/usr/lib` in the library search path, the compiler picks up a mixture of the system OpenMPI and the OpenMPI I installed, leading to build problems; HDF5's configure then aborts\r\n\r\nSee <https://github.com/LLNL/spack/issues/1038> for details where this was discussed.\r\n\r\nI don't think `/usr/lib` or `/usr/local/lib` should ever be explicitly put into the library search path. These directories contain many libraries, and should thus searched last; all explicitly specified directories need to be search first. Otherwise, it is impossible to use a self-built library instead of a system library.\r\n\r\nI think OpenMPI needs to filter out `/usr/lib` and `/usr/local/lib` (and likewise `/usr/include` and `/usr/local/include`) from its library and include search paths that are stored e.g. in `libmpi.la` or in the `pkgconfig` directory."},"comment":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/comments/225392977","html_url":"https://github.com/open-mpi/ompi/issues/1776#issuecomment-225392977","issue_url":"https://api.github.com/repos/open-mpi/ompi/issues/1776","id":225392977,"user":{"login":"eschnett","id":213514,"avatar_url":"https://avatars.githubusercontent.com/u/213514?v=3","gravatar_id":"","url":"https://api.github.com/users/eschnett","html_url":"https://github.com/eschnett","followers_url":"https://api.github.com/users/eschnett/followers","following_url":"https://api.github.com/users/eschnett/following{/other_user}","gists_url":"https://api.github.com/users/eschnett/gists{/gist_id}","starred_url":"https://api.github.com/users/eschnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eschnett/subscriptions","organizations_url":"https://api.github.com/users/eschnett/orgs","repos_url":"https://api.github.com/users/eschnett/repos","events_url":"https://api.github.com/users/eschnett/events{/privacy}","received_events_url":"https://api.github.com/users/eschnett/received_events","type":"User","site_admin":false},"created_at":"2016-06-11T20:39:05Z","updated_at":"2016-06-11T20:39:05Z","body":"I believe this was caused by the option `--with-verbs=/usr`. I'm now using `--with-verbs` instead. Thanks for the quick reply!"}}
{"actor":{"display_login":"eschnett"}}