Cross compile Mono from source for the Omega2 and Omega2+



  • Hi @Jackdaw!

    I tried to compile mono myself, it seems there is an environment variable STAGING_DIR missing. But this did not completely solve my problems. Can you perhaps provide a working link with your mono version?



  • @Rainer-Müller

    You can ignore the STAGING_DIR. If you do all the things written in my instructions, then you have a fully working mono package :).

    I see that the precompiled package is not there anymore. Will create one somewhere this weekend.



  • Hi Jack can you reupload the ipk compiled for mono you build. Thanks a lot



  • Wow, sorry I forgot to add a package. That took me a time to notice.

    Do people still have problems compiling mono for the Omega? I will try again this weekend and update the tutorial. Please remind me again. :).



  • I could not cross compile the recent version of mono. Will see if I will be more successfull at the end of this week.



  • This post is deleted!


  • @Jackdaw I stuck on setting crosscompiled environment. I mean - after all setup for crosscopile (I used also recent openwrt-sdk-18.06.1-ramips-mt76x8_gcc-7.3.0_musl.Linux-x86_64.tar.xz) BuildMono/bin/mono is build for Ubuntu (not for Omega2). Both BuildHost/bin/mono and BuildMono/bin/mono works on Ubuntu but the latter not works on Omega2 (wrong ELF format). So I suspected that cross-tools are wrongly setup and in the second stage still Ubuntu host tools are used (in /Makefile commands CC = gcc)

    I tried your solution with export CC=$CROSS-gcc
    and also alising it manually before automake and make but it still build host-platform version :(

    Any idea how to properly setup cross-toolsets before compiling for ramips-mt76x8 ?



  • I think I have ignored that autogen.sh ends with an error around checking shm_open:

    checking for inotify_rm_watch with unsigned wd... no
    checking for shm_open that works well enough with mmap... configure: error: in `/home/project/mono':
    configure: error: cannot run test program while cross compiling
    See `config.log' for more details
    

    How to workaround it? Obviously it can not run crosscompiled test on build machine :/



  • ...ok, I figure it out (more or less):
    There's on open regressed issue on Mono project for this:
    https://github.com/mono/mono/issues/9951

    I had to switch back to 2018-04 branch on Mono to make it work.
    Compiled with openwrt-sdk-18.06.1-ramips-mt76x8_gcc-7.3.0_musl.Linux-x86_64.tar.xz

    Cheers!



  • Is it possible to get new link for package download?



Looks like your connection to Community was lost, please wait while we try to reconnect.