JohannesBuchner / cuba

Cuba - a library for multidimensional numerical integration
http://www.feynarts.de/cuba/
GNU Lesser General Public License v3.0
17 stars 6 forks source link

Undefined log_finite #1

Closed iamholger closed 7 years ago

iamholger commented 7 years ago

Hi Johannes,

I build the shared libcuba.so with according to your instructions but when trying to import pycuba in python I get this error:

OSError: /usr/local/lib/libcuba.so: undefined symbol: _ZGVbN2v___log_finite

nm -CD on /usr/local/lib/libcuba.so indeed flags up a few undefined bits: U _ZGVbN2v_log_finite U exp_finite U __pow_finite U __powl_finite

Do you happen to know which library provides these symbols?

Thanks, Holger

iamholger commented 7 years ago

Hi Johannes,

just to report I fixed it by adding libmath explicitly to the gcc command in makesharedlibs.sh as such:

./configure && sed -i "s|-o libcuba.so|-lm -o libcuba.so|g" makesharedlib.sh && ./makesharedlib.sh

Thanks, Holger

JohannesBuchner commented 5 years ago

This should finally be fixed in commit 595ce84e2d893381fe4e15e204ffc7da57c3c91c

Astrokiwi commented 5 years ago

I installed using the instructions here and got the same issue. Git log shows that this is indeed the version that you modified on Feb 27. Using the script suggested by @iamholger resolved the problem.

JohannesBuchner commented 5 years ago

So -lm has to go after $FILES, otherwise it does not work?

Astrokiwi commented 5 years ago

Maybe! I just copied the line above, I'm not the greatest at makefile-fu

lbarosi commented 4 years ago

I am afraid this just be still open. I installed today from github, Multinest, Cuba and PyMultinest into a customized docker cosmobox(from cambant). Everything went fine, except for cuba.

Using the fix above from @ianholger did the job.

JohannesBuchner commented 4 years ago

@lbarosi: Could you test whether modifying the Makefile so that -lm goes after $FILES works?

lbarosi commented 4 years ago

@JohannesBuchner indeed it works.

gcc -shared -Wall  $FILES -lm -o libcuba.so

Also to mention, in documentation an update of library Atlas for DEB installations. (http://johannesbuchner.github.io/PyMultiNest/install.html#prerequisites-for-building-the-libraries),

# sudo apt install libatlas{3-base,-dev}
sudo apt install libatlas{3-base,-base-dev} 
scarlehoff commented 4 years ago

Just wanted to add that I find the same error (and fixed it with the same solution)

JohannesBuchner commented 4 years ago

OK, I ran into this myself and fixed it, but hadn't pushed yet. Please try with the latest commit.