bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Success cross-compiling ncurses-5.3-20030719 -- but can't install


From: Dan Kegel
Subject: Success cross-compiling ncurses-5.3-20030719 -- but can't install
Date: Thu, 28 Aug 2003 14:18:25 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Dan Kegel wrote:
ncurses-5.3 seems to be smart about not using strstream,
but this fails when you specify a cross-compiler with --build-cc ...
I gather the "right" way to configure ncurses is to override CC and HOSTCC
on the commandline, and ignore the --with-build-cc option.

The following script seems to successfully configure and cross-compile
ncurses-5.3 with my local gcc-3.3.1 crosstoolchain.  (It doesn't
use --with-build-cc, since using that interferes with autoconf
tests and causes the build to fail.)

It doesn't install it, though. 'make install' tries to run the
tic that was compiled for the target, which doesn't work, of course.

Is the output of 'tic' byte-order independent?  If so, I could
compile ncurses a second time, for the build system, and use the
'tic' it produces to install the terminfo entries.

Suggestions welcome.

------------------ snip ----------------
#!/bin/sh

TARGET=powerpc-750-linux-gnu
CROSS=/opt/cegl-2.0/${TARGET}/gcc-3.3.1-glibc-2.3.2/bin/${TARGET}-

# Fetch ncurses and rollup patch (patch needed to cross-compile!), unpack, patch
wget -c ftp://invisible-island.net/ncurses/ncurses-5.3.tar.gz
wget -c ftp://invisible-island.net/ncurses/5.3/ncurses-5.3-20030719-patch.sh.bz2
tar -xzvf ncurses-5.3.tar.gz
cd ncurses-5.3
bzcat ../ncurses-5.3-20030719-patch.sh.bz2 | patch -p1
cd ..

rm -rf ncurses-demo
mkdir ncurses-demo
cd ncurses-demo

# Configure and build
# Note: in previous releases, had to specify --target.  Now it's --host for 
some reason.
# Note: do not use --with-build-cc, it doesn't interact properly with autoconf
../ncurses-5.3/configure BUILD_CC=gcc CC=${CROSS}gcc CXX=${CROSS}g++ 
AR=${CROSS}ar LD=${CROSS}ld --host=$TARGET --with-shared
make -j2

------------------ snip ----------------


.
- Dan

--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045






reply via email to

[Prev in Thread] Current Thread [Next in Thread]