10

make and then failed with:

configure: error: no termcap library found, but that termcap lib is just there, why can't make find it?

checking for library containing zlibVersion... -lz
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing dlgetmodinfo... no
checking for iconv... yes
checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for library containing waddstr... no
configure: WARNING: no enhanced curses library found; disabling TUI
checking for library containing tgetent... no
configure: error: no termcap library found
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory `/var/lib/gforge/chroot/home/users/mirror/tmp/gdb-7.5'
make: *** [all] Error 2

I configure gdb with:

[mirror@hugemeow gdb-7.5]$ ./configure --libdir=/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/


checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile

that tempcap library is just there as I configured to gdb:

[mirror@hugemeow gdb-7.5]$ ls /var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/
libtermcap.a
[mirror@hugemeow gdb-7.5]$ ls /var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/include/
termcap.h

Edit 1: failed either, even with --includedir and --libdir option...

[mirror@hugemeow gdb-7.5]$ ./configure --includedir=/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/include/  --libdir=/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/
make
    checking for library containing tgetent... no
configure: error: no termcap library found
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory `/var/lib/gforge/chroot/home/users/mirror/tmp/gdb-7.5'
make: *** [all] Error 2

Edit 2: Now I build as Patrice Tisserand told, but also failed, with different error message as follows.

[mirror@hugemeow gdb-7.5]$ CFLAGS="-I/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/include/" LDFLAGS="-L/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/" ./configure && make

make[1]: Entering directory `/var/lib/gforge/chroot/home/users/mirror/tmp/gdb-7.5'
Configuring in ./intl
configure: loading cache ./config.cache
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  `-g -O2'
configure:   current value: `-I/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/include/'
configure: error: `LDFLAGS' has changed since the previous run:
configure:   former value:  ` '
configure:   current value: ` -L/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/'
configure: error: in `/var/lib/gforge/chroot/home/users/mirror/tmp/gdb-7.5/intl':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-intl] Error 1
make[1]: Leaving directory `/var/lib/gforge/chroot/home/users/mirror/tmp/gdb-7.5'
make: *** [all] Error 2

5 Answers 5

18

Installing libncurses will solve your problem. Try this if you are using any Debian OS: sudo apt-get install libncurses5-dev.

2
  • 2
    I was banging my head on this because I failed to notice that I'd installed plain libncurses and not the development package. Sep 23, 2013 at 14:53
  • This should be the accepted answer. By the way on OpenSUSE it is ncurses-devel package.
    – Anh Tuan
    Aug 28, 2015 at 7:01
3
./configure --includedir=/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/include/  --libdir=/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/

--includedir and --libdir are options for installation directories.

In order to use libraries from another directories, you can try to do the following:

CFLAGS="-I/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/include/" LDFLAGS="-L/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/" ./configure 
2
  • now i build as you tell me, but also failed, with different error message as follows. see edit 2
    – hugemeow
    Oct 18, 2012 at 18:01
  • hello, did you try to do make distclean as suggested in message output ? Oct 25, 2012 at 2:58
1

This was extremely helpful: http://archive09.linux.com/feature/121735

This example shows how to succeed when you find a target-native termcap library is missing (cross building is somewhat different here -- use ./configure --help when in doubt):

cd ~/work/cross/gdb/downloads
wget ftp://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
cd ..
tar xvzf downloads/termcap-1.3.1.tar.gz
mkdir -p ~/work/cross/gdb/build/termcap
cd ~/work/cross/gdb/build/termcap

export CC=powerpc-7450-linux-gnu-gcc
export RANLIB=powerpc-7450-linux-gnu-ranlib
../../termcap-1.3.1/configure --host=powerpc-7450-linux-gnu --prefix=$HOME/work/cross/termcap
make
make install
1
  • You really don't want to override target like that, it will begin looking for that path at runtime, on the remote target where that path doesn't exist. make DESTDIR=$HOME/work/cross install works around that problem, but doesn't help find the build dependencies
    – Ben Voigt
    Nov 6, 2015 at 21:11
0

When building crash tool (which also builds gdb) for 32-bit ARM from x86_64 host I've got similar issue which can be fixed by installing appropriate 32-bit version of ncurses. For Debian OS:

sudo apt-get install lib32ncurses5-dev

maybe someone will find it helpful.

0

For last error after Edit2,

$ mkdir newbuild
$ CFLAGS="-I/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/include/" LDFLAGS="-L/var/lib/gforge/chroot/home/users/mirror/ins/ins-gdb/lib/" ../configure
$ make

Or you can run previous configure commands, make distclean firstly, and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.