简体   繁体   中英

Mono 3.4.1 isn't compiling correctly on the raspberry pi

I m trying to compile the latest Mono source from GIT (3.4.1) on the raspberry pi, i can make, and make install, but if i go to /usr/local/lib/mono i get only “2.0 compat-2.0 gac” folders and none for the other frameworks.

When i try to run:

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.

I have a initial mono installation that i got doing "sudo apt-get install mono-complete" (since i need mono to build mono) it's on /usr/lib/mono

i did 'make check' and here are the failed tests

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

Any help trying to debug what's wrong is welcome, since i don't know where should i look.

I would add these questions to comment, but don't have enough reputation.

  • what is the output of ./autogen.sh at the end? Look at the libraries section. Do you have .NET 4.0 and .NET 4.5 'yes' in this section? If they are 'no', try run ./autogen.sh --with-profile4=yes --prefix=your_prefix

     Libraries: .NET 2.0/3.5: yes .NET 4.0: yes .NET 4.5: yes 
  • why do you choose to install in /usr/local, when your system mono is located in /usr? You'll have two mono installation in different directories. This is useful, when you what to use parallel mono environments, but as far as I understand, you just want update mono to the latest version. I use --prefix=/usr in this case, to avoid issues of finding libraries in PATH.

  • these failed tests mean that some of mono functionality (related to PInvoke) won't work correctly on your platform but in general mono will work as expected (because all other tests were passed)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM