[Mono-dev] Problems cross compiling Mono itself for ARM with uClibc

Timothy Smith tim.smith at venturality.com
Tue Mar 18 10:45:15 EDT 2008


It has been a few months since I have used an ARM tool-chain, but I do
recall that we had issues with various 'configure' (autoconf) tests. When
running configure we also received "C compiler cannot create executables" -
after I dove into it - I found that the gcc options where not right and it
was not outputing the right executable name. So it wasn't able to find
it.... I thought this might help.

Tim


On 3/18/08, freaky001 at gmx.net <freaky001 at gmx.net> wrote:
>
> Hello,
>
> I've tested my gcc with a sample program (a kind of "hello world"), but it
> works fine. It compiles the source and I get a executable file, which I can
> run on my ARM-Platform.
>
> What I've done (as user:root, in the directory /usr/local/mono-1.2.6):
> # export CC=arm-linux-gcc (it is available in my env - see previous
> posting)
> # ./configure --with-glib=embedded (because I'd like to use the uClibs)
>
> I also tried to configure and make mono 1.2.6 with the compiler for my
> native architecture (i386) - it works fine too.
>
> I think the problem is located in the message: "configure: error: C
> compiler cannot create executables".
>
> I don't know what to do. I really need help!
>
> Thomas
>
> > Hi Thomas,
> >
> > > Hello,
> > >
> > > is it possible, that the configuration step of Mono tries to execute
> > > a file on my i386 architecture platform, compiled with the arm-gcc?
> >
> > In general that's possible with configure scripts, but here it's
> > trying to execute `arm-linux-gcc --version`, see below. I'd assume
> > you'll get a similar error message if you execute it yourself from a
> > terminal? If so, then your cross-compiler setup is broken.
> >
> > > If this is the reason, how can I solve the problem? Is there a
> > > configuration-switch or a workaround which I've overlooked?
> >
> > Once you get to the point where you encounter such a situation you can
> > provide a cache file with the relevant settings (it can be useful to
> > make the file read-only while testing or it'll be overwritten).
> >
> > Andreas
> >
> >
> > > Greets, Thomas
> > >
> > > -------- Original-Nachricht --------
> > >> Datum: Thu, 13 Mar 2008 22:09:01 +0100
> > >> Von: "Andreas Färber" <andreas.faerber at web.de>
> > >> An: freaky001 at gmx.net
> > >> CC: mono-devel-list at lists.ximian.com
> > >> Betreff: Re: [Mono-dev] Problems cross compiling Mono itself for
> > >> ARM with uClibc
> > >
> > >>
> > >> Am 13.03.2008 um 21:53 schrieb freaky001 at gmx.net:
> > >>
> > >>> Hello,
> > >>>
> > >>> I'm trying to cross compile the mono package 1.2.6 with my arm-
> > >>> linux-
> > >>> gcc-4.1.2 shipped with my development board synertronixx scb9520
> > >>> with a preinstalled Linux RT 2.6.18 Kernel. I'm unsuccessfully
> > >>> trying this job for 1 month.
> > >>>
> > >>> My host platform is a Fedora 8 i386 machine. I copied the cross
> > >>> compiler suite to /usr/local and set the environment variables, as
> > >>> you can see below:
> > >>>
> > >>> # env | grep PATH
> > >>> PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/
> > >>> local/
> > >>> sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/
> > >>> gcc-4.1.2-uClibc-0.9.29-xscale/bin:/root/bin
> > >>>
> > >>> Then I unpacked the mono package to /usr/local and then I tried to
> > >>> configure it with the following command:
> > >>> CC=arm-linux-gcc ./configure --prefix=/urs --target=arm-linux --
> > >>> with-
> > >>> glib=embedded --with-gc=boehm --with-static_mono=yes --disable-mcs-
> > >>> build --enable-static
> > >>>
> > >>> All what I get as output are the following lines:
> > >>> [root at localhost mono-1.2.6]# CC=arm-linux-gcc ./configure --prefix=/
> > >>> urs --target=arm-linux --with-glib=embedded --with-gc=boehm --with-
> > >>> static_mono=yes --disable-mcs-build --enable-static
> > >>> checking build system type... i686-pc-linux-gnu
> > >>> checking host system type... i686-pc-linux-gnu
> > >>> checking target system type... arm-unknown-linux-gnu
> > >>> checking for a BSD-compatible install... /usr/bin/install -c
> > >>> checking whether build environment is sane... yes
> > >>> checking for a thread-safe mkdir -p... /bin/mkdir -p
> > >>> checking for gawk... gawk
> > >>> checking whether make sets $(MAKE)... yes
> > >>> checking how to create a ustar tar archive... gnutar
> > >>> checking whether to enable maintainer-specific portions of
> > >>> Makefiles... no
> > >>> checking whether ln -s works... yes
> > >>> ./configure: line 2844: ./libtool: No such file or directory
> > >>> checking host platform characteristics... ok
> > >>> checking for gcc... arm-linux-gcc
> > >>> checking for gcc... (cached) arm-linux-gcc
> > >>> checking for C compiler default output file name...
> > >>> configure: error: C compiler cannot create executables
> > >>> See `config.log' for more details.
> > >>>
> > >>> Here is the config.log:
> > >>> =======================
> > >>>
> > >>
> > >>> configure:3491: checking for C compiler version
> > >>> configure:3498: arm-linux-gcc --version >&5
> > >>> ./configure: line 3499: /usr/local/gcc-4.1.2-uClibc-0.9.29-xscale/
> > >>> bin/arm-linux-gcc: cannot execute binary file
> > >>> configure:3501: $? = 126
> > >>
> > >> That's apparently a problem with your compiler, not with Mono
> > >> configuration.
> > >>
> > >> Andreas
> > >
> > > --
> > > Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free
> > > Games!
> > > http://games.entertainment.gmx.net/de/entertainment/games/free
> > > _______________________________________________
> > > Mono-devel-list mailing list
> > > Mono-devel-list at lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>



-- 
Timothy B. Smith
Venturality, Inc.
847-420-2378
web: http://www.venturality.com
blog: http://ramblingentrepreneur.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080318/024c40de/attachment-0001.html 


More information about the Mono-devel-list mailing list