andyrimmer / Platypus

Platypus Variant Caller
GNU General Public License v3.0
105 stars 38 forks source link

Run-time error: cerrormodel.so: undefined symbol: min #52

Open walaj opened 8 years ago

walaj commented 8 years ago

I am trying to build and run Playpus, but am having a run-time issue.

System: RHEL6, Python-2.7, Cython-0.23, GCC-5.1

"make" executes successfully, but when I run something as lite as: python Platypus.py --help

I get:

Traceback (most recent call last):
  File "/xchip/gistic/Jeremiah/GIT/Platypus/bin/Platypus.py", line 9, in <module>
    import runner
  File "/xchip/gistic/Jeremiah/GIT/Platypus/bin/runner.py", line 9, in <module>
    import variantcaller
  File "variant.pxd", line 17, in init variantcaller (cython/variantcaller.c:16975)
  File "variant.pyx", line 1, in init variant (cython/variant.c:10330)
ImportError: /xchip/gistic/Jeremiah/GIT/Platypus/bin/cerrormodel.so: undefined symbol: min

Has anyone on the Platypus team seen this before / know a workaround? I'm puzzled.

Best, Jeremiah

EDIT: More info on the link command for cerrormodel.c , which executes just fine:

gcc -pthread -shared -L/broad/software/free/Linux/redhat_6_x86_64/pkgs/tcltk8.5.9/lib -Wl,-rpath,/broad/software/free/Linux/redhat_6_x86_64/pkgs/tcltk8.5.9 -L/broad/software/free/Linux/redhat_6_x86_64/pkgs/sqlite_3.7.5/lib -Wl,-rpath,/broad/software/free/Linux/redhat_6_x86_64/pkgs/sqlite_3.7.5/lib -Wl,-rpath,/broad/software/free/Linux/redhat_6_x86_64/pkgs/db_4.7.25/lib build/temp.linux-x86_64-2.7/cython/cerrormodel.o build/temp.linux-x86_64-2.7/c/tandem.o -L/broad/software/free/Linux/redhat_6_x86_64/pkgs/python_2.7.1-sqlite3-rtrees/lib -lpython2.7 -o build/lib.linux-x86_64-2.7/cerrormodel.so
walaj commented 8 years ago

I solved this issue with the following patch to my checkout:

In bgzf.c.pysam.c: -- set "packInt16", "unpackInt16", "packInt32" to static

In ksort.h -- set "__ksinsertsort##name" to static -- set "kscombsort##name" to static

In tandem.c -- set "approximate_indel_rate_inline" to static -- set "min" to static -- set "foundmatch" to static

There is probably a more elegant want to correctly link these libraries, but this is the hack that got the code to stop giving me run-time errors

jxmavs commented 8 years ago

I ran into the exact same issue, was unsure why this error was appearing... @andyrimmer , is there any reason why this is happening? thanks for posting this - it did fix it for me as well

anopperl commented 6 years ago

hii :) thanks i using "https://github.com/andyrimmer/Platypus" for install platypus but it giving me error "

Traceback (most recent call last): File "Platypus.py", line 9, in import runner File "/home/anopperl6/Exomesoft/Platypus_0.8.1/runner.py", line 9, in import variantcaller File "htslibWrapper.pxd", line 203, in init variantcaller (variantcaller.c:16971) ImportError: libhts.so.2: cannot open shared object file: No such file or directory