How to crosscompile ncurses-5.7

Andreas
Hi,

i am using the toolchain provided on this website:
http://friendlyarm.net/dl.php?file=arm-linux-gcc-4.3.2.tgz

together with the qtopia image.
http://friendlyarm.net/dl.php?file=linux-root_qtopia-64M_20090429.zip

I have already compiled my uboot and my kernel:
http://friendlyarm.net/dl.php?file=linux-2.6.29-mini2440_20090708.tgz

and i am using a SD-Card with an ext3 filesystem for my qtopia.
My frienlyArm is booting and also loading qt like normal.....

Now i want to have a NCURSES lib on my friendlyArm ( i want to use
midnightcommander or IpTraf or something like this.... but first i would be
happy if the examples of ncurses would work)

i have downloaded the ncurses-5.7 from:
http://ftp.gnu.org/pub/gnu/ncurses/

seting up my crosscompiler :
export ARCH=arm
export CROSS_COMPILE=arm-linux-
export PATH=$PATH:/usr/local/arm/4.3.2/bin

....
and then i try to compile ncurse:
./configure --target=arm-linux --host ......  --withshared

everything was running okay but if i try to execute the files i got a
segmentation fault...

And here is where i am stucked 

Thanks for your help

open-nandra
Are you sure you have libraries builded for ARM? Check with file command.
Seems to me you have build it for i386.

Fabien
I have already compiled it if you want to grab it:

http://mini2440.netyxia.net/viewtopic.php?f=9&t=22

open-nandra
@Fabien : thanks.
Need to build ncursesw (wide char support) to compile powertop to check on
mini2440. Anyway my recipe:
CC=arm-linux-gcc ./configure --host=arm-linux --with-shared --enable-widec
--with-build-cppflags=-D_GNU_SOURCE

make HOSTCC=gcc CXX=arm-linux-c++

Then it works fine ;)

marek

Diogo Melo
I'm trying to compile ncurses-5.9

I'm doing it this way:

export CC=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc 
export CXX=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-g++ 
export CPP=/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-cpp 
export CFLAGS="-nostdlib
-L/opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3
-I/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/include/" 
export
CPPFLAGS="-L/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/include/"

export
LDFLAGS="-L/opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi
/4.4.3/"

./configure --target=arm-linux --host=x86_64 
--prefix=/home/dmelo/friendlyarm/

I'm getting the following output error:

/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-gcc -DHAVE_CONFIG_H
-I../ncurses -I.
-L/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/include/ 
-D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64  -DNDEBUG -I. -I../include
-I/home/dmelo/friendlyarm//include/ncurses -nostdlib
-L/opt/FriendlyARM/toolschain/4.4.3/lib/gcc/arm-none-linux-gnueabi/4.4.3
-I/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/include/ 
--param max-inline-insns-single=1200 -c ../ncurses/./tinfo/lib_baudrate.c
-o ../objects/lib_baudrate.o
../ncurses/./tinfo/lib_baudrate.c: In function 'baudrate':
../ncurses/./tinfo/lib_baudrate.c:226: error: 'CBAUD' undeclared (first use
in this function)
../ncurses/./tinfo/lib_baudrate.c:226: error: (Each undeclared identifier
is reported only once
../ncurses/./tinfo/lib_baudrate.c:226: error: for each function it appears
in.)
make[1]: *** [../objects/lib_baudrate.o] Error 1
make[1]: Leaving directory
`/home/dmelo/friendlyarm/src/ncurses-5.9/ncurses'
make: *** [all] Error 2


Does anyone knows how to solve it?

davef
I'd guess you are missing a lib that has CBAUD in it.