Bug 324999 (MONO82330) - insufficient information on library loading
Summary: insufficient information on library loading
Status: RESOLVED FIXED
Alias: MONO82330
Product: Mono: Runtime
Classification: Mono
Component: interop (show other bugs)
Version: 1.2
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: dogfood
Depends on:
Blocks:
 
Reported: 2007-08-06 13:43 UTC by Marco Konijnenburg
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:47:07 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".