Cross-Compile ncurses for ARM?

Jun 04, 2008 2 Replies

Hey,



Has anyone had any success cross-compiling ncurses? I am having problems with the configure script not recognizing my CC..



Ex, if my GNUmakefile does: ./configure --target=arm-unknown-linux-gnu --with-shared --without-ada



--with-build-cc=$CC --with-build-cpp=$CXX --with-build-cppflags= $CPPFLAGS --disable-big-core --enable-termcap --enable-echo --enable- warnings



and sets: CC :=arm-none-linux-gnueabi-gcc CXX :=arm-none-linux-gnueabi-g++



The configure script always outputs: checking for egrep... grep -E Configuring NCURSES 5.6 ABI 5 (Wed Jun 4 11:41:31 PDT 2008) checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... arm-unknown-linux-gnu Configuring for linux-gnu checking for prefix... /usr checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no ...



----------------------------------------------------------------^^



Anyone have any luck cross-compiling these sources for ARM? It would really help for a university robotics team..



Thanks! Moe


your main problem is the --target flag. afaik it is only used for building cross-compilers:

[from ./configure --help]

System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST]

what you need to specify is --host. the following works for me:

./configure --host=arm-unknown-linux-gnu --with-shared --without-ada

--disable-big-core --enable-termcap --enable-echo --enable-warnings

good luck!

Thanks!

And if anyone else is having issues, make sure you set BUILD_CC=gcc (or whatever your build env compiler is..).

example that worked for me: ./configure arm-linux --host=arm-none-linux-gnueabi --with-shared -- without-ada --with-build-cc=gcc --with-build-cpp=arm-none-linux- gnueabi-g++ --disable-big-core --enable-termcap --prefix=/usr -- disable-GPM --with-build-ldflags="$(LDFLAGS)" --with-build-cflags="$ (CFLAGS)" --with-build-cppflags="$(CPPFLAGS)"

Cheers Moe University of Waterloo

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required