Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals

User(s) browsing this thread: 1 Guest(s)
Post Reply 
[200] Error compiling Mono.Net
02-15-2012, 11:29 PM
Post: #1
Error compiling Mono.Net
First of all I've to admit that I'm a total linux newbie so be understanding with my very first linux approach please Smile
I'm trying to compile it natively on my A300. My goal is to be able to execute 'mono myExecutable.exe' in the nmt.

The short explanation:

After compilation I get a 'mono' executable:
./mono: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically link
ed (uses shared libs), for GNU/Linux 2.6.12, with unknown capability 0xf41 = 0x7
56e6700, with unknown capability 0x70100 = 0x1040000, not stripped

But it doesn't work Sad

sh-3.00# ./mono
Segmentation fault

sh-3.00# strace ./mono
execve("./mono", ["./mono"], [/* 44 vars */]) = 0
brk(0)                                  = 0x878000
uname({sys="Linux", node="A300", ...})  = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

(gdb) run
Starting program: /opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8/mono/mini

Program received signal SIGSEGV, Segmentation fault.
0x2aaab064 in ?? ()
   from /opt/sybhttpd/localhost.drives/SATA_DISK/Apps/local/lib/

Does anyone know what the problem can be?

Large explanation:

Vaidyasr compiled it and incuded it in the opkg package but it doesn't work either. It says "segmentation fault" too. Before asking him to fix it again I've tried it by myself.

The compilation instructions in the page are quite easy:
./configure --prefix=/usr/local; make; make install

Previous to compile I've setup the shell with this commands I've found in the forum:
PATH=/share/Apps/local/bin:$PATH;export PATH
LD_LIBRARY_PATH=/lib:/opt/syb/sigma/bdj:/opt/syb/sigma/bdj/jvm/lib:/opt/syb/sigma/bdj/bdj/lib:/opt/syb/app/lib:/opt/syb/sigma/lib:/usr/local/lib:/share/Apps/local/lib;export LD_LIBRARY_PATH
MANPATH=$MANPATH:/share/Apps/local/share/man;export MANPATH
CFLAGS="-I/share/Apps/local/include -EL -fPIC -march=74kf2_1 -mtune=74kf2_1 -mdspr2";export CFLAGS
CXXFLAGS="-EL -fPIC -march=74kf2_1 -mtune=74kf2_1 -mdspr2";export CXXFLAGS
LDFLAGS="-L/share/Apps/local/lib -EL -fPIC -Wl,-rpath -Wl,/opt/syb/sigma/lib -Wl,-rpath -Wl,/opt/syb/app/lib -Wl,-rpath -Wl,/nmt/apps/lib -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/share/Apps/local/lib -march=74kf2_1 -mtune=74kf2_1 -mdspr2";export LDFLAGS
CPPFLAGS="-EL -fPIC -march=74kf2_1 -mtune=74kf2_1 -mdspr2";export CPPFLAGS
ASFLAGS="-El -fPIC -march=74kf2_1 -mtune=74kf2_1 -mdspr2";export ASFLAGS
PKG_CONFIG_PATH=/share/Apps/local/lib/pkgconfig;export PKG_CONFIG_PATH
CC="gcc -EL -fPIC -march=74kf2_1 -mtune=74kf2_1 -mdspr2 -I/share/Apps/local/include";export CC
CXX="g++ -EL -fPIC -march=74kf2_1 -mtune=74kf2_1 -mdspr2 -I/share/Apps/local/include";export CXX
AR="/share/Apps/local/bin/ar";export AR
NM="/share/Apps/local/bin/nm";export NM
STRIP="/share/Apps/local/bin/strip";export STRIP
LD="/share/Apps/local/bin/ld";export LD
RANLIB="/share/Apps/local/bin/ranlib";export RANLIB

After messing around with a lot of opkg packages, symbolink links for missing libraries, etc. I ended up with an error in the ''make" command:

