This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems building GDB under cygwin and win2k


Have now found the problem. I eventually rebuilt the offending gdb/utils.c
using the -E flag in GCC to see what include files were being loaded and
found that term.h was being picked up from /usr/include and this declared
functions as being imported from a .dll. Thus the compiler was introducing
the __imp_ on the front of the tgetent() and tgetnum() functions and this
causes the link stage of GDB to fail. Renaming term.h so that configure does
not pickup the file and then the gdb/utils.c does not use the .dll version
of the functions. I am not sure which of the cygwin packages installed
term.h but assume is was something to do with termcap.

Hope this helps anyone else having problems with GDB linking under cygwin
and win2k.

Andy Hare

----- Original Message -----
From: "Christopher Faylor" <>
To: "GDB" <>
Sent: Monday, October 29, 2001 11:12 PM
Subject: Re: Problems building GDB under cygwin and win2k

> On Mon, Oct 29, 2001 at 08:36:55PM -0000, Andy Hare wrote:
> >I have been trying to build Insight targeted on ARM under cygwin and
> >I have come across a number of problems with the insight side of things
> >have now been fixed but GDB fails to build with the following error;
> >
> >gcc -g -O2        -Wl,--subsystem,console -o gdb.exe \
> >main.o libgdb.a cli-decode.o cli-script.o cli-cmds.o cli-setshow.o
> >cli-utils.o mi-out.o mi-console.o mi-cmds.o mi-cmd-var.o mi-cmd-break.o
> >mi-cmd-stack.o mi-cmd-disas.o mi-main.o mi-parse.o mi-getopt.o gdbtk.o
> >gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-register.o gdbtk-stack.o
> >gdbtk-varobj.o gdbtk-wrapper.o gdbres.o rdi-share/libangsd.a
> >../sim/arm/libsim.a ../bfd/libbfd.a ../readline/libreadline.a
> >../opcodes/libopcodes.a ./../intl/libintl.a ../libiberty/libiberty.a `if
> >test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a;
> >else echo -ltermcap; fi`
> >
> >
> >
>../libgui/src/libgui.a -L/build/arm/itcl/itcl -lcygitcl32 -L/build/arm/itcl
>itk -lcygitk32 -L/build/arm/tix/win/tcl8.3 -ltix4183 -L/build/arm/tk/win -l
> >ygtk83 -L/build/arm/tcl/win -lcygtcl83    -lgdi32 -lcomdlg32 -lm
>../libiberty/libiberty.a -luser32 -lshell32 -lgdi32 -lcomdlg32 -ladvapi32\
> >
> >libgdb.a(utils.o): In function `init_page_info':
> >/GNU-Source-Code/src/gdb/utils.c:1531: undefined reference to
> >`_imp__tgetent'
> >/GNU-Source-Code/src/gdb/utils.c:1537: undefined reference to
> >`_imp__tgetnum'
> >/GNU-Source-Code/src/gdb/utils.c:1547: undefined reference to
> >`_imp__tgetnum'
> >collect2: ld returned 1 exit status
> >make[2]: *** [gdb.exe] Error 1
> >make[2]: Leaving directory `/build/arm/gdb'
> >
> >This is the last stage of creating gdb.exe. I have checked though
> >gdb/utils.c to find the errors and find that the missing refernces are
> >in a section surrounded by a #ifndef _win32. With the this I realise that
> >maybe the gdb directory should be built with the -mwin32 construct in the
> >command line. Having done this I get a successful build. My question is
> >the correct solution or is there something else going wrong. I know there
> >have been problems of late with insight and cygwin and have helped to fix
> >these, is this a case of the same problems.
> It looks like you haven't built libtermcap.a for some reason and gdb is
> finding a libtermcap.a from some other library (ncurses?) which
> represents a shared library.
> gdb on Windows is not supposed to be using any shared libraries besides
> cygwin1.dll.
> cgf

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]