Gcc on mini2440

wedyan
can anyone tell me how to run gcc on mini2440 ?

davef
First two posts about running GCC natively on the mini2440!  School
assignment?

Think the first step is trying to work out how to cross compile the cross
compiler.

Start Googling.

wedyan
I build the cross compiler using your Video 
but now we need to install the Gcc on the mini the problem is the mini has
nothing install on it the apt-get not found the wget the gedit !!

Juergen Beisert
The first question is: Why do you really want to to run a compiler on this
target? This target is very slow compared to every x86 based host system.
So, cross compiling is the first choice for these kind of target systems.

wedyan
I need to run binary file that compiled on my host using C language 
i couldnt compile it using the cross compiler or write similar one
i dont know what to do how to run this binary on the mini ?:(

Juergen Beisert
"i couldnt compile it using the cross compiler" ???

davef
My comment was nonsense.

I think what you need to find is GCC built to run on an ARM platform, if
you want to compile (natively) on the mini2440.

However . . . which video are you referring to?

Also, I would need a clearer picture of what you are trying to do.

Dave

wedyan
@Juergen 
no i use percompiled program written in C 

@davef 
http://www.youtube.com/watch?v=ghzRuwEAWdo this one I beleive i saw it in
your old post :S 
i want to build speech recogantion system on the mini and all the dll and
binarys i need to use is written on C and needs a C compiler 
i tried the cross compiler but it gave me incompatabile source when i linke
to the speech librarys !? what can i do

Juergen Beisert
wedyan, "pre-compiled program" means an object file (*.o)? This implies you
do not have access to the source? Is it compiled for ARMv4 architecture?
OABI or EABI? Which floating point format does it use? If all these
settings fit to your Mini2440 root filesystem you can simply use a
cross-linker to transform this object file into an executable app.

wedyan
I get the configure file and i try to cross compile the package for
mini2440
I use the following 
./configure --host=armv4  --target=arm
--prefix=/home/wedyan/Desktop/PAD/install-arm --disable-short-tags
--without-mysql --with-thttpd=../../thttpd/thttpd-2.21b

but i have this error :( 
build/temp.linux-i686-2.5/sphinxbase.o: could not read symbols: File in
wrong format

what can i Do ?!:(

Dave Festing
Attachment: thttpd.zip (24 KB)
Rename as thttpd.doc

This was used to enable PHP in thttpd

Maybe this will help.

Also I think it should be armv4t not armv4.

Dave Festing
Also, have you checked that you are really using the cross compiler?

./configure --host=i386-linux-gnu --target=arm \
            --prefix=../install-php5 --disable-short-tags \
            --without-mysql --without-pear \
            --disable-all --with-thttpd=../thttpd-2.21b

Juergen Beisert
Most of the time configure uses --build for your host, and --host for the
target arch. For example "--build=i686-pc-linux-gnu
--host=arm-1176jzfs-linux-gnueabi". This will trigger the cross compile
feature of the autotools.

> build/temp.linux-i686-2.5/sphinxbase.o: could not read symbols: File in
> wrong format

Your "--host=armv4 --target=arm" still does *not* cross compile!

When I try it here (in a different package):

./configure --host=armv4 --target=arm
configure: WARNING: If you wanted to set the --build type, don't use
--host.
    If a cross compiler is detected then cross compile mode will be used.
[...]
checking whether we are cross compiling... no
[...]

It cannot work this way. Configure tries a "armv4-gcc", and if it does not
exist, it falls back to non cross compile. Instead this:

./configure --build=i686-pc-linux-gnu --host=arm-1176jzfs-linux-gnueabi
checking build system type... i686-pc-linux-gnu
checking host system type... arm-1176jzfs-linux-gnueabi
[...]
checking whether we are cross compiling... yes
[...]

The configure script tries here an "arm-1176jzfs-linux-gnueabi-gcc" to
detect the cross compile case. So, it must be in the PATH.

wedyan
thanx all for the help :) 

I just found it I used this configure 
./configure --host=armv4  --target=arm
--prefix=/home/wedyan/Desktop/PAD/install-arm --disable-short-tags
--without-mysql CC=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc
CXX=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-cpp 
CPP=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-cpp  --without-lapack
--without-python 

"--without-lapack --without-python"  solve the problem 
Now its all working without the need to gcc compiler :)

davef
"Now its all working without the need to gcc compiler :)"

??

Try taking out this line and see if it still "compiles"

CC=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc

wedyan
i didnt get it :( where to take this line ? i already run the binarys of
the package and run them on the mini and they works fine 
but now im having this issue 

A/D library not implemented

davef
Just to prove that you are REALLY using the GCC compiler I suggested
deleting/removing this line.  I am confident that your compilation will
fail.

In other words, you are really using the gcc compiler.