cd /share/mono-2.10.8/mcs && make NO_DIR_CHECK=1 PROFILES='net_2_0 net_3_5  net_
4_0  ' CC='gcc -EL -fPIC -march=74kf2_1 -mtune=74kf2_1 -mdspr2 -I/share/Apps/loc
al/include' all-profiles
make[3]: Entering directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.
make profile-do--net_2_0--all profile-do--net_3_5--all profile-do--net_4_0--all
make[4]: Entering directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.
make PROFILE=basic all
make[5]: Entering directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.
make[6]: Entering directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.
make[6]: gmcs: Command not found
make[6]: *** [build/deps/basic-profile-check.exe] Error 127
make[6]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
*** The compiler 'gmcs' doesn't appear to be usable.
*** You need Mono version 2.4 or better installed to build MCS
*** Read INSTALL.txt for information on how to bootstrap a Mono installation.
make[5]: *** [do-profile-check] Error 1
make[5]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
make[4]: *** [profile-do--basic--all] Error 2
make[4]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
make[3]: *** [profiles-do--all] Error 2
make[3]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
make[2]: *** [all-local] Error 2
make[2]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
make: *** [all] Error 2

I've been investigating and 'gmcs' is a .net executable. That means that is executed using 'mono gmcs' command, so at this point I should have a mono executable.
I've found the 'mono' executable in a temp dir. Trying to execute it I get the results I've written before.

Any help will be welcome.
Thanks in advance.
Find all posts by this user
Add Thank You Quote this message in a reply
02-19-2012, 04:29 AM
Post: #2
RE: Error compiling Mono.Net
I'll try to recompile again and release it for testing.

C200/A400/RPi - Onkyo HT-S3400 - LG 47LV3730

oPKG Available Packages and Info:
400 Series - 200/300 Series - 100 Series
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to vaidyasr for this post
02-20-2012, 10:17 PM
Post: #3
RE: Error compiling Mono.Net
Vaidyasr, thank you so much.
Find all posts by this user
Add Thank You Quote this message in a reply
05-14-2012, 08:52 PM
Post: #4
RE: Error compiling Mono.Net
Mono has released the version 2.11.1. Since version 2.11.0 claims to have full MIPS support.

I've tried to compile it natively and I get a woking 'mono' executable. If I execute "mono -V", it works ok!
What I have not been able is to compile the framework. When 'mono' is compiled in a system that already have mono installed, it uses the already existing mono in the system to create this part I fail to generate.

Could you vaidyasr (or any other one) try to cross compile it?

Here you have the last sources:

Here the instructions:

I had problems compiling and I had to use:
./configure --prefix=/usr/local --enable-minimal=profiler

And I have not tested it but I think that this creates the ipk package:
make mono-ipk

Thank you very much in advance!
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [400] NMT CSI - 404 Error rjgregory 0 129 04-14-2014 04:28 AM
Last Post: rjgregory
  [200/300/400] Mono - Cross Platform .NET Development Framework - v3.2.6 vaidyasr 3 898 01-22-2014 05:38 PM
Last Post: vaidyasr
  [400] IKVM.NET - Java for Mono and the Microsoft .NET Framework vaidyasr 0 379 01-22-2014 11:36 AM
Last Post: vaidyasr
  [200] Cross-compiling CUPS davep27 8 6,916 06-10-2013 05:48 AM
Last Post: nyk.mat
  [200] A-210 error installing apps from Csi bartvanl 4 1,610 03-06-2013 03:15 PM
Last Post: bartvanl
  Error installing using CSI divine 2 921 02-21-2013 07:15 AM
Last Post: divine
  [200] Compiling SqueezeSlave for C200 papaiannis 15 5,118 12-21-2012 04:54 PM
Last Post: papaiannis
  [300] CSI installer not working with A300 - 404 error panjazzon 6 3,575 08-08-2012 08:44 AM
Last Post: scottdca
  [200] Impossible connect with ftp server, code 530 login error... xatu 2 1,689 07-21-2012 08:45 PM
Last Post: xatu
  [200] NZBget Error - Could Not Move File astronyu 3 1,708 11-22-2011 08:11 AM
Last Post: astronyu

Forum Jump: