在 Raspberry Pi 上编译 Mono 3.x [英] Compiling Mono 3.x on Raspberry Pi

查看:31
本文介绍了在 Raspberry Pi 上编译 Mono 3.x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了摆脱软浮点与硬浮点 ABI 问题,我尝试在我的 Raspberry Pi 上安装最新版本的单声道

git clone https://github.com/mono/mono.git单声道CDgit子模块初始化git子模块更新./autogen.sh --prefix=/usr/local制作进行安装

make 命令失败.错误如下:

<块引用>

make[6]: gmcs: 命令未找到make[6]: *** [build/deps/basic-profile-check.exe] 错误 127*** 编译器gmcs"似乎不可用.*** 您需要安装 Mono 2.4 或更高版本才能构建 MCS*** 检查 mono README 以获取有关如何引导 Mono 安装的信息.make[5]: *** [do-profile-check] 错误 1make[4]: *** [profile-do--basic--all] 错误 2make[3]: *** [profiles-do--all] 错误 2make[2]: *** [all-local] 错误 2make[2]: 离开目录`/home/pi/mono/runtime'make[1]: *** [all-recursive] 错误 1make[1]: 离开目录`/home/pi/mono'

为了解决这个问题,我尝试使用sudo apt-get install mono-runtime"安装单声道,然后再次启动 make.但错误仍然存​​在.

是否有可能让 Mono 3.x 在 ARM(树莓派)上运行?

解决方案

对此有两种可能的解决方案:

  1. 从 tarball 编译 mono,而不是从 git.tarball 只是一个压缩包,其中包含准备以独立方式编译的所有源代码.对于单声道,您可以通过访问 http://www.go-mono 找到 tarball.com/mono-downloads/ 并单击Mono 源"链接,该链接链接到 http://download.mono-project.com/sources/mono/.您需要 mono 3.2.8 或更新版本,因为这是第一个为 ARM 实现 HardFloat 支持的版本.
  2. 继续从 git 克隆,但在 make 之前使用 make get-monolite-latest 命令.更多详情请此处.

To get rid of the soft float vs. hard float ABI problem I tried to install an up-to-date version of mono on my Raspberry Pi with

git clone https://github.com/mono/mono.git
cd mono
git submodule init
git submodule update
./autogen.sh --prefix=/usr/local
make
make install

The make command fails. The errors are as follows:

make[6]: gmcs: Command not found
make[6]: *** [build/deps/basic-profile-check.exe] Error 127
*** The compiler 'gmcs' doesn't appear to be usable.
*** You need Mono version 2.4 or better installed to build MCS
*** Check mono README for information on how to bootstrap a Mono installation.
make[5]: *** [do-profile-check] Error 1
make[4]: *** [profile-do--basic--all] Error 2
make[3]: *** [profiles-do--all] Error 2
make[2]: *** [all-local] Error 2
make[2]: Leaving directory `/home/pi/mono/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pi/mono'

To fix this I tried to install mono with "sudo apt-get install mono-runtime" and then start the make again. But the error remains.

Is it possible to get Mono 3.x working on ARM (the Raspberry Pi)?

解决方案

There are two possible solutions to this:

  1. Compile mono from a tarball, not from git. A tarball is just a compressed package that contains all the sources ready to be compiled in a standalone way. For mono, you can find the tarballs if you go to http://www.go-mono.com/mono-downloads/ and click on the "Mono sources" link, which links to http://download.mono-project.com/sources/mono/. You would need mono 3.2.8 or newer because that is the first version to implement HardFloat support for ARM.
  2. Keep cloning from git, but use make get-monolite-latest command before make. More details here.

这篇关于在 Raspberry Pi 上编译 Mono 3.x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