Bug 6019 - Problematic dynamic library loading with 2.11.2 official package
Summary: Problematic dynamic library loading with 2.11.2 official package
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: packaging (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: High major
Target Milestone: ---
Assignee: Duncan Mak
URL:
Depends on:
Blocks:
 
Reported: 2012-07-06 14:54 UTC by stefanor
Modified: 2012-10-09 13:39 UTC (History)
5 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description stefanor 2012-07-06 14:54:44 UTC
May be related to bug 797.  This is with a clean install of 2.11.2 from 
MonoFramework-MDK-2.11.2.macos10.xamarin.x86.dmg from go-mono.com.

Mac OS X 10.7.4

Stefans-MacBook-Air:2.11.2 sorear$ csharp /r:Mono.Posix
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> Mono.Unix.Native.Syscall.system("date"); 
System.TypeInitializationException: An exception was thrown by the type initializer for Mono.Unix.Native.Stdlib ---> System.DllNotFoundException: libMonoPosixHelper.dylib
  at (wrapper managed-to-native) Mono.Unix.Native.Stdlib:GetDefaultSignal ()
  at Mono.Unix.Native.Stdlib..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0 
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0 
csharp>  

Stefans-MacBook-Air:2.11.2 sorear$ LD_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/2.11.2/lib csharp /r:Mono.Posix
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> Mono.Unix.Native.Syscall.system("date"); 
Fri Jul  6 10:28:28 PDT 2012
0
csharp>  

Stefans-MacBook-Air:2.11.2 sorear$
Comment 1 Miguel de Icaza [MSFT] 2012-09-02 13:10:26 UTC
Duncan, 

Do we have a system in the office running 2.11.3 that we can use to debug these issues?

Can you please try to replicate this?
Comment 2 Jeremiah Boyle 2012-10-04 01:08:23 UTC
i'm getting the same DllNotFoundException for libMonoPosixHelper.dylib with 2.11.4.

i worked around it, for the time being, by editing MonoPosixHelper dllmap statement in /Library/Frameworks/Mono.framework/Versions/2.11.4/etc/mono/config to include the full path to the library.
Comment 3 Brian Luczkiewicz 2012-10-04 01:32:29 UTC
I am seeing this too on 2.11.4.

Jeremiah's workaround got me going again, but it would be good to get the packages into a state where they work out-of-the-box.
Comment 4 Duncan Mak 2012-10-09 13:39:56 UTC
This has already been fixed in 2.11.5. The pre-release builds are available in Wrench.

https://wrench.mono-project.com/Wrench/

duncan@dynamic-022:~$ more /Library/Frameworks/Mono.framework/Versions/2.11.5/etc/mono/config 
<configuration>
        <dllmap dll="i:cygwin1.dll" target="libc.dylib" os="!windows" />
        <dllmap dll="libc" target="libc.dylib" os="!windows"/>
        <dllmap dll="intl" target="libintl.dylib" os="!windows"/>
        <dllmap dll="intl" name="bind_textdomain_codeset" target="libc.dylib" os="solaris"/>
        <dllmap dll="libintl" name="bind_textdomain_codeset" target="libc.dylib" os="solaris"/>
        <dllmap dll="libintl" target="libintl.dylib" os="!windows"/>
        <dllmap dll="i:libxslt.dll" target="libxslt.dylib" os="!windows"/>
        <dllmap dll="i:odbc32.dll" target="libodbc.dylib" os="!windows"/>
        <dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
        <dllmap dll="oci" target="libclntsh.dylib" os="!windows"/>
        <dllmap dll="db2cli" target="libdb2_36.dylib" os="!windows"/>
        <dllmap dll="MonoPosixHelper" target="/Library/Frameworks/Mono.framework/Versions/2.11.5/lib/libMonoPosixHelper.dylib" os="!windows" />
        <dllmap dll="i:msvcrt" target="libc.dylib" os="!windows"/>
        <dllmap dll="i:msvcrt.dll" target="libc.dylib" os="!windows"/>
        <dllmap dll="sqlite" target="libsqlite.0.dylib" os="!windows"/>
        <dllmap dll="sqlite3" target="libsqlite3.0.dylib" os="!windows"/>
        <dllmap dll="libX11" target="libX11.dylib" os="!windows" />
        <dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
        <dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
        <dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
        <dllmap dll="libcups" target="libcups.dylib" os="osx"/>
        <dllmap dll="i:kernel32.dll">
                <dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
                <dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/>
                <dllentry dll="__Internal" name="MoveMemory" target="mono_win32_compat_MoveMemory"/>
                <dllentry dll="__Internal" name="ZeroMemory" target="mono_win32_compat_ZeroMemory"/>
        </dllmap>
        <dllmap dll="gdiplus" target="/Library/Frameworks/Mono.framework/Versions/2.11.5/lib/libgdiplus.dylib" />
        <dllmap dll="gdiplus.dll" target="/Library/Frameworks/Mono.framework/Versions/2.11.5/lib/libgdiplus.dylib" />
</configuration>

Notice (2018-05-21): bugzilla.xamarin.com will be switching to read-only mode on Thursday, 2018-05-25 22:00 UTC.

Please join us on Visual Studio Developer Community and GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs and copy them to the new locations as needed for follow-up. The See Also field on each Bugzilla bug will be updated with a link to its new location when applicable.

After Bugzilla is read-only, if you have new information to add for a bug that does not yet have a matching issue on Developer Community or GitHub, you can create a follow-up issue in the new location. Copy and paste the title and description from this bug, and then add your new details. You can get a pre-formatted version of the title and description here:

In special cases you might also want the comments:

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Note You need to log in before you can comment on or make changes to this bug.