Bug 272 - Packaging problem: wrong dependencies
Summary: Packaging problem: wrong dependencies
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: packaging ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Alex Corrado [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2011-08-11 21:31 UTC by Miguel de Icaza [MSFT]
Modified: 2011-12-21 13:37 UTC (History)
2 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

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.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Miguel de Icaza [MSFT] 2011-08-11 21:31:13 UTC
This is the stack trace:
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeWin32Classic ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /Library/Frameworks/Mono.framework/Versions/2.10.4/lib/libgdiplus.dylib
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Drawing.KnownColors..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Drawing.Color.get_Black () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.ThemeEngine..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0 
  at Axiom.Framework.Exceptions.WinFormErrorDialog..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) Axiom.Framework.Exceptions.WinFormErrorDialog:.ctor ()
  at Axiom.Samples.Program.Main () [0x00000] in <filename unknown>:0

This seems to be because:

kangaroo 'dlopen(/Library/Frameworks/Mono.framework/Versions/2.10.4/lib/libgdiplus.dylib, 9): Library not loaded: /usr/X11/lib/libfreetype.6.dylib
kangaroo   Referenced from: /Library/Frameworks/Mono.framework/Versions/2.10.4/lib/libgdiplus.dylib
kangaroo   Reason: Incompatible library version: libgdiplus.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0'.
kangaroo your libfreetype is too old
kangaroo looks like a xamarin packaging bug

I do not know what versions of the OS they are using, but the above looks like a Winforms app.
Comment 1 Miguel de Icaza [MSFT] 2011-08-11 21:32:18 UTC
Update, from IRC:

SnowLeopard

Mono 2.10.4, ( X11 and XQuartz are installed ) ?
Comment 2 borrillis 2011-08-11 21:40:49 UTC
Trying to run an OpenGL app that initially loads a WinForm dialog for configuration. This works like a champ on linux but fails on MacOS with the above stacktrace. kangaroo had me set MONO_LOG_LEVEL=debug and MONO_LOG_MASK=dll before loading the program in question. This is loading from a terminal window command line, not from an xterm command line, if that makes any difference.
Comment 3 Alex Corrado [MSFT] 2011-08-12 12:55:51 UTC
It looks like the packaging scripts were using the system FreeType before, and this seems to have worked because Mono was built on Tiger. We're building on Snow Leopard now.

This commit- https://github.com/mono/release/commit/3248780eba475490f23ab136f4395fe1bb37bd39#L7R151 -suggests an issue with building against our own freetype and fontconfig. I will investigate.
Comment 4 Alex Corrado [MSFT] 2011-09-02 12:24:19 UTC
For 2.10.5, we worked around this issue by copying the libgdiplus build from mono 2.10.2 (the mono-2-10 branch of libgdiplus has not had any commits since then).

It looks like Apple may have updated freetype and/or related libs somewhere between OSX 10.6.2 (where some users have reported problems) and 10.6.8 (where we have been building mono).
Comment 5 Alex Corrado [MSFT] 2011-12-21 13:37:21 UTC
I believe this is now fixed in 2.10.8. There is a fix for libgdiplus so that we do not need to link against Apple's X11 stack any longer.