Search Unity

Bug Issues using so-libs with SONAME set

Discussion in 'Linux Editor' started by elmir-jagudin, Feb 6, 2019.

  1. elmir-jagudin


    Jun 7, 2016
    I have run into a problem using the SO-libraries where the SONAME
    is set to a string that does not end in .so.

    For example, consider I have a library 'foo', which includes a version number
    into it's SONAME. When I build it I'll get these two files: ->

    the SONAME will be set to ''. For the record, this is a common way to handle library versioning on Linux.

    When I build a second library 'bar' and link it agains 'foo', it will create a link
    to file.

    $ ldd => ./ (0x00007feabceee000)

    If I use the libbar outside of Unity, all works as expected, when loading
    'libbar', linker will look for '' file, and via symlink load the file.

    However, if I put, and inside unity project's
    Assets/Plugins directory and try to use code in libbar, it does not work.
    I'll get following error:

    Plugins: Couldn't open Assets/Plugins/, error: cannot open shared object file: No such file or directory

    Here is an example project that demonstrates this problem:

    It looks like unity only consideres *.so files as library files, thus when SONAME does not
    end in '.so', it does not work.

    Have anyone run into this problem? Is there any work-arounds?
    Last edited: Feb 6, 2019