为了摆脱软浮动与硬浮动ABI问题,我尝试在我的Raspberry Pi上安装最新版本的mono
git clone https://github.com/mono/mono.git
cd mono
git submodule init
git submodule update
./autogen.sh --prefix=/usr/local
make
make install
make命令失败。错误如下:
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'
要解决此问题,我尝试使用“sudo apt-get install mono-runtime”安装mono,然后再次启动make。但错误仍然存在。
是否可以让Mono 3.x使用ARM(Raspberry Pi)?
答案 0 :(得分:7)
有两种可能的解决方案:
make get-monolite-latest
之前使用make
命令。更多详情here。答案 1 :(得分:0)
为了扩展另一个答案,我必须做以下事情才能让今天的Mono在今天的原始Raspberry Pi上的Raspbian上编译:
apt-get install automake libtool build-essential git python
apt-get install mono-runtime # don't think this is necessary due
# to 'make get-monolite-latest'
umount /tmp # to allow the process to use the SD card as temp space-
# it's too small otherwise. Resets after reboot.
# create a swap file because you run out of RAM and you'll need to swap
dd if=/dev/zero of=/var/swapfile bs=1M count=1024
mkswap /var/swapfile
swapon /var/swapfile
chmod 0600 /var/swapfile
然后:
git clone git://github.com/mono/mono.git
cd mono
./autogen.sh --prefix=/usr/local --enable-nls=no
make get-monolite-latest
make
make install
ldconfig # apparently necessary.
重启后删除交换文件。
结果:
root@pi:~/mono# mono --version
Mono JIT compiler version 4.5.1 (master/5377700 Sat May 28 15:57:46 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+hard
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
ref https://neildanson.wordpress.com/2013/12/10/building-mono-on-a-raspberry-pi-hard-float/