public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* building GDB on Cygwin fails
@ 2000-03-11 10:47 Andreas Kuepper
  2000-03-11 18:32 ` Chris Faylor
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andreas Kuepper @ 2000-03-11 10:47 UTC (permalink / raw)
  To: gdb

Hi there,

I am running a Win98 host system and installed Cygwin
successfully. The building of a GCC cross compiler was
also successfully for a DOS based target system using
DJGPP.

Now I want to install GDB on my host(on Cygwin) and
build it for my DJGPP target. By using the latest GDB
(gdb-20000305.tar.bz2) the configure script works
fine. But when I want to build it, I get the following
error message while 'make' is inside the gdb-folder :

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 
libgdb.a(stack.o): In function `frame_info':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/stack.c:952:
undefined reference to `sigtramp_saved_pc'
libgdb.a(blockframe.o): In function
`file_frame_chain_valid':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:48:
undefined reference to `sigtramp_saved_pc'
libgdb.a(blockframe.o): In function `get_prev_frame':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:479:
undefined reference to `sigtramp_saved_pc'
libgdb.a(blockframe.o): In function
`generic_file_frame_chain_valid':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1276:
undefined reference to `sigtramp_saved_pc'
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1279:
undefined reference to `sigtramp_saved_pc'
/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_'
/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:75:
undefined reference to `_ctype_'
/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:80:
undefined reference to `_ctype_'
/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(termcap.o):
In function `tgetent':
/home/noer/src/b20/comp-tools/devo/libtermcap/termcap.c:251:
undefined reference to `_ctype_'
/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(getcap.o):
In function `cgetnext':
/home/noer/src/b20/comp-tools/devo/libtermcap/getcap.c:686:
undefined reference to `_ctype_'
collect2: ld returned 1 exit status
make: *** [gdb.exe] Error 1
bash-2.02$ 


I really don't know where to search for the fault
***[gdb.exe] Error

Thank you for your help !!

Andreas Kuepper
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

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

* Re: building GDB on Cygwin fails
  2000-03-11 10:47 building GDB on Cygwin fails Andreas Kuepper
@ 2000-03-11 18:32 ` Chris Faylor
  2000-04-01  0:00   ` Chris Faylor
  2000-03-11 23:56 ` Eli Zaretskii
  2000-04-01  0:00 ` Andreas Kuepper
  2 siblings, 1 reply; 6+ messages in thread
From: Chris Faylor @ 2000-03-11 18:32 UTC (permalink / raw)
  To: Andreas Kuepper; +Cc: gdb

You have multiple problems here.

It looks like something has changed which causes gdb to require the
sigtramp_saved_pc function.  I wonder if this is somehow due to Mark
Kettenis's changes of 2000-03-04.

Your other problems are due to the fact that you are mixing an old
library (libtermcap.a) with a newer libcygwin.a --  _ctype_ is no longer
defined in libcygwin.a.  The simple solution is to recompile libtermcap.a
using the headers and libraries in one of the cygwin snapshots.

cgf

On Sat, Mar 11, 2000 at 10:47:01AM -0800, Andreas Kuepper wrote:
>I am running a Win98 host system and installed Cygwin
>successfully. The building of a GCC cross compiler was
>also successfully for a DOS based target system using
>DJGPP.
>
>Now I want to install GDB on my host(on Cygwin) and
>build it for my DJGPP target. By using the latest GDB
>(gdb-20000305.tar.bz2) the configure script works
>fine. But when I want to build it, I get the following
>error message while 'make' is inside the gdb-folder :
>
>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 
>libgdb.a(stack.o): In function `frame_info':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/stack.c:952:
>undefined reference to `sigtramp_saved_pc'
>libgdb.a(blockframe.o): In function
>`file_frame_chain_valid':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:48:
>undefined reference to `sigtramp_saved_pc'
>libgdb.a(blockframe.o): In function `get_prev_frame':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:479:
>undefined reference to `sigtramp_saved_pc'
>libgdb.a(blockframe.o): In function
>`generic_file_frame_chain_valid':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1276:
>undefined reference to `sigtramp_saved_pc'
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1279:
>undefined reference to `sigtramp_saved_pc'
>/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_'
>/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:75:
>undefined reference to `_ctype_'
>/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:80:
>undefined reference to `_ctype_'
>/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(termcap.o):
>In function `tgetent':
>/home/noer/src/b20/comp-tools/devo/libtermcap/termcap.c:251:
>undefined reference to `_ctype_'
>/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(getcap.o):
>In function `cgetnext':
>/home/noer/src/b20/comp-tools/devo/libtermcap/getcap.c:686:
>undefined reference to `_ctype_'
>collect2: ld returned 1 exit status
>make: *** [gdb.exe] Error 1
>bash-2.02$ 
>
>
>I really don't know where to search for the fault
>***[gdb.exe] Error
>
>Thank you for your help !!
>
>Andreas Kuepper
>__________________________________________________
>Do You Yahoo!?
>Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com

-- 
cgf@cygnus.com                        Cygnus Solutions, a Red Hat company
http://sourcware.cygnus.com/          http://www.redhat.com/

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

* Re: building GDB on Cygwin fails
  2000-03-11 10:47 building GDB on Cygwin fails Andreas Kuepper
  2000-03-11 18:32 ` Chris Faylor
@ 2000-03-11 23:56 ` Eli Zaretskii
  2000-04-01  0:00   ` Eli Zaretskii
  2000-04-01  0:00 ` Andreas Kuepper
  2 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2000-03-11 23:56 UTC (permalink / raw)
  To: insulaner_andi; +Cc: gdb

> 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.

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

* Re: building GDB on Cygwin fails
  2000-03-11 18:32 ` Chris Faylor
@ 2000-04-01  0:00   ` Chris Faylor
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Faylor @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Andreas Kuepper; +Cc: gdb

You have multiple problems here.

It looks like something has changed which causes gdb to require the
sigtramp_saved_pc function.  I wonder if this is somehow due to Mark
Kettenis's changes of 2000-03-04.

Your other problems are due to the fact that you are mixing an old
library (libtermcap.a) with a newer libcygwin.a --  _ctype_ is no longer
defined in libcygwin.a.  The simple solution is to recompile libtermcap.a
using the headers and libraries in one of the cygwin snapshots.

cgf

On Sat, Mar 11, 2000 at 10:47:01AM -0800, Andreas Kuepper wrote:
>I am running a Win98 host system and installed Cygwin
>successfully. The building of a GCC cross compiler was
>also successfully for a DOS based target system using
>DJGPP.
>
>Now I want to install GDB on my host(on Cygwin) and
>build it for my DJGPP target. By using the latest GDB
>(gdb-20000305.tar.bz2) the configure script works
>fine. But when I want to build it, I get the following
>error message while 'make' is inside the gdb-folder :
>
>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 
>libgdb.a(stack.o): In function `frame_info':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/stack.c:952:
>undefined reference to `sigtramp_saved_pc'
>libgdb.a(blockframe.o): In function
>`file_frame_chain_valid':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:48:
>undefined reference to `sigtramp_saved_pc'
>libgdb.a(blockframe.o): In function `get_prev_frame':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:479:
>undefined reference to `sigtramp_saved_pc'
>libgdb.a(blockframe.o): In function
>`generic_file_frame_chain_valid':
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1276:
>undefined reference to `sigtramp_saved_pc'
>/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1279:
>undefined reference to `sigtramp_saved_pc'
>/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_'
>/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:75:
>undefined reference to `_ctype_'
>/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:80:
>undefined reference to `_ctype_'
>/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(termcap.o):
>In function `tgetent':
>/home/noer/src/b20/comp-tools/devo/libtermcap/termcap.c:251:
>undefined reference to `_ctype_'
>/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(getcap.o):
>In function `cgetnext':
>/home/noer/src/b20/comp-tools/devo/libtermcap/getcap.c:686:
>undefined reference to `_ctype_'
>collect2: ld returned 1 exit status
>make: *** [gdb.exe] Error 1
>bash-2.02$ 
>
>
>I really don't know where to search for the fault
>***[gdb.exe] Error
>
>Thank you for your help !!
>
>Andreas Kuepper
>__________________________________________________
>Do You Yahoo!?
>Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com

-- 
cgf@cygnus.com                        Cygnus Solutions, a Red Hat company
http://sourcware.cygnus.com/          http://www.redhat.com/

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

* Re: building GDB on Cygwin fails
  2000-03-11 23:56 ` Eli Zaretskii
@ 2000-04-01  0:00   ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2000-04-01  0:00 UTC (permalink / raw)
  To: insulaner_andi; +Cc: gdb

> 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.

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

* building GDB on Cygwin fails
  2000-03-11 10:47 building GDB on Cygwin fails Andreas Kuepper
  2000-03-11 18:32 ` Chris Faylor
  2000-03-11 23:56 ` Eli Zaretskii
@ 2000-04-01  0:00 ` Andreas Kuepper
  2 siblings, 0 replies; 6+ messages in thread
From: Andreas Kuepper @ 2000-04-01  0:00 UTC (permalink / raw)
  To: gdb

Hi there,

I am running a Win98 host system and installed Cygwin
successfully. The building of a GCC cross compiler was
also successfully for a DOS based target system using
DJGPP.

Now I want to install GDB on my host(on Cygwin) and
build it for my DJGPP target. By using the latest GDB
(gdb-20000305.tar.bz2) the configure script works
fine. But when I want to build it, I get the following
error message while 'make' is inside the gdb-folder :

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 
libgdb.a(stack.o): In function `frame_info':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/stack.c:952:
undefined reference to `sigtramp_saved_pc'
libgdb.a(blockframe.o): In function
`file_frame_chain_valid':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:48:
undefined reference to `sigtramp_saved_pc'
libgdb.a(blockframe.o): In function `get_prev_frame':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:479:
undefined reference to `sigtramp_saved_pc'
libgdb.a(blockframe.o): In function
`generic_file_frame_chain_valid':
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1276:
undefined reference to `sigtramp_saved_pc'
/djgpp/cross/gdb2000/gdb/../../gdb-20000305/gdb/blockframe.c:1279:
undefined reference to `sigtramp_saved_pc'
/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_'
/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:75:
undefined reference to `_ctype_'
/home/noer/src/b20/comp-tools/devo/libtermcap/tputs.c:80:
undefined reference to `_ctype_'
/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(termcap.o):
In function `tgetent':
/home/noer/src/b20/comp-tools/devo/libtermcap/termcap.c:251:
undefined reference to `_ctype_'
/cygdrive/c/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95.2/../../../libtermcap.a(getcap.o):
In function `cgetnext':
/home/noer/src/b20/comp-tools/devo/libtermcap/getcap.c:686:
undefined reference to `_ctype_'
collect2: ld returned 1 exit status
make: *** [gdb.exe] Error 1
bash-2.02$ 


I really don't know where to search for the fault
***[gdb.exe] Error

Thank you for your help !!

Andreas Kuepper
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

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

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-11 10:47 building GDB on Cygwin fails Andreas Kuepper
2000-03-11 18:32 ` Chris Faylor
2000-04-01  0:00   ` Chris Faylor
2000-03-11 23:56 ` Eli Zaretskii
2000-04-01  0:00   ` Eli Zaretskii
2000-04-01  0:00 ` Andreas Kuepper

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).