Errors cross compiling mono source for ARM in scratchbox?

865 views Asked by At

i am trying to cross compile mono-3.2.0 source for arm using the steps in the link http://www.mono-project.com/Mono:ARM#Compiling_on_the_device. Installed scratch box in my PC. Most people suggesting the above link for cross compiling mono. But i couldn't able to do.

I got an overall idea about cross compilation as follows:

Two stages of compilation needed.
The first one in my PC.
The second one within scratch box.

After that need to combine the resulting two install directories and copy that to my arm board.

Bu i got stucked in scratchbox,

When i tried with

              $ ./configure --host=arm-none-linux-gnueabi --disable-mcs-build

resulted in

configure: error: cannot run test program while cross compiling.

After I tried

                   $ ./configure --host=arm-none-linux-gnueabi --enable-minimal=profiler,debug,logging,soft_debug --with-tls=--with-tls=__thread --with-monotouch=no 
                                                   --without-mcs-docs --disable-mono-debugger CFLAGS=-DARM_FPU_VFP --with-sigaltstack=no --disable-mcs-buildno

With this command it worked fine. I dont know it is right or wrong, i got this from this forum.

then i tried

                   $ make -j 8

I get following errors:--

                                      After some make..

                                Making all in mini
             make[3]: Entering directory `/home/kishor/cross/mono-3.2.0/mono/mini'
             if test -d ../../.git; then \
           (cd ../..; \
              LANG=C; export LANG; \
              branch=`git branch | grep '^\*' | cut -d ' ' -f 2`; \
              version=`git log --no-color --first-parent -n1 --pretty=format:%h`; \
             echo "#define FULL_VERSION \"$branch/$version\""; \
            ); \
        else \
        echo "#define FULL_VERSION \"tarball\""; \
        fi > version.h
          CC       genmdesc-genmdesc.o
          CC       genmdesc-helpers.o
           In file included from mini-arch.h:21,
             from mini.h:36,
             from genmdesc.c:9:
          mini-arm.h:23: error: #error "hardfp-abi not yet supported."
          In file included from mini-arch.h:21,
             from mini.h:36,
             from helpers.c:9:
        mini-arm.h:23: error: #error "hardfp-abi not yet supported."
        make[3]: *** [genmdesc-genmdesc.o] Error 1
        make[3]: *** Waiting for unfinished jobs....
        make[3]: *** [genmdesc-helpers.o] Error 1
        make[3]: Leaving directory `/home/kishor/cross/mono-3.2.0/mono/mini'
        make[2]: *** [all-recursive] Error 1
        make[2]: Leaving directory `/home/kishor/cross/mono-3.2.0/mono'
        make[1]: *** [all-recursive] Error 1
        make[1]: Leaving directory `/home/kishor/cross/mono-3.2.0'
        make: *** [all] Error 2

Can anyone help me ??

2

There are 2 answers

0
Manuel On

I am not sure if it’s a spelling mistake but the it should be –disable-mcs-build not –disable-mc-build

After that it should configure correctly.

0
amoedoamorim On

According to this issue, Mono does not support yet hard float on ARM. Try using CFLAGS=-DARM_FPU_NONE instead, or just omit the CFLAGS directive as it should default to a working configuration.