[Mono-list] Error: mcs.exe: cannot execute binary file
Jaime Anguiano Olarra
16 Jun 2002 20:22:21 +0200
Content-Type: multipart/mixed; boundary="=-38tYyJhDoXuil9dca2oU"
Content-Type: text/plain; charset=ISO-8859-15
Here is the first version of the mono-common-problems.
I will upload it to the cvs right know, also I will add a link in the
El dom, 16-06-2002 a las 02:15, Jose Cornado escribi=F3:
> I've just downloaded 0.12 mono/mcs. Finished making mono. When I try to
> make mcs, Nant throws an error that csc can not be found. I changed makef=
> to use mcs instead of csc (I am running rh 7.2 no cygwin at all) then it
> throws some garbage message. To be sure I typed $mcs.exe and I get the er=
> on the subject line. Any ideas, hitns?
> Mono-list maillist - Monofirstname.lastname@example.org
// http://geneura.ugr.es -- The Geneura Team
// http://www.go-mono.com -- The Mono Project
Content-Disposition: attachment; filename=mono-common-problems
Content-Type: text/plain; name=mono-common-problems; charset=ISO-8859-15
Common Problems with Mono (see the bottom)
(c) 2002, Jaime Anguiano Olarra=20
There are several ways to get Mono running on your computer.=20
Although the purpose of this document I will add some info=20
here for completness. After all you need the software if you
want to get in trouble :).
RPMs or DEBs can be found at Baselabs <a href=3D"http://mono.baselabs.org/=
See <a href=3D"http://www.go-mono.com/download">http://www.go-mono.com/dow=
nload</a> for more information.
Here comes the real fun. This is what some people have claimed for as
a 'foolproff way to get started'.
First, assume you have the packages.
You must know that:
1.- Mono can be compiled in Linux and Windows but mcs
cannot. Please don't write to the list telling that
you have downloaded the mcs-X.XX.tar.gz and that=20
you can't build it. It's a 'status' problem. The=20
mcs compiler can't be compiled under Linux yet.
This means, entering in mcs-X.XX and running 'make'
will show you something as:
[jaime@localhost mcs-0.12]$ make
for i in jay nant mcs class nunit tools; do =09
\ (cd $i; make linux) || exit 1; \
make: Cambiando a directorio `/home/jaime/utils/mcs-0.12/jay'
make: No se hace nada para `linux'.
make: Saliendo directorio `/home/jaime/utils/mcs-0.12/jay'
make: Cambiando a directorio `/home/jaime/utils/mcs-0.12/nant'
csc /out:NAnt.exe /recurse:*.cs=20
/bin/sh: csc: command not found
make: *** [NAnt.exe] Error 127
make: Saliendo directorio `/home/jaime/utils/mcs-0.12/nant'
make: *** [linux] Error 1
2.- You need to get the packages refered in the Mono=20
download page. These are: glib 1.3, pkgconfig...
Second, read all the READMEs and INSTALLs.=20
For short, you will normally will be able to install the RPMs and DEBs as
rpm -Uhv mono-X.XX_baselabs-XXXXXXXX.rpm
See the BaseLabs page for a full explanation.=20
Building your own binaries it's easy too!.=20
Unzip and untar the tarball (will work only for Mono, remember!!)
tar -zxvf mono-X.XX.tar.gz=20
Enter the directory where the sources reside:
Run the configure script:
Then make the package:
Now you are able to install it:
Remember once again. mcs cannot be compiled under Linux. You need a Window=
where to build it. The only way for you to get the mcs in Linux without bu=
it by your own in a Windows machine (including the VMWare alternative) is =
the binaries from the BaseLabs page. It's also important to say that there=
NUnit packages too in that site but that you probably won't need to care a=
if you are reading this document.
If you want to compile a little program using the mcs, let's say "konnichi=
The output will depend on wether your program is compilable or not, if it =
"RESULT: 0" will be printed in your gnome-terminal (or whatever 'console' =
You should see a file called "konnichiwa.exe" in the same directory (folde=
the source (konnichiwa.cs) is.
To run the binary you have to options. The most used is:
but it might be better to use this other approach instead (calling the int=
That's it. The Mono mcs compiler allows you to perform more complicated co=
and I will show an example using three source files. Suppose you have thre=
person.cs, employee.cs, Test.cs. The first one could contain an abstract c=
while the second one could be the source for a concrete class derived from=
called Employee. The last one, Test.cs could be a simple class to show how=
work and it contains an entry point (the Main() method, signed with the ap=
attributes 'public static' and the correct type 'void'). Then you could ge=
Text.exe program by calling:=20
mcs Test.cs person.cs employee.cs
You might want to see my slides, source code and other material from the c=
CSharp I am preparing to teach at the University of Granada, Spain. If you=
are a newbie
A note about problems:
First see the <a href=3D"http://bugzilla.ximian.com">Ximian Bugzilla</a> p=
age in order=20
to get know if the bug has already been reported.
Second, read this document.=20
Third, visit the mono mailing lists' archives and do a little research in =
threads talking about the problems you are having.
Fourth if you still cannot override the problem, contact the lists.
Known problems: =09
1.- mcs fails to compile in Linux.=20
sol. mcs cannot compile in Linux. Try to install the already made package=
2.- mono fails to compile in my Linux box.
sol. Uhg... a generic 'question'. Proceed as above. (note for geeks: GOT=
3.- I cannot install mono under RedHat 7.3.
sol. Try to upgrade your libc6 packages. In general, check that you have =
right versions for the packages glib, pkgconfig, libc...
4.- I cannot compile mcs nor mono under Windows. Are you fooling me?.
sol. No, we are not. Have you read carefully the <a href=3D"http://www.go=
page?. You need CygWin among other things. Check all of that before=20
trying to compile.
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje esta firmada digitalmente
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----