Skip to content

dlopen failed #35

Description

@tchemaly

Although my app works on Unity, it is not working when I build it on the Magic Leap device.
I have these errors in mldb:

Plugins: Couldn't open /package/bin/liblsl64.so, error: dlopen failed: "package/bin/liblsl64.so has unexpected e_machine: 62

DllNotFoundException: Unable to load DLL 'liblsl64': The specified module could not be found.

Note that:
-my dlls are in Assets>LSL4Unity>Plugins
-I have added the following condition to the LSL script in the dll class:
#elif UNITY_ANDROID || PLATFORM_LUMIN
const string libname = "liblsl64";

Activity

  1. cwule commented on Dec 3, 2019

    @cwule

    I got the same error. Tried changing to liblsl32 but then it complains
    Plugins: Couldn't open /package/bin/liblsl32.so, error: dlopen failed: "/package/bin/liblsl32.so" is 32-bit instead of 64-bit

  2. tstenner commented on Dec 3, 2019

    @tstenner
    Contributor

    Are any dependencies missing, i.e. what's the output of ldd /package/bin/liblsl64.so?

  3. cwule commented on Dec 3, 2019

    @cwule
    $ ldd liblsl64.so 
     
    
    ldd: warning: you do not have execution permission for ./liblsl64.so.  
    
    linux-vdso.so.1 =>  (0x00007ffc22267000).  
    
    librt.so.1 => /lib64/librt.so.1 (0x00007f344c1c3000).  
    
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f344bebc000).  
    
    libm.so.6 => /lib64/libm.so.6 (0x00007f344bbba000). 
    
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f344b9a4000). 
    
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f344b788000). 
    
    libc.so.6 => /lib64/libc.so.6 (0x00007f344b3bb000). 
    
    /lib64/ld-linux-x86-64.so.2 (0x00007f344c6f9000)
    
  4. tstenner commented on Dec 4, 2019

    @tstenner
    Contributor

    I suspect an architecture mismatch. What's the output of file liblsl64.so?

  5. cwule commented on Dec 4, 2019

    @cwule

    $ file liblsl64.so
    liblsl64.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=793a68998fa33198e0385039a13935d7afa1fbad, stripped

  6. tstenner commented on Dec 5, 2019

    @tstenner
    Contributor

    liblsl64.so: ELF 64-bit LSB shared object, x86-64

    I dimly recall that the Magic Leap is an ARM device, so the x64 binaries won't work (more in-depth explanation).

    The easiest way would be to recompile liblsl for the magic leap with the standalone_compilation.sh script.

  7. tchemaly commented on Dec 5, 2019

    @tchemaly
    Author

    @tstenner Can you please indicate where I can find the standalone_compilation.sh script and how I can use it? It would be great if there is a resource.

  8. tstenner commented on Dec 6, 2019

    @tstenner
    Contributor

    The documentation is a work in progress, e.g. the bit I linked to was added about 2 minutes before my comment.

    I don't have a Magic Leap, but if you can SSH into it, you just need to download the liblsl source code (repository, zip), install g++ and then run standalone_compilation_linux.sh.

    If the binary is only meant for the magic leap, you could tailor it for this specific processor (CFLAGS="-march=native" ./standalone_compilation_linux.sh)

  9. syeddanishdev commented on Oct 7, 2020

    @syeddanishdev

    The documentation is a work in progress, e.g. the bit I linked to was added about 2 minutes before my comment.

    I don't have a Magic Leap, but if you can SSH into it, you just need to download the liblsl source code (repository, zip), install g++ and then run standalone_compilation_linux.sh.

    If the binary is only meant for the magic leap, you could tailor it for this specific processor (CFLAGS="-march=native" ./standalone_compilation_linux.sh)

    @tstenner Can you kindly share the procedure for Unity 3d for Android Platform (Quest)

    Because I am facing issue

    DllNotFoundException: lsl
    LSL.liblsl+StreamInfo..ctor (System.String name, System.String type, System.Int32 channel_count, System.Double nominal_srate, LSL.liblsl+channel_format_t channel_format, System.String source_id) (at Assets/LSL.cs:156)
    EventLSLOutlet.Start () (at Assets/Scripts/EventLSLOutlet.cs:29)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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