First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 70867
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: dotnet AT gentoo DOT org <dotnet@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Thomas Zöchling <thomas.zoechling@gmx.at>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 70867 depends on: Show dependency tree
Show dependency graph
Bug 70867 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-11-11 14:23 0000
I emerged mono-1.0.4 and libgdiplus-1.0.4 and have problems with applications
that use System.Drawing.
Exception:
System.DllNotFoundException: gdiplus.dll

This behavior is exactly the same as mentioned in a previous bug:
http://bugs.gentoo.org/show_bug.cgi?id=55916

Additional i tried to add the dll to /etc/mono/config: (I pointed it to
libgdiplus.so)
<configuration>
        <dllmap dll="cygwin1.dll" target="libc.so.6" />
        <dllmap dll="libc" target="libc.so.6" />
        <dllmap dll="libintl" target="libc.so.6" />
        <dllmap dll="libxslt.dll" target="libxslt.so" />
        <dllmap dll="libmySQL.dll" target="libmysqlclient.so" />
        <dllmap dll="odbc32.dll" target="libodbc.so" />
        <dllmap dll="oci" target="clntsh" />
        <dllmap dll="db2cli" target="libdb2_36.so"/>
!!     ->>>>>   <dllmap dll="gdiplus.dll" target="libgdiplus.so"/>
</configuration>




Reproducible: Always
Steps to Reproduce:
1.emerge mono 
2.create a simple program that uses system.drawing
3.start it

Actual Results:  
I got the following exception:
System.DllNotFoundException: gdiplus.dll

Expected Results:  
Find the dll.

Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1,
2.6.
8-gentoo-r3)
=================================================================
System uname: 2.6.8-gentoo-r3 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3
/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/us
r/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org
http://distro.ibiblio.org/pub/Linux/dis
tributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apache2 apm arts avi berkdb bitmap-fonts crypt cups dvd encode esd
f
77 foomaticdb fortran gif gnome gpm gtk gtk2 gtkhtml imlib jpeg libg++ libwww
ma
d mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib
pe
rl png python quicktime readline sdl slang spell ssl svga tcpd truetype x86
xml2
 xmms xv zlib"

------- Comment #1 From Peter Johanson (RETIRED) 2004-11-12 09:50:38 0000 -------
There doesn't need to be a libgdiplus.so.dll, this gets mapped by the runtime
appropriately. Usually this actually means there was a problem loading the .so
file. Can you try doing:

MONO_LOG_LEVEL="debug" mono foo.exe

To get a more verbose output and post the relevant section concerning the
loading of libgdiplus? Thanks.

------- Comment #2 From Thomas Zöchling 2004-11-13 01:48:58 0000 -------
The problem seems to be that mono searches a file libgdiplus.so.so in
/lib/usr/lib

but i couldnt locate libgdiplus.so.so and the path /lib/usr/lib simply doesnt
exist

Trace:

Mono-INFO: DllImport attempting to load: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport loading location: 'lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library: 'lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading library: './lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library './lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport error loading library '/usr/lib/libgdiplus.so: undefined
symbol: XML_GetCurrentLineNumber'.

(bmTest.exe:14146): Mono-WARNING **: DllImport unable to load library
'/usr/lib/libgdiplus.so: undefined symbol: XML_GetCurrentLineNumber'.
Mono-INFO: DllImport attempting to load: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport loading location: 'lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library: 'lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading library: './lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library './lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport error loading library '/usr/lib/libgdiplus.so: undefined
symbol: XML_GetCurrentLineNumber'.

(bmTest.exe:14146): Mono-WARNING **: DllImport unable to load library
'/usr/lib/libgdiplus.so: undefined symbol: XML_GetCurrentLineNumber'.
Mono-INFO: DllImport attempting to load: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport loading location: 'lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library: 'lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading library: './lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library './lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport error loading library '/usr/lib/libgdiplus.so: undefined
symbol: XML_GetCurrentLineNumber'.

