[MacPorts] #1936: BUG: devel/mono doesn't look in /opt/local/lib at runtime

MacPorts noreply at macports.org
Wed Nov 5 00:19:21 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:                        |  
-----------------------------------+----------------------------------------
Changes (by nox at macports.org):

 * cc: nox at macports.org (added)


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)

--

Comment:

 I've fixed this problem in gtk-sharp and gtk-sharp2, I'll soon attach a
 patch to fix mono.

-- 
Ticket URL: <http://trac.macports.org/ticket/1936#comment:17>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list