[MacPorts] #1936: BUG: devel/mono doesn't look in /opt/local/lib at runtime
MacPorts
noreply at macports.org
Wed Nov 12 02:04:04 PST 2008
#1936: BUG: devel/mono doesn't look in /opt/local/lib at runtime
-----------------------------------+----------------------------------------
Reporter: chris.ridd at isode.com | Owner: mww at macports.org
Type: defect | Status: reopened
Priority: Normal | Milestone: Port Bugs
Component: ports | Version: 1.0
Resolution: | Keywords:
Port: mono |
-----------------------------------+----------------------------------------
Changes (by ryandesign at 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
More information about the macports-tickets
mailing list