jeffdaily / parasail-python

Python bindings for the parasail C library.
Other
87 stars 17 forks source link

Installation issue #7

Closed LizzieWadsworth closed 7 years ago

LizzieWadsworth commented 7 years ago

Tried both installation methods, recieving the same error:

"./.libs/libparasail.so: undefined reference to pow' collect2: error: ld returned 1 exit status make[1]: *** [apps/parasail_stats] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory/home/lizzie/reads/attempt3/pear/format_and_collapse/bowtie_refgenome_index/call_grnas/perms/profiling_and_optimising/parasail-python/parasail-master/parasail-master' make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 233, in install_requires=INSTALL_REQUIRES, File "/usr/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 205, in run build_parasail(libname) File "setup.py", line 193, in build_parasail raise RuntimeError("make failed") RuntimeError: make failed"

Am quite new to programming so unsure whether it's a problem on my machine or with the code. Any ideas?

Thanks Lizzie

jeffdaily commented 7 years ago

I think I found the bug. In the configure script I check for the sqrt() function being defined, but then in the library I used pow(x,0.5) but failed to test in configure whether pow() was provided. I will change the code to use sqrt() instead which should fix this. I will try to do this in a hotfix branch so I can push out a minor release with this fix. I'll keep you posted.

LizzieWadsworth commented 7 years ago

Any update on this? Thanks!

jeffdaily commented 7 years ago

I just pushed out a parasail 1.1.1 C library release that should fix the linking problem with pow(). Please try it and reply back to see if it is truly fixed. Thanks!

LizzieWadsworth commented 7 years ago

No unfortunately now I get the same error but it says "undefined reference to 'sqrt'" instead of "undefined reference to 'pow'". Is it linked to the maths library?

jeffdaily commented 7 years ago

It is supposed to automatically detect whether the math library is necessary. The configure script tests whether the sqrt symbol exists without having to have the math library, in other words, whether the symbol is just part of the C library. Then, if it's not found without it, the link dependency is added to the math library.

Can I get more information about the system you're running on? So that I might be able to reproduce it? Operating system is Linux, but which distribution? Ubuntu? Redhat? Also, which compiler and version. Which version of python are you using?

I'm sorry you're having so much trouble. I'm sure we'll figure this out soon.

Jeff

On Dec 1, 2016, at 4:10 AM, LizzieWadsworth notifications@github.com wrote:

No unfortunately now I get the same error but it says "undefined reference to 'sqrt'" instead of "undefined reference to 'pow'". Is it linked to the maths library?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jeffdaily commented 7 years ago

Fixed! I just pushed out a parasail 1.1.2 C library release that sound fix the problem. (Yes, I know, I've said that before...)

I can't believe I didn't fix it right the first time. Turns out in the configure-based build I wasn't adding libm as a dependency to libparasail even though clearly I was using math functions in a few places inside of libparasail.

While I was at it, I found a similar problem with clock_gettime() in the CMake-based build, except this time it was always linking to libpthread unnecessarily.

Please try again and let me know if you were able to get these python bindings to work!

LizzieWadsworth commented 7 years ago

Now working. Thanks!