[Mono-devel-list] DllNotFoundException for libc

Gert Driesen gert.driesen at telenet.be
Sun Feb 6 07:13:10 EST 2005


Hi,

Today, when I tried to rebuild Mono from SVN, I got the following error when
gacutil was executed:

Unhandled Exception: System.DllNotFoundException: libc
in <0x0004a> (wrapper managed-to-native) Mono.Tools.Driver:symlink
(string,string)
in <0x005bd> Mono.Tools.Driver:Install
(bool,string,string,string,string,string,string)
in <0x00555> Mono.Tools.Driver:Main (string[])

On my system, the actual libc library is located in /lib/libc.so.6, but
/usr/lib/libc.so contains the following wrapper script:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
OUTPUT_FORMAT(elf32-i386)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

I enabled debug output, and this resulted in the following output:

Mono-INFO: Config attempting to parse:
'/home/monohead/mono/mcs/class/lib/default/mscorlib.dll.config'.
Mono-INFO: Config attempting to parse:
'/home/monohead/mono/mono/runtime/etc/mono/assemblies/mscorlib/mscorlib.conf
ig'.
Mono-INFO: Config attempting to parse:
'/home/monohead/.mono/assemblies/mscorlib/mscorlib.config'.
Mono-INFO: Config attempting to parse:
'/home/monohead/mono/mono/runtime/wrapper-config'.
Mono-INFO: Assembly Loader probing location:
'../../tools/gacutil/gacutil.exe'.
Mono-INFO: AOT failed to load AOT module
/home/monohead/mono/mcs/tools/gacutil/gacutil.exe.so:
/home/monohead/mono/mcs/tools/gacutil/gacutil.exe.so: cannot open shared
object file: No such file or directory

Mono-INFO: Assembly Loader loaded assembly from location:
'../../tools/gacutil/gacutil.exe'.
Mono-INFO: Config attempting to parse:
'/home/monohead/mono/mcs/tools/gacutil/gacutil.exe.config'.
Mono-INFO: Config attempting to parse:
'/home/monohead/mono/mono/runtime/etc/mono/assemblies/gacutil/gacutil.config
'.
Mono-INFO: Config attempting to parse:
'/home/monohead/.mono/assemblies/gacutil/gacutil.config'.
Mono-INFO: Assembly Loader probing location:
'../../tools/gacutil/gacutil.exe'.
Mono-INFO: Assembly Loader loaded assembly from location:
'../../tools/gacutil/gacutil.exe'.
Mono-INFO: Config attempting to parse:
'/home/monohead/mono/mcs/tools/gacutil/gacutil.exe.config'.
Mono-INFO: Config attempting to parse:
'/home/monohead/mono/mono/runtime/etc/mono/assemblies/gacutil/gacutil.config
'.
Mono-INFO: Config attempting to parse:
'/home/monohead/.mono/assemblies/gacutil/gacutil.config'.
Mono-INFO: DllImport attempting to load: 'libc'.
Mono-INFO: DllImport loading location: 'libc'.
Mono-INFO: DllImport error loading library: '/usr/lib/libc.so: invalid ELF
header'.
Mono-INFO: DllImport loading library: './libc'.
Mono-INFO: DllImport error loading library './libc.so: cannot open shared
object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libc'.
Mono-INFO: DllImport error loading library '/usr/lib/libc.so: invalid ELF
header'.

(../../tools/gacutil/gacutil.exe:19044): Mono-WARNING **: DllImport unable
to load library '/usr/lib/libc.so: invalid ELF header'.
Mono-INFO: DllImport attempting to load: 'libc'.
Mono-INFO: DllImport loading location: 'libc'.
Mono-INFO: DllImport error loading library: '/usr/lib/libc.so: invalid ELF
header'.
Mono-INFO: DllImport loading library: './libc'.
Mono-INFO: DllImport error loading library './libc.so: cannot open shared
object file: No such file or directory'.
Mono-INFO: DllImport loading: 'libc'.
Mono-INFO: DllImport error loading library '/usr/lib/libc.so: invalid ELF
header'.

(../../tools/gacutil/gacutil.exe:19044): Mono-WARNING **: DllImport unable
to load library '/usr/lib/libc.so: invalid ELF header'.

Unhandled Exception: System.DllNotFoundException: libc
in <0x0004a> (wrapper managed-to-native) Mono.Tools.Driver:symlink
(string,string)
in <0x005bd> Mono.Tools.Driver:Install
(bool,string,string,string,string,string,string)
in <0x00555> Mono.Tools.Driver:Main (string[])

The config file in mono/data contains this entry :

<dllmap dll="libc" target="libc.so.6" />

But apparently its not used (as Mono searches for libc.so), but even if it
was used Mono would not look for it in /lib I guess.

Any idea how I can around this ?

Gert




More information about the Mono-devel-list mailing list