Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Raspberry Pi上编译Mono 3.x_Mono_Makefile_Arm_Raspberry Pi_Raspbian - Fatal编程技术网

在Raspberry Pi上编译Mono 3.x

在Raspberry Pi上编译Mono 3.x,mono,makefile,arm,raspberry-pi,raspbian,Mono,Makefile,Arm,Raspberry Pi,Raspbian,为了解决软浮点和硬浮点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命令失败。错误如下: 为了解决这个问题,我尝试使用“sudo apt get install mono

为了解决软浮点和硬浮点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命令失败。错误如下:

为了解决这个问题,我尝试使用“sudo apt get install mono runtime”安装mono,然后再次启动make。但错误依然存在


有没有可能让Mono 3.x在ARM(Raspberry Pi)上工作?

有两种可能的解决方案:

  • 从tarball而不是git编译mono。tarball只是一个压缩包,它包含所有准备以独立方式编译的源代码。对于mono,如果您转到并单击“mono sources”链接,您可以找到tarball,该链接指向。您需要Mono3.2.8或更新版本,因为这是第一个实现ARM硬浮动支持的版本
  • 保持从git克隆,但在
    make
    之前使用
    make-get-monolite-latest
    命令。更多细节

  • 为了扩展另一个答案,我必须执行以下操作,以使今天的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
    
    然后:

    重新启动后删除交换文件

    结果:

    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

    我该如何在Tarball上做到这一点?mono在线帮助在这方面不是很具体。。。(“如果您作为正式发布的tarball获得此软件包…”->我如何/从何处“获得”此软件包?)!我终于在“make”和“make install”中没有出现任何错误(至少在我看来是这样)。但在尝试“mono-version”时,我没有得到这样的文件或目录“。在完全安装mono之前还有一个步骤吗?原因很可能是您使用了/usr/local前缀。如果您使用/usr而不是/usr/local,那么它可能会很方便。另外,请不要忘记在make之后运行ldconfig。”install@Boris,请注意,我已经更新了我的答案,以警告您mono版本3.2.5仍然不是com与Raspberry Pi兼容(它显然可以工作,但在运行时处理日期或浮动时会失败得很惨)。因此,您现在需要使用master(或者等待Mono 3.2.7,如果这是v.NEXT的数字)。只需将
    jessie
    存储库固定以备将来参考,然后从固定的存储库安装即可。更快更简单。Wheezy不再获得更新分配,我不知道他们为什么不切换到
    jessie
    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