Skip to content

x86_64 precompiled libraries are badly linked #30

@ukch

Description

@ukch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions