Search Unity

Linux IL2CPP: DllNotFoundException: Unable to load DLL 'sqlite3'

Discussion in 'Linux' started by Majedev, Apr 25, 2021.

  1. Majedev

    Majedev

    Joined:
    Jun 25, 2017
    Posts:
    7
    I'm using 2019.4.25f1, and I'm very excited about being able to create Linux IL2CPP UNET server app builds from my macOS machine! I can create Linux builds using IL2CPP without issues, and it launches on my Debian server. However, when a user tries to log into my game, the server fails to load sqlite3.dll I have included in my game:

    Code (CSharp):
    1. DllNotFoundException: Unable to load DLL 'sqlite3': The specified module could not be found.
    2.   at Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_open_v2 (System.Byte[] utf8Filename, System.IntPtr& db, System.Int32 flags, System.IntPtr vfs) [0x00000] in <00000000000000000000000000000000>:0
    3.   at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, Mono.Data.Sqlite.SQLiteOpenFlagsEnum flags, System.Int32 maxPoolSize, System.Boolean usePool) [0x00000] in <00000000000000000000000000000000>:0
    4.   at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in <00000000000000000000000000000000>:0
    5.   at Database..cctor () [0x00000] in <00000000000000000000000000000000>:0
    6.   at MajestyNetworkManager.OnServerCreateAccount (UnityEngine.Networking.NetworkMessage netMsg) [0x00000] in <00000000000000000000000000000000>:0
    7.   at UnityEngine.Networking.NetworkMessageDelegate.Invoke (UnityEngine.Networking.NetworkMessage netMsg) [0x00000] in <00000000000000000000000000000000>:0
    8.   at UnityEngine.Networking.NetworkConnection.HandleReader (UnityEngine.Networking.NetworkReader reader, System.Int32 receivedSize, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
    9.   at UnityEngine.Networking.NetworkServerSimple.Update () [0x00000] in <00000000000000000000000000000000>:0
    10.   at UnityEngine.Networking.NetworkServer.InternalUpdate () [0x00000] in <00000000000000000000000000000000>:0
    11.   at UnityEngine.Networking.NetworkIdentity.UNetStaticUpdate () [0x00000] in <00000000000000000000000000000000>:0
    12. Rethrow as TypeInitializationException: The type initializer for 'Database' threw an exception.
    13.   at MajestyNetworkManager.OnServerCreateAccount (UnityEngine.Networking.NetworkMessage netMsg) [0x00000] in <00000000000000000000000000000000>:0
    14.   at UnityEngine.Networking.NetworkMessageDelegate.Invoke (UnityEngine.Networking.NetworkMessage netMsg) [0x00000] in <00000000000000000000000000000000>:0
    15.   at UnityEngine.Networking.NetworkConnection.HandleReader (UnityEngine.Networking.NetworkReader reader, System.Int32 receivedSize, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
    16.   at UnityEngine.Networking.NetworkServerSimple.Update () [0x00000] in <00000000000000000000000000000000>:0
    17.   at UnityEngine.Networking.NetworkServer.InternalUpdate () [0x00000] in <00000000000000000000000000000000>:0
    18.   at UnityEngine.Networking.NetworkIdentity.UNetStaticUpdate () [0x00000] in <00000000000000000000000000000000>:0
    19. (Filename: currently not available on il2cpp Line: -1)
    The same server app built on Mono runs fine because Mono.Data.Sqlite is used instead. What are some things I can do to have my IL2CPP Linux server app load sqlite3.dll successfully? Thanks.
     

    Attached Files: