c# - Mono 3.4.1 无法在树莓派上正确编译

标签 c# linux mono raspberry-pi raspbian

我正在尝试在树莓派上从 GIT (3.4.1) 编译最新的 Mono 源代码,我可以 make 并进行安装,但是如果我转到/usr/local/lib/mono 我只能得到“2.0 compat-2.0 gac”文件夹,而没有其他框架的文件夹。

当我尝试运行时:

pi@raspberrypi ~/testeMono $ mcs hello.cs
pi@raspberrypi ~/testeMono $ mono hello.exe 
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/usr/local/lib/mono/4.5/mscorlib.dll' directory.

我有一个初始的单声道安装,我正在执行“sudo apt-get install mono-complete”(因为我需要单声道来构建单声道),它位于/usr/lib/mono

我做了“检查”,这是失败的测试

420 test(s) passed. 6 test(s) did not pass.

Failed tests:


block_guard_restore_aligment_on_exit.exe
bug-10127.exe
finally_block_ending_in_dead_bb.exe
pinvoke2.exe
pinvoke3.exe
winx64structs.exe
make[5]: *** [runtest] Error 1
make[5]: Leaving directory `/home/pi/mono/mono/tests'
make[4]: *** [testjit] Error 2
make[4]: Leaving directory `/home/pi/mono/mono/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/home/pi/mono/mono/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/pi/mono/mono/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/pi/mono/mono'
make: *** [check-recursive] Error 1

欢迎任何尝试调试错误的帮助,因为我不知道应该看哪里。

最佳答案

我会将这些问题添加到评论中,但没有足够的声誉。

  • ./autogen.sh 最后的输出是什么?查看库部分。您在本节中对 .NET 4.0 和 .NET 4.5 是否有"is"?如果它们是“否”,请尝试运行 ./autogen.sh --with-profile4=yes --prefix=your_prefix

    Libraries:
      .NET 2.0/3.5:  yes
      .NET 4.0:      yes
      .NET 4.5:      yes
    
  • 当你的系统 mono 位于/usr 时,为什么选择安装在/usr/local 中?您将在不同的目录中安装两个单声道。当您使用并行单声道环境时,这很有用,但据我了解,您只想将单声道更新到最新版本。在这种情况下,我使用 --prefix=/usr ,以避免在 PATH 中查找库的问题。

  • 这些失败的测试意味着某些单声道功能(与 PInvoke 相关)无法在您的平台上正常工作,但一般来说单声道将按预期工作(因为所有其他测试均已通过)

关于c# - Mono 3.4.1 无法在树莓派上正确编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23941478/

相关文章:

c - 使用 shm_open 和 mmap 将用户空间映射到内核空间内存

c# - 获取 Visual Studio 解决方案文件和文件夹

c# - 如何在 IEnumerable 的末尾添加更多查询

c# - protected 内部方法不允许内部类作为参数

c# - C# 中的 Utils.CopyArray?

c# - Mono C# 编译器是否在编译时对循环进行任何并行化?

c - LD_PRELOAD 库和子进程

c - linux 内核模块编译先决条件

c# - 有没有什么解决方案可以用 C# 开发黑莓应用程序,比如用于 Android 的 Mono 或 Monotouch?

java - Sprint Reactor 过滤器与 IF then