[Mono-list] Mono seems to build but gets some error about gmcs.exe
jmalcolm
malcolm.justin at gmail.com
Fri Dec 17 01:17:22 EST 2010
CodeSlinger wrote:
>
> Woohoo - I got my hello pgm to run but I'm still concerned about what
> failed and what else I might need to do. Basically, I created the
> /usr/lib/mono/4.0 dir myself and copied the files into it from
> mcs/class/lib/monolite as below -
>
> -bash-3.00$ sudo mkdir /usr/lib/mono/4.0
> -bash-3.00$ sudo cp mono/mono-2.8.1/mcs/class/lib/monolite/*
> /usr/lib/mono/4.0
> -bash-3.00$ ll /usr/lib/mono/4.0
> total 6956
> -rwxr-xr-x 1 root root 294912 Dec 17 00:35 Mono.Security.dll
> -rwxr-xr-x 1 root root 281088 Dec 17 00:35 System.Core.dll
> -rwxr-xr-x 1 root root 1278464 Dec 17 00:35 System.Xml.dll
> -rwxr-xr-x 1 root root 1520640 Dec 17 00:35 System.dll
> -rwxr-xr-x 1 root root 1101824 Dec 17 00:35 gmcs.exe
> -rwxr-xr-x 1 root root 2611200 Dec 17 00:35 mscorlib.dll
> -bash-3.00$
>
> And I can run the pgm I built with VS2010 with the project defined on my
> Samba share!
>
> -bash-3.00$ mono
> ~/svn/Main/vsprojects/mono/HelloLinux/bin/Debug/HelloLinux.exe
> Hello Linux from Mono!
>
>
Congratulations on your progress but I think you still have a ways to go.
My guess is that Mono is failing to build for you because you have not yet
installed libgdiplus.
As I said before, libgdiplus implements GDI+ for Linux and is required to
build System.Drawing. That is probably where your Mono build is failing.
The mscorlib.dll assembly is implied as a reference in all projects even if
you do not explicitly add it. For example, "Console.WriteLine" lives in
mscorlib.dll. I have not seen your HelloWorld program but I am sure it
calls Console.WriteLine. This is why you were getting the error about
mscorlib.dll not being found.
"monolite" is a bare-bones set of assemblies that is built to be just enough
to then build the actual Mono installation. So, you now have enough of the
.NET framework installed to run HelloWorld. Any real applications will be
calling parts of the framework not found in the monolite assemblies. You
need to build the full framework.
At least it looks like you have a working CLR and a working compiler. Now
you just need the class libraries.
As I said in an earlier message, installing libpng will get you past the
error you were having before when building libgdiplus. Have you tried the
following?
yum install libpng libpng-devel
You need libgdiplus to build Mono whether you plan to use graphics stuff or
not. You can probably get away with not installing TIFF, JPEG, GIF, and
EXIF support though. Based on your error though, it looks like you have to
at least build support for PNG. I imagine you will also have to install the
dev libs for freetype and/or fontconfig as well. Again, just use yum.
Good luck.
--
View this message in context: http://mono.1490590.n4.nabble.com/Mono-for-an-older-Linux-RHEL4r5-tp3089477p3092133.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list