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

x86_64 precompiled libraries are badly linked #30

Open
ukch opened this issue Jul 4, 2019 · 0 comments
Open

x86_64 precompiled libraries are badly linked #30

ukch opened this issue Jul 4, 2019 · 0 comments

Comments

@ukch
Copy link

ukch commented Jul 4, 2019

I am trying to build my own library on top of this library. When running my tests, the native C libraries (e.g. libcomplex.so, libfec.so) will not load and I get the following error in Java:

java.lang.UnsatisfiedLinkError: /path/to/org.quietmodem.Quiet/quiet/build/libs/x86_64/libfec.so: /usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at org.quietmodem.Quiet.QuietInit.init(QuietInit.java:15)
	at org.quietmodem.Quiet.FrameTransmitterConfig.<clinit> (FrameTransmitterConfig.java:58)
        ...

Running ldd on the precompiled libfec.so yields this output:

$ ldd libfec.so
libfec.so: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header

(On my system, the correct path for libc.so is /lib/x86_64-linux-gnu/libc.so.6)

Here's some details of my system:

$ uname -r
4.16.0-2-amd64
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

Manually recompiling the libraries seems to resolve the problem. If you think this would be an appropriate solution, I am happy to send a PR with the recompiled libraries.

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

1 participant