1

I'm trying to compile mono (from git) for a Cavium OCTEON (mips64) running Debian Sid.

If I try to compile entirely on the OCTEON, (without any kind of existing mono install), it gets as far as the mcs directory and then hits trouble. The problems relate to not having a functional gmcs. The suggested path of make get-monolite-latest doesn't work (wrong core versions, still no gmcs, etc).

To combat this, I tried the processes for cross-compiling mono for ARM. Of course, I have fast MIPs hardware to hand, so I don't use scratchbox.

The split build process gives no errors. Once installed on the OCTEON, I can run C# programs that have already been compiled (via gmcs on the x86_64 system). However, I cannot compile from source on the OCTEON. So, the IL runtime seems to work, but the compiler doesn't.

For example, compiling the simple hello world from http://www.mono-project.com/Mono_Basics gives the following:

root@OCTEON:~# gmcs helloWorld.cs 
error CS0518: The predefined type `System.Object' is not defined or imported
error CS0518: The predefined type `System.ValueType' is not defined or imported
error CS0518: The predefined type `System.Attribute' is not defined or imported
error CS0518: The predefined type `System.Int32' is not defined or imported
error CS0518: The predefined type `System.UInt32' is not defined or imported
error CS0518: The predefined type `System.Int64' is not defined or imported
error CS0518: The predefined type `System.UInt64' is not defined or imported
error CS0518: The predefined type `System.Single' is not defined or imported
error CS0518: The predefined type `System.Double' is not defined or imported
error CS0518: The predefined type `System.Char' is not defined or imported
error CS0518: The predefined type `System.Int16' is not defined or imported
error CS0518: The predefined type `System.Decimal' is not defined or imported
error CS0518: The predefined type `System.Boolean' is not defined or imported
error CS0518: The predefined type `System.SByte' is not defined or imported
error CS0518: The predefined type `System.Byte' is not defined or imported
error CS0518: The predefined type `System.UInt16' is not defined or imported
error CS0518: The predefined type `System.String' is not defined or imported
error CS0518: The predefined type `System.Enum' is not defined or imported
error CS0518: The predefined type `System.Delegate' is not defined or imported
error CS0518: The predefined type `System.MulticastDelegate' is not defined or imported
error CS0518: The predefined type `System.Void' is not defined or imported
error CS0518: The predefined type `System.Array' is not defined or imported
error CS0518: The predefined type `System.Type' is not defined or imported
error CS0518: The predefined type `System.Collections.IEnumerator' is not defined or imported
error CS0518: The predefined type `System.Collections.IEnumerable' is not defined or imported
error CS0518: The predefined type `System.IDisposable' is not defined or imported
error CS0518: The predefined type `System.IntPtr' is not defined or imported
error CS0518: The predefined type `System.UIntPtr' is not defined or imported
error CS0518: The predefined type `System.RuntimeFieldHandle' is not defined or imported
error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported
error CS0518: The predefined type `System.Exception' is not defined or imported
Compilation failed: 31 error(s), 0 warnings

I feel like I'm close, but missing a step. It's as if it's not finding mscorelib.dll. Yet, that file does seem to be present under the prefix path:

root@OCTEON# find . | grep -i mscor
./2.0/mscorlib.dll
./2.0/mscorlib.dll.mdb
./2.0/mscorlib.dll.so
./4.5/mscorlib.dll
./4.5/mscorlib.dll.mdb
./4.5/mscorlib.dll.so
./4.0/mscorlib.dll
./4.0/mscorlib.dll.mdb

Before I start delving into the mcs code to understand its flow and what's going wrong, I was hoping that someone on here might be able to shed some light on the problem and point me in the right direction. Have I missed something? Is there some obvious fix?

IanNorton
  • 7,145
  • 2
  • 25
  • 28
  • Have you tried installing debian's mono and then compiling mono on your mips machine? – IanNorton Feb 16 '12 at 08:59
  • Hi Ian. Thanks for the reply. Yeap, I did try that. Unfortunately, the MIPs version Debian is missing "mono-runtime". Although, since I do seem to have a working IL runtime built from source, I wonder if apt-get or aptitude can be persuaded to install the gmcs component, despite the failed mono-runtime dependency. I'll look into that. – Russell Davies Feb 16 '12 at 17:35

0 Answers0