Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X: gcc -fopenmp requires DLYD_FALLBACK_LIBRARY_PATH to be set #90

Open
molpopgen opened this issue Mar 5, 2017 · 0 comments
Open

Comments

@molpopgen
Copy link

This seems new, and was noticed when some CI builds using miniconda started failing.

System is El Capitan:

Darwin Kevins-MacBook-Pro-2.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

I created a fresh user account and installed Anaconda/latest/OS X/64 bit/Python 3:

conda --version
conda 4.3.13

I then installed gcc and created the following C file:

#include <stdio.h>

int main(int argc, char **argv)
{
}

Compiling with -fopenmp causes a runtime issue that is fixed by setting DYLD_FALLBACK_LIBRARY_PATH. My understanding is that things are meant to work without declaring these:

Kevins-MacBook-Pro-2:~ condatest$ gcc -o test test.c
Kevins-MacBook-Pro-2:~ condatest$ ./test
Kevins-MacBook-Pro-2:~ condatest$ gcc -fopenmp -o test test.c 
Kevins-MacBook-Pro-2:~ condatest$ ./test
dyld: Library not loaded: @rpath/libgomp.1.dylib
  Referenced from: /Users/condatest/./test
  Reason: image not found
Trace/BPT trap: 5
Kevins-MacBook-Pro-2:~ condatest$ DYLD_FALLBACK_LIBRARY_PATH=$HOME/anaconda3/lib ./test

The issue seems specific to libgomp. Other C libraries work as expected. For example, after "conda install gsl", things work as expected:

Kevins-MacBook-Pro-2:~ condatest$ gcc  -o test test.c -lgsl -lgslcblas
Kevins-MacBook-Pro-2:~ condatest$ ./test
molpopgen added a commit to molpopgen/fwdpy that referenced this issue Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant