#1936: BUG: devel/mono doesn't look in /opt/local/lib at runtime -----------------------------------+---------------------------------------- Reporter: chris.ridd@isode.com | Owner: mww@macports.org Type: defect | Status: reopened Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.0 Resolution: | Keywords: Port: mono | -----------------------------------+---------------------------------------- Changes (by ryandesign@macports.org): * port: => mono Old description:
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)
New description: 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) -- -- Ticket URL: <http://trac.macports.org/ticket/1936#comment:19> MacPorts <http://www.macports.org/> Ports system for Mac OS