我正在尝试为运行Debian Sid的Cavium OCTEON(mips64)编译mono(来自git)。
如果我尝试完全在OCTEON上编译,(没有任何现有的单声道安装),它会到达mcs目录然后遇到麻烦。问题与没有功能性gmcs有关。 make get-monolite-latest的建议路径不起作用(错误的核心版本,仍然没有gmcs等)。
为了解决这个问题,我尝试了交叉编译mono for ARM的流程。当然,我有快速的MIPs硬件,所以我不使用scratchbox。
拆分构建过程不会出错。一旦安装在OCTEON上,我就可以运行已编译的C#程序(通过x86_64系统上的gmcs)。但是,我无法在OCTEON上从源代码编译。因此,IL运行时似乎有效,但编译器没有。
例如,从http://www.mono-project.com/Mono_Basics编译简单的hello世界会得到以下结果:
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
我觉得我很亲密,但却错过了一步。好像它没有找到mscorelib.dll。然而,该文件确实出现在前缀路径下:
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
在我开始深入研究mcs代码以了解它的流程以及出了什么问题之前,我希望这里的某个人能够对这个问题有所了解并指出我正确的方向。我错过了什么吗?有一些明显的解决方案吗?