[Mono-osx] The infamous System.DllNotFoundException for libgdiplus

David Burnett vargol at ntlworld.com
Tue May 5 18:47:22 UTC 2015


Hi

I'm having an issue with libgdiplus. The head line is....

System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.dylib

There's plenty of references to this sort of thing, but its usually due to libgdiplus in the library search path but
this one has the full path and it exists there :-)


Macintosh:Release vargol$ ls -l /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.dylib
lrwxr-xr-x  1 root  admin  18  4 May 13:29 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.dylib -> libgdiplus.0.dylib
Macintosh:Release vargol$ ls -l /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.0.dylib
-rwxr-xr-x  1 root  admin  415908 13 Apr 19:46 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.0.dylib

I checked the output from otool

Macintosh:Release vargol$ otool -L /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.dylib
/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.dylib:
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libglib-2.0.0.dylib (compatibility version 3601.0.0, current version 3601.4.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libcairo.2.dylib (compatibility version 11203.0.0, current version 11203.14.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpixman-1.0.dylib (compatibility version 31.0.0, current version 31.0.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libtiff.5.dylib (compatibility version 8.0.0, current version 8.0.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/liblzma.5.dylib (compatibility version 6.0.0, current version 6.4.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libjpeg.8.dylib (compatibility version 9.0.0, current version 9.0.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgif.4.dylib (compatibility version 6.0.0, current version 6.6.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libfontconfig.1.dylib (compatibility version 8.0.0, current version 8.2.0)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libfreetype.6.dylib (compatibility version 17.0.0, current version 17.2.0)
	/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpng14.14.dylib (compatibility version 27.0.0, current version 27.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
	/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.2.0)

and checked they all exist too

-rwxr-xr-x  1 root  admin  415908 13 Apr 19:46 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdiplus.0.dylib
-rwxr-xr-x  1 root  admin  1613748 13 Apr 19:28 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libglib-2.0.0.dylib
-rw-r--r--  1 root  admin  75848 13 Apr 19:24 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libintl.8.dylib
-r-xr-xr-x  1 root  wheel  3205760 20 Nov  2009 /usr/lib/libiconv.2.dylib
-r-xr-xr-x  1 root  wheel  6890816  8 Jun  2011 /usr/lib/libSystem.B.dylib
-rwxr-xr-x  1 root  admin  1458544 13 Apr 19:27 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libcairo.2.dylib
-rwxr-xr-x  1 root  admin  4045292 13 Apr 19:26 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpixman-1.0.dylib
-rwxr-xr-x  1 root  admin  616740 13 Apr 19:25 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libtiff.5.dylib
-rwxr-xr-x  1 root  admin  221404 13 Apr 19:21 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/liblzma.5.dylib
-rwxr-xr-x  1 root  admin  302552 13 Apr 19:25 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libjpeg.8.dylib
lrwxr-xr-x  1 root  admin  18  4 May 13:29 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgif.4.dylib -> libgif.4.1.6.dylib
-rwxr-xr-x  1 root  admin  313756 13 Apr 19:26 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libfontconfig.1.dylib
-rwxr-xr-x  1 root  admin  813756 13 Apr 19:26 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libfreetype.6.dylib
-rwxr-xr-x  1 root  wheel  216704 15 Dec  2010 /usr/lib/libbz2.1.0.dylib
-rwxr-xr-x  1 root  admin  225592 13 Apr 19:25 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpng14.14.dylib
lrwxr-xr-x  1 root  wheel  16 19 Sep  2009 /usr/lib/libz.1.dylib -> libz.1.2.3.dylib
lrwxr-xr-x  1 root  admin  20  4 May 13:29 /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libexpat.1.dylib -> libexpat.1.5.2.dylib

Anyone else seen this issue with mono 4.0 ?

I'll admit I'm still now Snow Leopard here , one of those pesky 32bit iMac's, has that finally been obsoleted by the Mono Project ?

Dave


More information about the Mono-osx mailing list