(bmTest.exe:14146): Mono-WARNING **: DllImport unable to load library
'/usr/lib/libgdiplus.so: undefined symbol: XML_GetCurrentLineNumber'.
Mono-INFO: DllImport attempting to load: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport loading location: 'lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library: 'lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading library: './lib/usr/lib/libgdiplus.so.so'.
Mono-INFO: DllImport error loading library './lib/usr/lib/libgdiplus.so.so:
cannot open shared object file: No such file or directory'.
Mono-INFO: DllImport loading: '/usr/lib/libgdiplus.so'.
Mono-INFO: DllImport error loading library '/usr/lib/libgdiplus.so: undefined
symbol: XML_GetCurrentLineNumber'.

(bmTest.exe:14146): Mono-WARNING **: DllImport unable to load library
'/usr/lib/libgdiplus.so: undefined symbol: XML_GetCurrentLineNumber'.

Unhandled Exception: System.TypeInitializationException: An exception was
thrown by the type initializer for System.Drawing.GDIPlus --->
System.DllNotFoundException: gdiplus.dll
in <0x00053> (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup
(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
in <0x00068> System.Drawing.GDIPlus:.cctor ()
--- End of inner exception stack trace ---

in (unmanaged) System.Drawing.Bitmap:.ctor
(int,int,System.Drawing.Imaging.PixelFormat)
in <0x00059> System.Drawing.Bitmap:.ctor
(int,int,System.Drawing.Imaging.PixelFormat)
in <0x00015> System.Drawing.Bitmap:.ctor (int,int)
in <0x00061> (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor
(int,int)
in <0x00077> ContactSheetGenerator:Main (string[])

------- Comment #3 From Peter Johanson (RETIRED) 2004-11-13 05:17:22 0000 -------
<snip>
Mono-INFO: DllImport error loading library '/usr/lib/libgdiplus.so: undefined symbol: XML_GetCurrentLineNumber'.
</snip>

^ that's actually the problem. It's finding the file, but then having a problem resolving one of the symbols. Can you please post the output of "ldd /usr/lib/libgdiplus.so" for me? Also, what version of libtool do you have installed?

------- Comment #4 From Thomas Zöchling 2004-11-13 07:25:17 0000 -------
My libtool is: 1.5.2-r5

Where is cairo?
I thougt mono is using it for gdi+ things.(Wondered about that already when i emerged libgdiplus)

ldd /usr/lib/libgdiplus.so
linux-gate.so.1 =>  (0xffffe000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x4011f000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40127000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x401ee000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x401fc000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x4027a000)
        libz.so.1 => /lib/libz.so.1 (0x402aa000)
        libm.so.6 => /lib/libm.so.6 (0x402bb000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402dd000)
        libc.so.6 => /lib/libc.so.6 (0x4032e000)
        libdl.so.2 => /lib/libdl.so.2 (0x4043e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

------- Comment #5 From Thomas Zöchling 2004-11-20 05:03:02 0000 -------
I did it the hard way :)
I "fixed" it by pasting this to the 1.0.4 ebuild:
src_unpack() {
	unpack ${A}
	cd ${S}

	# See bug #55916
	einfo "Fixing a libtool problem"
	rm ltmain.sh
	aclocal
	libtoolize --force --copy
}

This is from the ebuild that fixed bug #55916

Then i created an overlay as described here:
http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds
...and reemerged libgdiplus

after that my test apps work.
I hope this helps anyone.

------- Comment #6 From Scott McKenzie 2004-11-28 01:34:48 0000 -------
Looks like the patch from bug# 55916 was added to libgdiplus-1.0-r1, then was
removed for libgdiplus-1.0.2 and libgdiplus-1.0.4.  As mentioned by Thomas,
adding the src_unpack() function fixes the problem.  Can this please be added
back in to portage tree?

------- Comment #7 From Peter Johanson (RETIRED) 2004-11-28 12:28:54 0000 -------
Okay, re-openning so this doesn't get lost. I'll re-add that libtool fix as
soon as I get back in front of my dev box.

------- Comment #8 From Peter Johanson (RETIRED) 2004-11-28 14:57:03 0000 -------
Ok, i've just commited 1.0.4-r1 which includes the same libtool fix from
1.0-r1. Marking FIXED.

First Last Prev Next    No search results available      Search page      Enter new bug