Search Unity

etc/mono/config and path resolution for dylib in macOS

Discussion in 'macOS' started by RRvfx, Jan 23, 2020.

  1. RRvfx

    RRvfx

    Joined:
    Jun 14, 2018
    Posts:
    25
    Hi all,

    we have an app build with 2019.1.14 (let's call it myapp1) using sqlite3 that is running (in production as well) nicely on iOS/Android/Mac.

    We have upgraded the project (exactly the same bits) to 2019.2.19 and build it for macOS on macOS 10.14.6 and 10.15.2 (let's call it myapp2).

    Note that myapp.app/../etc/mono/config is the same in both versions but when running myapp2 exceptions are thrown (it's not the case with myapp1):
    Plugins: Couldn't open libc, error: dlopen(libc, 2): image not found
    Plugins: Couldn't open libsqlite3.0, error: dlopen(libsqlite3.0, 2): image not found

    As soon as we comment the entry regarding libc and sqlite3 in the config within myapp2/../etc/mono/config, myapp2 runs correctly with no exceptions.

    In both version running otool seems picking up libc from /usr/lib and libsqlite3.0.dylib is also available in /usr/lib (on macOS sqlite is installed by default).

    Please, let us know why with 2019.2 app seems to look for those dylib in the wrong place.

    Thanks,
    RR
     
  2. unity_o8SDbc7foaYv9g

    unity_o8SDbc7foaYv9g

    Joined:
    Feb 6, 2020
    Posts:
    1
    Hello RRvfx
    Have you found a solution to this problem? I'm facing the same error. The projects links well in editor mode but not in standalone build for MacOS
    Plugins: Couldn't open libsqlite3.0, error: dlopen(libsqlite3.0, 2): image not found

    I'm working in a MacOSX version 10.15
     
    Last edited: Mar 2, 2020
  3. andrar

    andrar

    Joined:
    Sep 27, 2017
    Posts:
    18
    Thanks for reporting this! We have identified the breaking change in 19.2.2f1 and should be able to come up with the fix soon.
     
  4. aduca9999_unity

    aduca9999_unity

    Joined:
    Dec 18, 2019
    Posts:
    1
    We're currently building our macOS version using Unity 2019.3.6 and having the same error (macOS 10.15.3). This was not an issue when building the macOS version with the same code on Unity 2019.1.7.

    The errors we are seeing are:
    "Plugins: Couldn't open libc, error: dlopen(libc, 2): image not found"
    "Plugins: Couldn't open /usr/lib/libSystem, error: dlopen(/usr/lib/libSystem, 2): image not found"

    Interestingly, the built macOS application seems to run fine even though it has the errors above. Is this to be expected? and do we just ignore the errors?
     
  5. Krstn

    Krstn

    Joined:
    Dec 30, 2012
    Posts:
    27
    Hi

    I have just stumbled upon this issue while searching for something (maybe) similar.
    When testing my app in editor I get crashes when accessing the sqlite3 database.
    I am the sole person running this project on macOS (platform is android) and it seems I am the only one facing the issue constantly (others were reporting random unity crashes, but for me this is constant, I cannot get passed loading the data from the database stage).

    I'm on Catalina 10.15.3 with Unity 2019.3.6.

    Code (CSharp):
    1. Thread 0 Crashed:: Main Thread  Dispatch queue: com.apple.main-thread
    2. 0   libsystem_kernel.dylib            0x00007fff6dfa87fa __pthread_kill + 10
    3. 1   libsystem_pthread.dylib           0x00007fff6e065bc1 pthread_kill + 432
    4. 2   libsystem_c.dylib                 0x00007fff6df2fa1c abort + 120
    5. 3   com.unity3d.UnityEditor5.x        0x0000000110eade4e HandleSignal(int, __siginfo*, void*) + 62
    6. 4   libmonobdwgc-2.0.dylib            0x000000015673a269 mono_chain_signal + 79
    7. 5   libmonobdwgc-2.0.dylib            0x000000015660ba1f mono_sigsegv_signal_handler + 414
    8. 6   libsystem_platform.dylib          0x00007fff6e05a42d _sigtramp + 29
    9. 7   ???                               000000000000000000 0 + 0
    10. 8   libsqlite3.dylib                  0x00007fff6cc68414 yy_reduce + 964
    11. 9   libsqlite3.dylib                  0x00007fff6cc66435 sqlite3RunParser + 1189
    12. 10  libsqlite3.dylib                  0x00007fff6cc6498b sqlite3LockAndPrepare + 1387
    13. 11  libsqlite3.dylib                  0x00007fff6cd2da39 sqlite3_prepare + 25
     
    Last edited: Mar 23, 2020
  6. diego-vieira

    diego-vieira

    Joined:
    Mar 27, 2015
    Posts:
    32
    I am facing the same issue, also in 2019.3.6
    The error is: Plugins: Couldn't open libc, error: dlopen(libc, 2): image not found

    My game can't establish a connection with the server when this message appears. Maybe it is a cryptography/ssl issue.
     
  7. DuneGestion

    DuneGestion

    Joined:
    Oct 12, 2016
    Posts:
    1
    I have the same issue on MacOS 10.15.4 when building with Unity 2019.3.0f6.
    I'm getting : Plugins: Couldn't open libc, error: dlopen(libc, 2): image not found

    If anyone find a solution. Let us know ! Regards
     
  8. Derpington3d

    Derpington3d

    Joined:
    Mar 17, 2015
    Posts:
    3
    Anyone find anything yet? Experiencing the same thing on 2019.3.7f1 -- some of my networked stuff doesn't work when this happens.
     
  9. Twyker_gp

    Twyker_gp

    Joined:
    Dec 4, 2018
    Posts:
    29
    +1 same issue, same version
     
  10. Whackeddie

    Whackeddie

    Joined:
    Mar 30, 2017
    Posts:
    10
    Also experiencing this issue.
     
  11. andrar

    andrar

    Joined:
    Sep 27, 2017
    Posts:
    18
    The fix has landed in 2020.2.0 Alpha 7 and should soon make it to 2020.1 and 2019.3
     
  12. Whackeddie

    Whackeddie

    Joined:
    Mar 30, 2017
    Posts:
    10
    any update on this?
     
  13. makomarkus

    makomarkus

    Joined:
    Oct 28, 2020
    Posts:
    61
    I had this when I added some static string assignment with the system date lib in an RuntimeInitializeOnLoadMethod method ( among other code )

    Code (CSharp):
    1.  
    2. public class LogHandler  {
    3.  
    4.     static string randomString = "";
    5.  
    6.     [RuntimeInitializeOnLoadMethod]
    7.     static public void init() {
    8.         randomString = DateTime.Now.ToShortTimeString();
    9.     }
    10. }
    Once I removed that, the issue went away.