Skip to content

Unable to load liblivekit_ffi.so on android arm 64 #111

Closed
@holofermes

Description

@holofermes

The new liblivekit_ffi.so is not loading on an android phone with arm 64 architecture - I tried on a Samsung S22, and an S24.

This is the error reported by Unity:

Unity LiveKit: System.DllNotFoundException: Unable to load DLL 'livekit_ffi'. Tried the load the following dynamic libraries: Unable to load dynamic library 'livekit_ffi' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "livekit_ffi" not found
Unity   at LiveKit.Internal.NativeMethods.FfiNewRequest (System.Byte* data, System.Int32 len, System.Byte*& dataPtr, System.UIntPtr& dataLen) [0x00000] in <00000000000000000000000000000000>:0 
Unity   at LiveKit.Internal.FfiClient.SendRequest (LiveKit.Proto.FfiRequest request) [0x00000] in <00000000000000000000000000000000>:0 
Unity   at LiveKit.Internal.FFIClients.Requests.FfiRequestWrap`1[T].Send () [0x00000] in <00000000000000000000000000000000>:0 
Unity   at LiveKit.Internal.FFIClients.Requests.FFIBridgeExtensions.SendConnectRequest (LiveKit.Internal.FFIClients.Requests.IFFIBridge ffiBridge, System.String url, System.String authToken, LiveKit.RoomOptions roomOptions) [0x00000] in <00000000000000000000000000000000>:0 

Kind of stabbing in the dark here, but this is what ldd returns on the .so file:

        linux-vdso.so.1 => [vdso] (0x7020c80000)
CANNOT LINK EXECUTABLE "linker64": cannot locate symbol "__assert_fail" referenced by "/data/app/my-apk/lib/arm64/liblivekit_ffi.so"...

And this is what readelf -d returns:

 0x0000000000000001 (NEEDED)             Shared library: [libm.so]
 0x0000000000000001 (NEEDED)             Shared library: [libEGL.so]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so]
 0x0000000000000001 (NEEDED)             Shared library: [liblog.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]

The previous .so works fine, ldd resolves all the dependencies, and readelf -d shows:

 0x0000000000000001 (NEEDED)             Shared library: [libm.so]
 0x0000000000000001 (NEEDED)             Shared library: [libEGL.so]
 0x0000000000000001 (NEEDED)             Shared library: [libOpenSLES.so]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so]
 0x0000000000000001 (NEEDED)             Shared library: [liblog.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]

It looks like the libOpenSLES.so dependency is missing from the new .so file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions