Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* unable to build arm9 gdb lack of termcap, termcap not provided by ncurses, rather terminfo
@ 2003-10-30 21:49 Wolcott, Ken (MED, Compuware)
  2003-10-30 22:12 ` Dan Kegel
       [not found] ` <20031030232655.GA15004@invisible-island.net>
  0 siblings, 2 replies; 5+ messages in thread
From: Wolcott, Ken (MED, Compuware) @ 2003-10-30 21:49 UTC (permalink / raw)
  To: gdb mailing list, crossgcc, ncurses mailing list

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

Hi;

  I'm still unable to build an arm9 gdb using Dan Kegel's crosstool 
(http://www.kegel.com/crosstool/) and a patched (ncurses-5.3-20031025) 
ncurses-5.3 because it complains about a missing termcap.  ncurses provides 
terminfo but I don't see a termcap.  The patched ncurses-53 apparently builds 
successfully if I turn off ada language support.  crosstool apparently builds 
the arm9 cross toolchain successfully.  Perhaps I haven't placed the 
libraries generated by ncurses in the correct location for the gdb build to 
see them.  I copied /tmp/ncurses/src/lib/* to the lib dir created by 
crosstool.  Perhaps gdb configure needs to be told where to get libraries 
from?  Bzip2'd output from the gdb build attempt and the script that 
initiates the build are attached.

Thanks,
Ken Wolcott


[-- Attachment #2: compile.log.bz2 --]
[-- Type: application/x-bzip2, Size: 10378 bytes --]

[-- Attachment #3: compile.sh --]
[-- Type: application/x-shellscript, Size: 637 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: unable to build arm9 gdb lack of termcap, termcap not provided by ncurses, rather terminfo
  2003-10-30 21:49 unable to build arm9 gdb lack of termcap, termcap not provided by ncurses, rather terminfo Wolcott, Ken (MED, Compuware)
@ 2003-10-30 22:12 ` Dan Kegel
  2003-10-31 17:41   ` Wolcott, Ken (MED, Compuware)
       [not found] ` <20031030232655.GA15004@invisible-island.net>
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Kegel @ 2003-10-30 22:12 UTC (permalink / raw)
  To: Wolcott, Ken (MED, Compuware)
  Cc: gdb mailing list, crossgcc, ncurses mailing list

Wolcott, Ken (MED, Compuware) wrote:
>   I'm still unable to build an arm9 gdb using Dan Kegel's crosstool 
> (http://www.kegel.com/crosstool/) and a patched (ncurses-5.3-20031025) 
> ncurses-5.3 because it complains about a missing termcap.  ncurses provides 
> terminfo but I don't see a termcap.  The patched ncurses-53 apparently builds 
> successfully if I turn off ada language support.  crosstool apparently builds 
> the arm9 cross toolchain successfully.  Perhaps I haven't placed the 
> libraries generated by ncurses in the correct location for the gdb build to 
> see them.  I copied /tmp/ncurses/src/lib/* to the lib dir created by 
> crosstool.  Perhaps gdb configure needs to be told where to get libraries 
> from?  Bzip2'd output from the gdb build attempt and the script that 
> initiates the build are attached.

(A couple tips:
add set -x to your build scripts in the future, makes the logs easier to read.
add set -e as well, so the script aborts at first error.)

The thing to do here is to read gdb's configure script to see where it is
outputting that error message, "configure: error: no termcap library found".
That will tell you how it's looking for the library.

Another thing you could do is use your cross-compiler to do a trivial program
that uses ncurses.  If it doesn't compile, or doesn't link, you have
installed ncurses wrong.

If you copied the files by hand, you probably installed them wrong.
It's better form to use ncurses' "make install" rule to install the files.
You may need to override the destination directory when you do this.
To tell how to do this, either read the ncurses Makefile, or look
at how some other package cross-builds and installs ncurses.  ptxdist
does the install step like this:

make DESTDIR=$(CROSS_LIB_DIR) prefix='' exec_prefix='' install

where CROSS_LIB_DIR is $(PTXCONF_PREFIX)/$(PTXCONF_GNU_TARGET)
or something like /opt/crosstool/$(TARGET)/$(TOOLCOMBO)/$(TARGET)

- Dan

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: unable to build arm9 gdb lack of termcap, termcap not provided by ncurses, rather terminfo
       [not found] ` <20031030232655.GA15004@invisible-island.net>
@ 2003-10-31 14:43   ` Wolcott, Ken (MED, Compuware)
  0 siblings, 0 replies; 5+ messages in thread
From: Wolcott, Ken (MED, Compuware) @ 2003-10-31 14:43 UTC (permalink / raw)
  To: dickey; +Cc: gdb mailing list

Hi Thomas;

  Hmmm...config.log in the gdb build directory shows nothing really meaningful 
unfortunately :-(

******************************************
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:581: checking host system type
configure:602: checking target system type
configure:620: checking build system type
configure:2697: checking for arm-arm9-linux-gnu-ar
configure:2769: checking for arm-arm9-linux-gnu-as
configure:2841: checking for arm-arm9-linux-gnu-dlltool
configure:2913: checking for arm-arm9-linux-gnu-ld
configure:2985: checking for arm-arm9-linux-gnu-nm
configure:3057: checking for arm-arm9-linux-gnu-ranlib
configure:3129: checking for arm-arm9-linux-gnu-windres
configure:3201: checking for arm-arm9-linux-gnu-objcopy
configure:3273: checking for arm-arm9-linux-gnu-objdump
configure:3354: checking for arm-arm9-linux-gnu-ar
configure:3426: checking for arm-arm9-linux-gnu-as
configure:3498: checking for arm-arm9-linux-gnu-dlltool
configure:3570: checking for arm-arm9-linux-gnu-ld
configure:3642: checking for arm-arm9-linux-gnu-nm
configure:3714: checking for arm-arm9-linux-gnu-ranlib
configure:3786: checking for arm-arm9-linux-gnu-windres
configure:3886: checking whether to enable maintainer-specific portions of 
Makefiles
******************************************

Ken

On Thursday 30 October 2003 17:26, Thomas Dickey wrote:
> On Thu, Oct 30, 2003 at 03:52:03PM -0600, Wolcott, Ken (MED, Compuware) 
wrote:
> > Hi;
> >
> >   I'm still unable to build an arm9 gdb using Dan Kegel's crosstool
> > (http://www.kegel.com/crosstool/) and a patched (ncurses-5.3-20031025)
> > ncurses-5.3 because it complains about a missing termcap.  ncurses
> > provides terminfo but I don't see a termcap.  The patched ncurses-53
> > apparently builds successfully if I turn off ada language support. 
> > crosstool apparently builds the arm9 cross toolchain successfully. 
> > Perhaps I haven't placed the libraries generated by ncurses in the
> > correct location for the gdb build to see them.  I copied
> > /tmp/ncurses/src/lib/* to the lib dir created by crosstool.  Perhaps gdb
> > configure needs to be told where to get libraries from?  Bzip2'd output
> > from the gdb build attempt and the script that initiates the build are
> > attached.
>
> There should be a config.log file in the gdb subdirectory that shows
> exactly what libraries were tried, and the corresponding -L options.
>
> This is what I'm using for djgpp for instance (to test cross-compiles of
> ncurses).
>
> #!/bin/sh
> # $Id: cfg-djgpp,v 1.2 2003/09/14 17:41:06 tom Exp $
> # configure to cross-compile ncurses for djgcc
> #
> # TODO: can I make it build with gnat?
> TARGET=i586-pc-msdosdjgpp
> TOOLS=/usr/local/compiler/cross/djgpp
> # export PATH=$TOOLS/bin:$PATH
> export AR=$TOOLS/bin/$TARGET-ar
> export RANLIB=$TOOLS/bin/$TARGET-ranlib
> export LD=$TOOLS/bin/$TARGET-ld
> export CC=djgcc
> export CXX=djgpp
> ./configure \
> 	--with-build-cc=gcc \
> 	--host=$TARGET \
> 	--target=$TARGET \
> 	$*


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: unable to build arm9 gdb lack of termcap, termcap not provided by ncurses, rather terminfo
  2003-10-30 22:12 ` Dan Kegel
@ 2003-10-31 17:41   ` Wolcott, Ken (MED, Compuware)
  2003-10-31 18:41     ` Dan Kegel
  0 siblings, 1 reply; 5+ messages in thread
From: Wolcott, Ken (MED, Compuware) @ 2003-10-31 17:41 UTC (permalink / raw)
  To: Dan Kegel; +Cc: gdb mailing list, crossgcc, ncurses mailing list

On Thursday 30 October 2003 16:18, Dan Kegel wrote:
> Wolcott, Ken (MED, Compuware) wrote:
> >   I'm still unable to build an arm9 gdb using Dan Kegel's crosstool
> > (http://www.kegel.com/crosstool/) and a patched (ncurses-5.3-20031025)
> > ncurses-5.3 because it complains about a missing termcap.  ncurses
> > provides terminfo but I don't see a termcap.  The patched ncurses-53
> > apparently builds successfully if I turn off ada language support. 
> > crosstool apparently builds the arm9 cross toolchain successfully. 
> > Perhaps I haven't placed the libraries generated by ncurses in the
> > correct location for the gdb build to see them.  I copied
> > /tmp/ncurses/src/lib/* to the lib dir created by crosstool.  Perhaps gdb
> > configure needs to be told where to get libraries from?  Bzip2'd output
> > from the gdb build attempt and the script that initiates the build are
> > attached.
>
> (A couple tips:
> add set -x to your build scripts in the future, makes the logs easier to
> read. add set -e as well, so the script aborts at first error.)
>
> The thing to do here is to read gdb's configure script to see where it is
> outputting that error message, "configure: error: no termcap library
> found". That will tell you how it's looking for the library.
>
> Another thing you could do is use your cross-compiler to do a trivial
> program that uses ncurses.  If it doesn't compile, or doesn't link, you
> have installed ncurses wrong.
>
> If you copied the files by hand, you probably installed them wrong.
> It's better form to use ncurses' "make install" rule to install the files.
> You may need to override the destination directory when you do this.
> To tell how to do this, either read the ncurses Makefile, or look
> at how some other package cross-builds and installs ncurses.  ptxdist
> does the install step like this:
>
> make DESTDIR=$(CROSS_LIB_DIR) prefix='' exec_prefix='' install
>
> where CROSS_LIB_DIR is $(PTXCONF_PREFIX)/$(PTXCONF_GNU_TARGET)
> or something like /opt/crosstool/$(TARGET)/$(TOOLCOMBO)/$(TARGET)
>
> - Dan

Hi Dan;

  I'm trying to remember to append my replies to the bottom of existing msgs 
:-)

  I added -ex to my script.

  I looked at gdb configure and the resultant Makefile for the specific error 
string...it is very hard for me to follow :-(

looking for termcap in configure:
*******************************************************
grep termcap ../gdb-6.0/configure
    configdirs="$configdirs libtermcap" ;;
    target_configdirs="$target_configdirs target-libtermcap target-winsup"
*******************************************************

looking for termcap in Makefile generates lots of output, but in that output, 
library is not found:

****************************************
grep termcap Makefile | grep library
<no putput>
****************************************

I changed the make install line for ncurses compile script to point to the lib 
generated by crosstool.  Looks like the libraries were written there 
successfully.  But the gdb compile still fails for the same reason.

:-(

Ken


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: unable to build arm9 gdb lack of termcap, termcap not provided by ncurses, rather terminfo
  2003-10-31 17:41   ` Wolcott, Ken (MED, Compuware)
@ 2003-10-31 18:41     ` Dan Kegel
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Kegel @ 2003-10-31 18:41 UTC (permalink / raw)
  To: Wolcott, Ken (MED, Compuware)
  Cc: Dan Kegel, gdb mailing list, crossgcc, ncurses mailing list

Wolcott, Ken (MED, Compuware) wrote:
>   I'm trying to remember to append my replies to the bottom of existing msgs 
> :-)

Also please remember to trim the message you're quoting; ideally you'll
only keep the gist.  Remember, people's eyes glaze over after line 5 of the message.

>   I looked at gdb configure and the resultant Makefile for the specific error 
> string...it is very hard for me to follow :-(
> 
> $ grep termcap ../gdb-6.0/configure
>     configdirs="$configdirs libtermcap" ;;
>     target_configdirs="$target_configdirs target-libtermcap target-winsup"

A better command for digging for termcap configure stuff might be
$ find . -type f -not -name '*.c' | xargs egrep -l 'termcap|ncurses'

In gdb-5.3, the most interesting match is gdb-5.3/gdb/configure.in, which says

   AC_CHECK_LIB(ncurses, tgetent, TERM_LIB=-lncurses,
     AC_CHECK_LIB(Hcurses, tgetent, TERM_LIB=-lHcurses,
       AC_CHECK_LIB(termlib, tgetent, TERM_LIB=-ltermlib,
         AC_CHECK_LIB(termcap, tgetent, TERM_LIB=-ltermcap,
           AC_CHECK_LIB(curses, tgetent, TERM_LIB=-lcurses,
             AC_CHECK_LIB(terminfo, tgetent, TERM_LIB=-lterminfo))))))

Now, you did go and do an autotools tutorial from the list I pointed you to,
right? :-)  Then you'll know what AC_CHECK_LIB(foo, bar, ...) does: it just tries to
link a little C program that refers to symbol 'bar' in library -lfoo.

So try that by hand without gdb or autoconf!  If it doesn't link the
way you expect, ncurses is installed wrong.  You can use the --print-search-dirs
option to your gcc, and look for the "libraries:" line, to see what
directories it searches to find the library.  You can also use -L to
add a directory to that list.

Cheers,
Dan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-31 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 21:49 unable to build arm9 gdb lack of termcap, termcap not provided by ncurses, rather terminfo Wolcott, Ken (MED, Compuware)
2003-10-30 22:12 ` Dan Kegel
2003-10-31 17:41   ` Wolcott, Ken (MED, Compuware)
2003-10-31 18:41     ` Dan Kegel
     [not found] ` <20031030232655.GA15004@invisible-island.net>
2003-10-31 14:43   ` Wolcott, Ken (MED, Compuware)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox