Skip to content

Fails to load on newer versions of glibc (System.DllNotFoundException) #220

@namidairo

Description

@namidairo

It appears that dlopen/dlsym/dlclose are now available from within libc itself, thus these DllImport statements end up failing because there's no longer a libdl.so being shipped.

https://github.com/ReClassNET/ReClass.NET/blob/master/ReClass.NET/Native/NativeMethods.Unix.cs#L13-L19

Changing these to just "libc" will get it running again in a pinch.

Trace for good measure:

System.DllNotFoundException: libdl.so assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReClassNET.Native.NativeMethodsUnix.dlopen(string,int)
  at ReClassNET.Native.NativeMethodsUnix.LoadLibrary (System.String fileName) [0x00001] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Native.NativeMethods.LoadLibrary (System.String name) [0x00001] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Core.InternalCoreFunctions.Create () [0x00021] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Core.CoreFunctionsManager..ctor () [0x00013] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Program.Main (System.String[] args) [0x000f0] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libdl.so assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) ReClassNET.Native.NativeMethodsUnix.dlopen(string,int)
  at ReClassNET.Native.NativeMethodsUnix.LoadLibrary (System.String fileName) [0x00001] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Native.NativeMethods.LoadLibrary (System.String name) [0x00001] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Core.InternalCoreFunctions.Create () [0x00021] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Core.CoreFunctionsManager..ctor () [0x00013] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 
  at ReClassNET.Program.Main (System.String[] args) [0x000f0] in <d7d91109515a4cd2b6ef1c0a31e9deed>:0 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions