[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

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:
Code:
./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

Code:
sh-3.00# ./mono
Segmentation fault

Code:
sh-3.00# strace ./mono
execve("./mono", ["./mono"], [/* 44 vars */]) = 0
brk(0)                                  = 0x878000
uname({sys="Linux", node="A300", ...})  = 0
old_mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aac8000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

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

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

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 mono.net 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:
Code:
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:

Code:
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.
8/mcs'
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.
8/mcs'
make PROFILE=basic all
make[5]: Entering directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.
8/mcs'
make[6]: Entering directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.
8/mcs'
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
/mcs'
*** 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
/mcs'
make[4]: *** [profile-do--basic--all] Error 2
make[4]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
/mcs'
make[3]: *** [profiles-do--all] Error 2
make[3]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
/mcs'
make[2]: *** [all-local] Error 2
make[2]: Leaving directory `/opt/sybhttpd/localhost.drives/SATA_DISK/mono-2.10.8
/runtime'
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.

Sriram
C200/A400/RPi - Onkyo HT-S3400 - LG 47LV3730
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:
http://download.mono-project.com/sources....1.tar.bz2

Here the instructions:
http://www.mono-project.com/Compiling_Mono_From_Tarball

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
  [200] A-210 error installing apps from Csi bartvanl 4 515 03-06-2013 03:15 PM
Last Post: bartvanl
  Error installing using CSI divine 2 409 02-21-2013 07:15 AM
Last Post: divine
  [200] Compiling SqueezeSlave for C200 papaiannis 15 3,656 12-21-2012 04:54 PM
Last Post: papaiannis
  [300] CSI installer not working with A300 - 404 error panjazzon 6 2,640 08-08-2012 08:44 AM
Last Post: scottdca
  [200] Impossible connect with ftp server, code 530 login error... xatu 2 993 07-21-2012 08:45 PM
Last Post: xatu
  [200] NZBget Error - Could Not Move File astronyu 3 1,130 11-22-2011 08:11 AM
Last Post: astronyu
  [200] [apps] Compiling qt4.7.4 XEvent definition problem in qt libs KidE79 7 2,570 10-14-2011 11:09 AM
Last Post: KidE79
  [200] i get an error when trying to install from nmt community margan_ron 0 936 09-21-2011 10:20 AM
Last Post: margan_ron
  [200] Starting video file using mono fedexp 4 1,665 09-07-2011 08:25 PM
Last Post: fedexp
  [200] Problem compiling gambas2 KidE79 2 1,211 09-01-2011 07:59 AM
Last Post: KidE79

Forum Jump: