[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cross compiling to old mips-linux was tricky
From: |
Aapo Rantalainen |
Subject: |
Cross compiling to old mips-linux was tricky |
Date: |
Tue, 30 May 2023 20:20:21 +0300 |
Hi,
I successfully cross compiled ncurses-6.4-20230527 to (old)
MIPS-Linux. I think I found one typo in INSTALL.
--- INSTALL.old 2023-05-29 19:22:29.341932533 +0000
+++ INSTALL 2023-05-29 19:22:50.289937254 +0000
@@ -1028,7 +1028,7 @@
See also the --enable-getcap option.
--with-infocmp-path[=XXX]
- Use this option to override the automatic detection of tic in your
+ Use this option to override the automatic detection of infocmp in your
$PATH when building fallbacks (see "--with-fallbacks").
--with-install-prefix=XXX
--
I had couple of issues when cross compiling: My host is (intel) Ubuntu
and target is MIPS-Linux. I'm using gcc-4.3 because of my target and
thus I'm using older Ubuntu, which has (the known) problem that
system's /usr/bin/tic produces zero-size fallback.c (because of
"misc/terminfo.src line X terminal xterm-16color: error writing"). I
resolved that with --with-infocmp-path and --with-tic-path and
compiling ncurses two times a row. I though this would be done
automatically when cross compiling (if --with-build-cc is used).
Also I must use --disable-stripping because it is using system's strip
and not the cross-strip. (Maybe using "/usr/bin/install
--strip-program=" could solve this?)
And my last puzzle was about lib-suffixes. If configuring
default-suffixes I got libncursesw and libtinfow. With
--disable-lib-suffixes I got libncurses and libtinfo. Seems that
some/most/all/at least NetHack expected name libtinfo even when using
libncursesw. Is this just their own shame?
This is my working script:
#x-tools is crosstool-ng
export PATH=/home/user/x-tools/mipsel-unknown-linux-gnu/bin:$PATH
mkdir ~/mips
mkdir ~/src
cd ~/src
wget
https://invisible-island.net/archives/ncurses/current/ncurses-6.4-20230527.tgz
tar xf ncurses-6.4-20230527.tgz
cd ncurses-6.4-20230527
./configure
make
mkdir x86
cp progs/{tic,infocmp} x86
make clean
./configure --with-build-cc=gcc \
--host=mipsel-unknown-linux-gnu \
--target=mipsel-unknown-linux-gnu \
--prefix=/home/user/mips \
--without-manpages \
--with-shared \
--without-normal \
--with-cxx-shared \
--without-debug \
--without-ada \
--disable-stripping \
--enable-widec \
--disable-database \
--without-xterm-new \
--disable-home-terminfo \
--with-termlib \
--enable-termcap \
--with-fallbacks=vt100,xterm,xterm-256color \
--with-infocmp-path=`pwd`/x86/infocmp \
--with-tic-path=`pwd`/x86/tic
make
make install
mipsel-unknown-linux-gnu-strip /home/user/mips/bin/mips*
mipsel-unknown-linux-gnu-strip /home/user/mips/lib/*.so.6.4
cd /home/user/mips/lib/
ln -s libtinfow.so libtinfo.so
--
Aapo Rantalainen
- Cross compiling to old mips-linux was tricky,
Aapo Rantalainen <=