{"action":"created","issue":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/2068","repository_url":"https://api.github.com/repos/open-mpi/ompi","labels_url":"https://api.github.com/repos/open-mpi/ompi/issues/2068/labels{/name}","comments_url":"https://api.github.com/repos/open-mpi/ompi/issues/2068/comments","events_url":"https://api.github.com/repos/open-mpi/ompi/issues/2068/events","html_url":"https://github.com/open-mpi/ompi/issues/2068","id":176237705,"number":2068,"title":"DYLD_FALLBACK_LIBRARY_PATH ignored on MacOS X","user":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-11T10:40:48Z","updated_at":"2016-09-12T09:23:22Z","closed_at":null,"body":"I am trying to build OpenMPI using gfortran on a MacOS X, specifically trying to make a [conda](https://github.com/conda/conda) package. In particular, I need to make sure the fortran bindings are included. The gfortran compiler included in conda produces binaries that include an ``@rpath``:\r\n\r\n```\r\n$ otool -L a.out\r\na.out:\r\n\t@rpath/./libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)\r\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)\r\n\t/Users/tom/miniconda3/envs/dev35/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)\r\n\t@rpath/./libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)\r\n```\r\n\r\nFor other packages, the workaround has been to set ``DYLD_FALLBACK_LIBRARY_PATH`` to the appropriate path, but this doesn't seem to work with OpenMPI, and the configure step fails with:\r\n\r\n```\r\nconfigure:33210: gfortran -o conftest   -arch x86_64  conftest.f  >&5\r\nconfigure:33210: $? = 0\r\nconfigure:33210: ./conftest\r\ndyld: Library not loaded: @rpath/./libgfortran.3.dylib\r\n  Referenced from: /Users/tom/miniconda3/conda-bld/._1473589995858/work/openmpi-2.0.0/./conftest\r\n  Reason: image not found\r\n./configure: line 4975: 95039 Trace/BPT trap: 5       ./conftest$ac_exeext\r\nconfigure:33210: $? = 133\r\nconfigure: program exited with status 133\r\nconfigure: failed program was:\r\n|       program main\r\n| \r\n|       end\r\nconfigure:33226: result: no\r\nconfigure:33240: error: Could not run a simple Fortran program.  Aborting.\r\n```\r\n\r\nTo reproduce the full issue, you need a conda installation and you can then do:\r\n\r\n```\r\ngit clone http://github.com/astrofrog/openmpi-feedstock.git\r\ncd openmpi-feedstock/\r\ngit checkout fortran-osx\r\nconda build .\r\n```\r\n\r\nIn the last part, the build script looks like\r\n\r\n```bash\r\nOPTS=\"\"\r\n\r\nif [ \"$(uname)\" == \"Darwin\" ]; then\r\n    export DYLD_FALLBACK_LIBRARY_PATH=\"${PREFIX}/lib\"\r\n    export CC=clang\r\n    export CXX=clang++\r\n    export MACOSX_DEPLOYMENT_TARGET=\"10.9\"\r\n    export CXXFLAGS=\"-stdlib=libc++ $CXXFLAGS\"\r\n    export CXXFLAGS=\"$CXXFLAGS -stdlib=libc++\"\r\n    export LIBRARY_PATH=\"${PREFIX}/lib\"\r\n    export LD_LIBRARY_PATH=\"${PREFIX}/lib\"\r\nfi\r\n\r\nls $DYLD_FALLBACK_LIBRARY_PATH\r\n\r\necho 'program test; end program test' > test.f90\r\ngfortran test.f90\r\n./a.out\r\n\r\n./configure --prefix=$PREFIX \\\r\n            --disable-dependency-tracking\r\n\r\n\r\nmake -j $CPU_COUNT\r\nmake check\r\nmake install\r\n```\r\n\r\nNote that I do a test compilation before running ./configure, and that runs fine provided I have set ``$DYLD_FALLBACK_LIBRARY_PATH``. So it really does seem like a case of ``$DYLD_FALLBACK_LIBRARY_PATH`` being ignored inside the ``configure`` process."},"comment":{"url":"https://api.github.com/repos/open-mpi/ompi/issues/comments/246293801","html_url":"https://github.com/open-mpi/ompi/issues/2068#issuecomment-246293801","issue_url":"https://api.github.com/repos/open-mpi/ompi/issues/2068","id":246293801,"user":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T09:23:22Z","updated_at":"2016-09-12T09:23:22Z","body":"Huh but a.env should contain the environment variable... I'll try and investigate further."}}
{"actor":{"display_login":"astrofrog"}}