Bugzilla – Bug 324999
insufficient information on library loading
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by m.konijnenburg@amolf.nl 2007-08-06 06:43:23 MST ---- When loading a non-compatible library the debug information only speaks of file not found. In reality the file was found, but the problem is that the library is incompatible. This information should be passed in debug mode. Steps to reproduce the problem: 1. Get a library compiled from a non-compatible platform 2. Try to load 3. Actual Results: The debug information tells File not found Expected Results: file found, but has incompatible format. How often does this happen? every time Additional Information: ---- Additional Comments From vargaz@gmail.com 2007-08-06 08:10:22 MST ---- If you run with MONO_LOG_LEVEL=debug, the debug output shows the cause of the failure. ---- Additional Comments From m.konijnenburg@amolf.nl 2007-08-06 08:32:49 MST ---- Partial output of program with MONO_LOG_LEVEL=debug Mono-INFO: DllImport attempting to load: 'bridge'. Mono-INFO: DllImport loading location: 'libbridge.so'. Mono-INFO: DllImport error loading library: 'libbridge.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading library: './libbridge.so'. Mono-INFO: DllImport error loading library './libbridge.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'bridge'. Mono-INFO: DllImport error loading library 'bridge.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading location: 'libbridge'. Mono-INFO: DllImport error loading library: 'libbridge.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading library: './libbridge'. Mono-INFO: DllImport error loading library './libbridge.so: cannot open shared object file: No such file or directory'. Mono-INFO: DllImport loading: 'libbridge'. Mono-INFO: DllImport error loading library 'libbridge.so: cannot open shared object file: No such file or directory'. (Hello.exe:28028): Mono-WARNING **: DllImport unable to load library 'libbridge.so: cannot open shared object file: No such file or directory'. The file is there, it is linked to a wrong type of library for this system. When linked to a correct lib the output is as follows: Mono-INFO: DllImport attempting to load: 'bridge'. Mono-INFO: DllImport loading location: 'libbridge.so'. Mono-INFO: Searching for 'GetMethodID'. For a wrong library type it should say it has a wrong type, not that the file has not been found. ---- Additional Comments From vargaz@gmail.com 2007-08-06 09:29:50 MST ---- Well, if the underlying dlopen() call doesn't tell us what is the problem, we can't report it either. ---- Additional Comments From m.konijnenburg@amolf.nl 2007-08-06 10:01:08 MST ---- Is the message 'libbridge.so: cannot open shared object file: No such file or directory' coming from a call to dlerror() ? ---- Additional Comments From jonpryor@vt.edu 2007-08-06 10:26:53 MST ---- Yes, that error message comes from dlerror(). ---- Additional Comments From m.konijnenburg@amolf.nl 2007-08-06 10:38:22 MST ---- IF that's all the info available, so be it. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>System Fedora core 3, 64bit</cf_op_sys_details> Unknown operating system other. Setting to default OS "Other".