Ticket #1936 (new defect)
BUG: devel/mono doesn't look in /opt/local/lib at runtime
| Reported by: | chris.ridd@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.0 |
| Keywords: | Cc: | markd@…, nox@…, j.bugzilla2@…, rudloff@… | |
| Port: | mono |
Description (last modified by ryandesign@…) (diff)
The mono-config file included by devel/gtk-sharp maps 'libgtk-win32-2.0.0.dll' to 'libgtk-x11 -2.0.0.dylib', however an application using Gtk fails to load the dylib. This is because it appears to look for the dylib in the paths "", "/usr/local/lib", "/lib", "/usr/lib" and "." (and then across those paths in reverse order, Just In Case.)
If I set DYLD_LIBRARY_PATH to /opt/local/lib, the dylib is located correctly.
% mcs helloworld.cs -L /opt/local/lib/mono/gtk-sharp -r gtk-sharp.dll -r glib-sharp.dll Compilation succeeded % unsetenv DYLD_LIBRARY_PATH % mono helloworld.exe Unhandled Exception: System.DllNotFoundException: libgtk-win32-2.0-0.dll in <0x000dc> (wrapper managed-to-native) Gtk.Application:gtk_init (int&,intptr&) in <0x0004c> Gtk.Application:Init () in <0x0001c> Hello:Main () % setenv DYLD_LIBRARY_PATH /opt/local/lib % mono helloworld.exe
(it works)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


