public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@delorie.com>
To: insulaner_andi@yahoo.com
Cc: gdb@sourceware.cygnus.com
Subject: Re: building GDB on Cygwin fails
Date: Sat, 11 Mar 2000 23:56:00 -0000	[thread overview]
Message-ID: <200003120756.CAA24399@indy.delorie.com> (raw)
In-Reply-To: <20000311184701.12922.qmail@web3401.mail.yahoo.com>

> Now I want to build GDB as well to debug my remote target.

Do you want to build a GDB executable to be run on the DOS target, to
debug the programs natively?  Or do you want to build GDB that will
run on a Windows machine and debug programs on the DOS target
remotely?

A native DJGPP build of GDB only supports the former.  For the latter,
you will need some kind of communications channel between the host and
the target.  I don't know if the current version of GDB supports
debugging a DOS target from a Cygwin host; if not, you will need to
hack around a bit.

> I installed the latest
> GDB (gdb-20000305.tar.gz). Configure works without any
> problem.

Please tell me how did you configure GDB.  That is, what was the
command line you used to invoke the configure script.

> When I try to build everything I get the
> following error while building the folder GDB :
> 
> 
> bash-2.02$ make
> 
> rm -f gdb.exe
> gcc -g        -o gdb.exe main.o libgdb.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`  
>   -lm  ../libiberty/libiberty.a -luser32 

There's something strange here: you are building a DJGPP binary, but
linking against libuser32.a, which is a Windows library.  Why?

> libgdb.a(stack.o): In function `frame_info':
> /djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/stack.c:952:
> undefined reference to `sigtramp_saved_pc'

The undefined references to sigtramp_saved_pc is a known bug in GDB
when building a native DJGPP version.  In fact, the DJGPP support in
current snapshots of GDB is broken, and these errors is one of the
symptoms of that breakage.  I have patches to fix that, but I didn't
yet commit them to the GDB CVS tree.  I will probably do that in the
next few days.

But since I'm not sure how did you configure GDB and why does
libuser32.a get linked in, I cannot guarantee that those patches will
solve your problems.

> /cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(tputs.o):
> In function `tputs':
> /home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:72:
> undefined reference to `_ctype_'

I'm guessing that the configure script found libtermcap.a on your
system and is trying to link it in.  You get undefined references
because that libtermcap.a was compiled with Cygwin, not with DJGPP.
If my guess is correct, you need to move libtermcap.a out of
configure's sight.  (The DJGPP version of GDB doesn't need and doesn't
use any termcap library.)

> I really don't know where to search for the error. It
> only says ***[gdb.exe] Error

All the messages you sent me are the errors it is complaining about.

WARNING: multiple messages have this Message-ID
From: Eli Zaretskii <eliz@delorie.com>
To: insulaner_andi@yahoo.com
Cc: gdb@sourceware.cygnus.com
Subject: Re: building GDB on Cygwin fails
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <200003120756.CAA24399@indy.delorie.com> (raw)
Message-ID: <20000401000000.W1UCqqlPzRDYvOE_77o5XthqwLH75BsMKDh1Wcqrbk4@z> (raw)
In-Reply-To: <20000311184701.12922.qmail@web3401.mail.yahoo.com>

> Now I want to build GDB as well to debug my remote target.

Do you want to build a GDB executable to be run on the DOS target, to
debug the programs natively?  Or do you want to build GDB that will
run on a Windows machine and debug programs on the DOS target
remotely?

A native DJGPP build of GDB only supports the former.  For the latter,
you will need some kind of communications channel between the host and
the target.  I don't know if the current version of GDB supports
debugging a DOS target from a Cygwin host; if not, you will need to
hack around a bit.

> I installed the latest
> GDB (gdb-20000305.tar.gz). Configure works without any
> problem.

Please tell me how did you configure GDB.  That is, what was the
command line you used to invoke the configure script.

> When I try to build everything I get the
> following error while building the folder GDB :
> 
> 
> bash-2.02$ make
> 
> rm -f gdb.exe
> gcc -g        -o gdb.exe main.o libgdb.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`  
>   -lm  ../libiberty/libiberty.a -luser32 

There's something strange here: you are building a DJGPP binary, but
linking against libuser32.a, which is a Windows library.  Why?

> libgdb.a(stack.o): In function `frame_info':
> /djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/stack.c:952:
> undefined reference to `sigtramp_saved_pc'

The undefined references to sigtramp_saved_pc is a known bug in GDB
when building a native DJGPP version.  In fact, the DJGPP support in
current snapshots of GDB is broken, and these errors is one of the
symptoms of that breakage.  I have patches to fix that, but I didn't
yet commit them to the GDB CVS tree.  I will probably do that in the
next few days.

But since I'm not sure how did you configure GDB and why does
libuser32.a get linked in, I cannot guarantee that those patches will
solve your problems.

> /cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(tputs.o):
> In function `tputs':
> /home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:72:
> undefined reference to `_ctype_'

I'm guessing that the configure script found libtermcap.a on your
system and is trying to link it in.  You get undefined references
because that libtermcap.a was compiled with Cygwin, not with DJGPP.
If my guess is correct, you need to move libtermcap.a out of
configure's sight.  (The DJGPP version of GDB doesn't need and doesn't
use any termcap library.)

> I really don't know where to search for the error. It
> only says ***[gdb.exe] Error

All the messages you sent me are the errors it is complaining about.

  parent reply	other threads:[~2000-03-11 23:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-11 10:47 Andreas Kuepper
2000-03-11 18:32 ` Chris Faylor
2000-04-01  0:00   ` Chris Faylor
2000-03-11 23:56 ` Eli Zaretskii [this message]
2000-04-01  0:00   ` Eli Zaretskii
2000-04-01  0:00 ` Andreas Kuepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003120756.CAA24399@indy.delorie.com \
    --to=eliz@delorie.com \
    --cc=gdb@sourceware.cygnus.com \
    --cc=insulaner_andi@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).