brinckmann / montepython_public

Public repository for the Monte Python Code
MIT License
93 stars 77 forks source link

ld: library not found for -lwlik #292

Closed westinhuang closed 10 months ago

westinhuang commented 2 years ago

I use python setup.py install to install WMAP likelihood. Then I face the following error during the procedure.

creating build/lib.macosx-10.9-x86_64-3.9
x86_64-apple-darwin13.4.0-clang -bundle -undefined dynamic_lookup -Wl,-rpath,/opt/anaconda3/envs/igwn-py39/lib -L/opt/anaconda3/envs/igwn-py39/lib -Wl,-rpath,/opt/anaconda3/envs/igwn-py39/lib -L/opt/anaconda3/envs/igwn-py39/lib -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/opt/anaconda3/envs/igwn-py39/lib -L/opt/anaconda3/envs/igwn-py39/lib -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /opt/anaconda3/envs/igwn-py39/include -D_FORTIFY_SOURCE=2 -isystem /opt/anaconda3/envs/igwn-py39/include build/temp.macosx-10.9-x86_64-3.9/pywlik.o -lwlik -o build/lib.macosx-10.9-x86_64-3.9/pywlik.cpython-39-darwin.so
ld: library not found for -lwlik
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/opt/anaconda3/envs/igwn-py39/bin/x86_64-apple-darwin13.4.0-clang' failed with exit code 1

It seems that I don't have libwlik file, but I don't where it is or how to create that.

Does anyone know this ?

dchooper commented 1 year ago

Hi,

This is a MacOS problem (and not a MontePython problem). The problem seems to be with the clang compiler (in general, if you are using CLASS as well we do actually recommend switching to gcc instead of clang). Have you seen if this is something you can install via brew or anaconda? If not, I would see if switching to a different compiler solves the problem.

Deanna