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

v2.24 gives "Error loading: libAbra.so", older versions do not #46

Open
chrisamiller opened this issue Sep 15, 2021 · 7 comments
Open

Comments

@chrisamiller
Copy link

On a Ubuntu base image, if I try to use the precompiled abra2-2.24.jar, using command:

java -jar abra2-2.24.jar --in input.bam --out out.abra.bam --ref reference.fa --threads 2 --tmpdir /tmp

I get the following error:

ERROR   Tue Sep 14 23:20:22 CDT 2021    Error loading: libAbra.so from : /tmp/abra2_e0d4e0c6-313a-4445-bb03-44d341dd5c338049499640746259132
java.lang.RuntimeException: Unable to load library: libAbra.so from path [/libAbra.so] into tempdir: [/tmp/abra2_e0d4e0c6-313a-4445-bb03-44d341dd5c33804949964
0746259132]
        at abra.NativeLibraryLoader.load(NativeLibraryLoader.java:50)
        at abra.ReAligner.init(ReAligner.java:1627)
        at abra.ReAligner.reAlign(ReAligner.java:163)
        at abra.ReAligner.run(ReAligner.java:1810)
        at abra.Abra.main(Abra.java:12)
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to load library: libAbra.so from path [/libAbra.so] into tempdir: [/
tmp/abra2_e0d4e0c6-313a-4445-bb03-44d341dd5c338049499640746259132]
        at abra.NativeLibraryLoader.load(NativeLibraryLoader.java:57)
        at abra.ReAligner.init(ReAligner.java:1627)
        at abra.ReAligner.reAlign(ReAligner.java:163)
        at abra.ReAligner.run(ReAligner.java:1810)
        at abra.Abra.main(Abra.java:12)
Caused by: java.lang.RuntimeException: Unable to load library: libAbra.so from path [/libAbra.so] into tempdir: [/tmp/abra2_e0d4e0c6-313a-4445-bb03-44d341dd5c
338049499640746259132]
        at abra.NativeLibraryLoader.load(NativeLibraryLoader.java:50)
        ... 4 more

If I fall back to an older release abra2-2.19.jar, the identical command works just fine, which leads me to suspect something may be wrong with the latest release.

@milkschen
Copy link

I encountered the same issue, and v2.19 also worked for me.

@eboyden
Copy link

eboyden commented Dec 12, 2021

Same experience here. v2.23 works, so it's just the latest version.

@roysomak4
Copy link

Similar experience to @eboyden. v2.23 works.

@sanderdebacker
Copy link

v2.23 works, current version gives this error

@myourshaw
Copy link

#metoo v2.23 works, v2.23 current version gives this error

@marc-sturm
Copy link

I think the reason is that the libAbra.so is missing in the jar file.
It was there in v 2.23.

@eboyden
Copy link

eboyden commented Feb 16, 2024

It appears that the compilation is bad. When I attempted to compile from source, it threw this error, which suggests that libAbra.so isn't created:

g++ -g -O2 -Isrc/main/c -I/include -I/include/linux -shared -fPIC src/main/c/assembler.cpp src/main/c/sg_aligner.cpp -o target/libAbra.so
In file included from src/main/c/assembler.cpp:16:0:
src/main/c/abra_NativeAssembler.h:2:17: fatal error: jni.h: No such file or directory
 #include <jni.h>
                 ^
compilation terminated.
In file included from src/main/c/sg_aligner.cpp:5:0:
src/main/c/abra_NativeSemiGlobalAligner.h:2:17: fatal error: jni.h: No such file or directory
 #include <jni.h>
                 ^
compilation terminated.
make: *** [native] Error 1

jni.h is a Java file in the include directory; the Makefile attempts to point to this directory using the $JAVA_HOME variable. But make fails if this variable isn't properly set, which it wasn't on my system.
To find the java home folder do this:

(base) [user@home]$ mvn -version
Apache Maven 3.0.5 (Red Hat 3.0.5-17)
Maven home: /usr/share/maven
Java version: 1.8.0_191, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-957.1.3.el7.x86_64", arch: "amd64", family: "unix"

So this worked for me, and resulted in a successful build of 2.24:

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64 #Do not include /jre
make
cd ..
ln -s abra2-2.24/target/abra2-2.24-jar-with-dependencies.jar abra2-2.24.jar

May also be relevant to #57

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

7 participants