I'm trying to load sevenzipbibding library (16.02-2.01) on Linux (CentOS 5.11; java version "1.6.0_41") and I obtain an error:
java -jar Test7z-1.0-SNAPSHOT.jar
net.sf.sevenzipjbinding.SevenZipNativeInitializationException: 7-Zip-JBinding initialization failed: Error loading native library: '/tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so'
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:650)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJARIntern(SevenZip.java:456)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJAR(SevenZip.java:340)
at com.comarch.test7z.Test7z.main(Test7z.java:31)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so: /tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so: ELF file OS ABI invalid
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1784)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.load0(Runtime.java:790)
at java.lang.System.load(System.java:1031)
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:648)
... 3 more
My source code is:
try{SevenZip.initSevenZipFromPlatformJAR();System.out.println("7-Zip-JBinding library was initialized");}catch(SevenZipNativeInitializationExceptione){e.printStackTrace();}
How can I solve my problem?
Best regards,
Janek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
java -jar Test7z-1.0-SNAPSHOT.jar
net.sf.sevenzipjbinding.SevenZipNativeInitializationException: 7-Zip-JBinding initialization failed: Error loading native library: '/tmp/SevenZipJBinding-lHcBaRQG5OxY/lib7-Zip-JBinding.so'
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:650)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJARIntern(SevenZip.java:456)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJAR(SevenZip.java:340)
at com.comarch.test7z.Test7z.main(Test7z.java:30)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/SevenZipJBinding-lHcBaRQG5OxY/lib7-Zip-JBinding.so: /tmp/SevenZipJBinding-lHcBaRQG5OxY/lib7-Zip-JBinding.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1784)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.load0(Runtime.java:790)
at java.lang.System.load(System.java:1031)
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:648)
... 3 more
My Linux is AMD 64.
Is this library 32 bit?
Best regards,
Janek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't think, its possible. It was a test build that proved not to satisfy requirements. So the build configuration wasn't saved. I'm working on a new build process, that should produce correct binaries.
But you can build it yourself. On your system it will be automatically correct for you. Just download the source code and build it using cmake.
Best regards,
Boris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"I'm working on a new build process, that should produce correct binaries."
Correct binaries means binaries that will work on my environment?
When you think, you will finish that?
Best regards,
Janek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I between couple of month and a year. It is hard and it also depends on availability of gcc-docker images with the correct configuration. So hard to predict. I have not only this problem with the builds, but also some other problems, that all should be solved with one build. Keep in mind, that I build 7-Zip-JBinding for multiple platforms and with each release the number of platforms increases.
Building 7-Zip-JBinding locally for only one Linux shouldn't be very easy. It has no dependencies. You just need Java, gcc and cmake. Everything is installable through apt-get. Give it a shot and I will help you doing it.
Kind regards,
Boris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Aaaa, ok. I wish you successfull on this.
I will try to compile it on my environment. I found exact description how to do it in file "README" in chapter "6.1 Compile on Linux", so I will do it step by step.
Thank you for your help and for all your answers.
Best regards,
Janek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have compiled succesfully the newest version of Sevenzipjbinding 16.02-2.01-Linux-amd64 on my old Linux CentOS 5.11. Andi it is working.
Thank you for all your help.
If you want I could send you my builded package sevenzipjbinding-16.02-2.01-Linux-amd64.zip so it can be used for other old Linux users.
Best regards,
Janek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm glad, you have a working version now! If you could send it back to me, it would be cool. I expect more people to be interested in it. You can also publish it on your own resource and I will direct other users to it. As you wish :)
Thank you!
Kind regards,
Boris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've attached this package to this message. I hope it can be available for you. If there is any problem I can send it to any other your e-mail address.
Hi,
I'm trying to load sevenzipbibding library (16.02-2.01) on Linux (CentOS 5.11; java version "1.6.0_41") and I obtain an error:
java -jar Test7z-1.0-SNAPSHOT.jar
net.sf.sevenzipjbinding.SevenZipNativeInitializationException: 7-Zip-JBinding initialization failed: Error loading native library: '/tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so'
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:650)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJARIntern(SevenZip.java:456)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJAR(SevenZip.java:340)
at com.comarch.test7z.Test7z.main(Test7z.java:31)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so: /tmp/SevenZipJBinding-Qh9xZZgZzGj1/lib7-Zip-JBinding.so: ELF file OS ABI invalid
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1784)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.load0(Runtime.java:790)
at java.lang.System.load(System.java:1031)
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:648)
... 3 more
My source code is:
How can I solve my problem?
Best regards,
Janek
Hello Janek,
thank you for the bug report. It's "known issue". For i386 I have a test build, that worked at least for some people. You can try it:
https://sourceforge.net/projects/sevenzipjbind/files/OldFiles/JDownloader-i386-old-linux-problem/sevenzipjbinding-16.02-2.01-Linux-i386-gnu%2B%2B03-and-multiarch%3Dno.zip/download
Kind regards,
Boris
Hello Boris,
It's still a problem.
java -jar Test7z-1.0-SNAPSHOT.jar
net.sf.sevenzipjbinding.SevenZipNativeInitializationException: 7-Zip-JBinding initialization failed: Error loading native library: '/tmp/SevenZipJBinding-lHcBaRQG5OxY/lib7-Zip-JBinding.so'
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:650)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJARIntern(SevenZip.java:456)
at net.sf.sevenzipjbinding.SevenZip.initSevenZipFromPlatformJAR(SevenZip.java:340)
at com.comarch.test7z.Test7z.main(Test7z.java:30)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/SevenZipJBinding-lHcBaRQG5OxY/lib7-Zip-JBinding.so: /tmp/SevenZipJBinding-lHcBaRQG5OxY/lib7-Zip-JBinding.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1784)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.load0(Runtime.java:790)
at java.lang.System.load(System.java:1031)
at net.sf.sevenzipjbinding.SevenZip.loadNativeLibraries(SevenZip.java:648)
... 3 more
My Linux is AMD 64.
Is this library 32 bit?
Best regards,
Janek
Hey Janek,
Yes, its 32 bit library. Just try 32 bit JVM on your ARM64 Linux.
Kind regards,
Boris
Hello Boris,
I have no influence on the JVM version.
Is there possibility to build a 64 bit version of that library?
Best regards,
Janek
Hello Janek,
I don't think, its possible. It was a test build that proved not to satisfy requirements. So the build configuration wasn't saved. I'm working on a new build process, that should produce correct binaries.
But you can build it yourself. On your system it will be automatically correct for you. Just download the source code and build it using cmake.
Best regards,
Boris
Hello Boris,
"I'm working on a new build process, that should produce correct binaries."
Correct binaries means binaries that will work on my environment?
When you think, you will finish that?
Best regards,
Janek
Hello Janek,
I between couple of month and a year. It is hard and it also depends on availability of gcc-docker images with the correct configuration. So hard to predict. I have not only this problem with the builds, but also some other problems, that all should be solved with one build. Keep in mind, that I build 7-Zip-JBinding for multiple platforms and with each release the number of platforms increases.
Building 7-Zip-JBinding locally for only one Linux shouldn't be very easy. It has no dependencies. You just need Java, gcc and cmake. Everything is installable through apt-get. Give it a shot and I will help you doing it.
Kind regards,
Boris
Hello Boris,
Aaaa, ok. I wish you successfull on this.
I will try to compile it on my environment. I found exact description how to do it in file "README" in chapter "6.1 Compile on Linux", so I will do it step by step.
Thank you for your help and for all your answers.
Best regards,
Janek
Hello Boris,
I have compiled succesfully the newest version of Sevenzipjbinding 16.02-2.01-Linux-amd64 on my old Linux CentOS 5.11. Andi it is working.
Thank you for all your help.
If you want I could send you my builded package sevenzipjbinding-16.02-2.01-Linux-amd64.zip so it can be used for other old Linux users.
Best regards,
Janek
Hello Janek,
I'm glad, you have a working version now! If you could send it back to me, it would be cool. I expect more people to be interested in it. You can also publish it on your own resource and I will direct other users to it. As you wish :)
Thank you!
Kind regards,
Boris
Hello Boris,
I've attached this package to this message. I hope it can be available for you. If there is any problem I can send it to any other your e-mail address.
Best regards,
Janek