* GDB/Mingw make problem
@ 2008-01-13 19:18 Gerrit van Niekerk
2008-01-13 20:05 ` Eli Zaretskii
2008-02-09 0:48 ` Dave Murphy
0 siblings, 2 replies; 15+ messages in thread
From: Gerrit van Niekerk @ 2008-01-13 19:18 UTC (permalink / raw)
To: gdb
I am trying to make GDB-6.7.1 using MinGW on WinXP.
Configure works fine:
./configure --host=i686-pc-mingw32 --target=djgpp
Make gives the following error:
sed -f .././bfd/targmatch.sed < .././bfd/config.bfd > targmatch.new
sed: file .././bfd/targmatch.sed line 1: Extra characters after command
make[4]: *** [targmatch.h] Error 1
The problem seems to be a very old version (v 3.02) of SED and I can't find a more recent one.
Any help would be appreciated.
--
Gerrit van Niekerk
GP van Niekerk Ondernemings BK
Roosstraat 211, Meyerspark, 0184, South Africa
Tel: +27(12)8036501 Fax SA: 0866 413 555
Cell: +27(73)6891370
Fax Int'l: +1(206)2034139
Email: gerritvn@gpvno.co.za
Web: http://www.gpvno.co.za
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-13 19:18 GDB/Mingw make problem Gerrit van Niekerk
@ 2008-01-13 20:05 ` Eli Zaretskii
2008-01-13 20:59 ` Gerrit van Niekerk
2008-02-09 0:48 ` Dave Murphy
1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2008-01-13 20:05 UTC (permalink / raw)
To: gerritvn, gpvno; +Cc: gdb
> From: "Gerrit van Niekerk" <gerritvn@gpvno.co.za>
> Date: Sun, 13 Jan 2008 21:18:26 +0200
>
> The problem seems to be a very old version (v 3.02) of SED and I can't find a more recent one.
> Any help would be appreciated.
I think the GnuWin32 site has a newer version of Sed.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-13 20:05 ` Eli Zaretskii
@ 2008-01-13 20:59 ` Gerrit van Niekerk
2008-01-14 4:05 ` Eli Zaretskii
0 siblings, 1 reply; 15+ messages in thread
From: Gerrit van Niekerk @ 2008-01-13 20:59 UTC (permalink / raw)
To: Eli Zaretskii, gdb; +Cc: gdb
On 13 Jan 2008 at 22:04, Eli Zaretskii wrote:
> > From: "Gerrit van Niekerk" <gerritvn@gpvno.co.za>
> > Date: Sun, 13 Jan 2008 21:18:26 +0200
> >
> > The problem seems to be a very old version (v 3.02) of SED and I can't find a more recent one.
> > Any help would be appreciated.
>
> I think the GnuWin32 site has a newer version of Sed.
Thanks Eli, but the GnuWin32 copy of SED is not compatible with MinGW; it does the same as the
Cygwin copy of SED: It does not understand parameters passed by MSYS
--
Gerrit van Niekerk
GP van Niekerk Ondernemings BK
Roosstraat 211, Meyerspark, 0184, South Africa
Tel: +27(12)8036501 Fax SA: 0866 413 555
Cell: +27(73)6891370
Fax Int'l: +1(206)2034139
Email: gerritvn@gpvno.co.za
Web: http://www.gpvno.co.za
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-13 20:59 ` Gerrit van Niekerk
@ 2008-01-14 4:05 ` Eli Zaretskii
2008-01-14 16:42 ` Gerrit van Niekerk
0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2008-01-14 4:05 UTC (permalink / raw)
To: gerritvn, gpvno; +Cc: gdb
> From: "Gerrit van Niekerk" <gerritvn@gpvno.co.za>
> Date: Sun, 13 Jan 2008 22:58:09 +0200
> CC: gdb@sourceware.org
>
> On 13 Jan 2008 at 22:04, Eli Zaretskii wrote:
>
> > > From: "Gerrit van Niekerk" <gerritvn@gpvno.co.za>
> > > Date: Sun, 13 Jan 2008 21:18:26 +0200
> > >
> > > The problem seems to be a very old version (v 3.02) of SED and I can't find a more recent one.
> > > Any help would be appreciated.
> >
> > I think the GnuWin32 site has a newer version of Sed.
>
> Thanks Eli, but the GnuWin32 copy of SED is not compatible with MinGW; it does the same as the
> Cygwin copy of SED: It does not understand parameters passed by MSYS
Well, you didn't say anything about MSYS before.
I believe there's an MSYS version of Sed as well, check out the MinGW
site.
Failing that, building Sed is not a hard job, so just get the latest
sources from the GNU FTP site and build it with MSYS.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-14 4:05 ` Eli Zaretskii
@ 2008-01-14 16:42 ` Gerrit van Niekerk
2008-01-14 16:45 ` Bob Rossi
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Gerrit van Niekerk @ 2008-01-14 16:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb
On 14 Jan 2008 at 6:05, Eli Zaretskii wrote:
> Well, you didn't say anything about MSYS before.
Sorry, I thought MinGW implied MSYS :)
> I believe there's an MSYS version of Sed as well, check out the MinGW
> site.
Could not locate it, so I decided that Cygwin is probably a better platform and it got further as
well, but got a problem compiling bfd/archive.c with a missing libintl.h.
To recap:
I made a directory CYGWIN in C:\develop\gdb-6.7.1 and in the Cygwin Bash shell executed:
$ cd /cygdrive/c/develop/gdb-6.7.1/cygwin
$ ../configure --host=i686-pc-mingw32 --target=djgpp
.
.
$ make
.
.
make[4]: Entering directory `/cygdrive/c/develop/gdb-6.7.1/cygwin/bfd'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../bfd -I
. -D__USE_MINGW_FSEEK -I. -I../../bfd -I../../bfd/../include -I./../intl -
W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o archive.lo
../../bfd/archive.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -D__USE_MINGW_FSEEK -
I. -I../../bfd -I../../bfd/../include -I./../intl -W -Wall -Wstrict-prototypes -
Wmissing-prototypes -Werror -g -O2 -c ../../bfd/archive.c -o archive.o
In file included from ../../bfd/archive.c:132:
../../bfd/sysdep.h:173:21: libintl.h: No such file or directory
../../bfd/archive.c: In function `_bfd_write_archive_contents':
../../bfd/archive.c:1766: warning: implicit declaration of function `dgettext'
make[4]: *** [archive.lo] Error 1
make[4]: Leaving directory `/cygdrive/c/develop/gdb-6.7.1/cygwin/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/cygdrive/c/develop/gdb-6.7.1/cygwin/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cygdrive/c/develop/gdb-6.7.1/cygwin/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/cygdrive/c/develop/gdb-6.7.1/cygwin'
make: *** [all] Error 2
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-14 16:42 ` Gerrit van Niekerk
@ 2008-01-14 16:45 ` Bob Rossi
2008-01-14 17:41 ` Andrew STUBBS
2008-01-14 17:43 ` Andrew STUBBS
2 siblings, 0 replies; 15+ messages in thread
From: Bob Rossi @ 2008-01-14 16:45 UTC (permalink / raw)
To: gerritvn, gpvno; +Cc: Eli Zaretskii, gdb
On Mon, Jan 14, 2008 at 06:42:08PM +0200, Gerrit van Niekerk wrote:
> On 14 Jan 2008 at 6:05, Eli Zaretskii wrote:
>
> > Well, you didn't say anything about MSYS before.
>
> Sorry, I thought MinGW implied MSYS :)
>
> > I believe there's an MSYS version of Sed as well, check out the MinGW
> > site.
> Could not locate it, so I decided that Cygwin is probably a better platform and it got further as
> well, but got a problem compiling bfd/archive.c with a missing libintl.h.
>
> To recap:
> I made a directory CYGWIN in C:\develop\gdb-6.7.1 and in the Cygwin Bash shell executed:
>
> $ cd /cygdrive/c/develop/gdb-6.7.1/cygwin
> $ ../configure --host=i686-pc-mingw32 --target=djgpp
> .
> .
> $ make
> .
> .
> make[4]: Entering directory `/cygdrive/c/develop/gdb-6.7.1/cygwin/bfd'
> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../bfd -I
> . -D__USE_MINGW_FSEEK -I. -I../../bfd -I../../bfd/../include -I./../intl -
> W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o archive.lo
> ../../bfd/archive.c
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -D__USE_MINGW_FSEEK -
> I. -I../../bfd -I../../bfd/../include -I./../intl -W -Wall -Wstrict-prototypes -
> Wmissing-prototypes -Werror -g -O2 -c ../../bfd/archive.c -o archive.o
> In file included from ../../bfd/archive.c:132:
> ../../bfd/sysdep.h:173:21: libintl.h: No such file or directory
> ../../bfd/archive.c: In function `_bfd_write_archive_contents':
> ../../bfd/archive.c:1766: warning: implicit declaration of function `dgettext'
Install GNU gettext?
Bob Rossi
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-14 16:42 ` Gerrit van Niekerk
2008-01-14 16:45 ` Bob Rossi
@ 2008-01-14 17:41 ` Andrew STUBBS
2008-01-14 17:43 ` Andrew STUBBS
2 siblings, 0 replies; 15+ messages in thread
From: Andrew STUBBS @ 2008-01-14 17:41 UTC (permalink / raw)
To: gerritvn, gpvno; +Cc: Eli Zaretskii, gdb
Gerrit van Niekerk wrote:
> On 14 Jan 2008 at 6:05, Eli Zaretskii wrote:
>
>> Well, you didn't say anything about MSYS before.
>
> Sorry, I thought MinGW implied MSYS :)
>
>> I believe there's an MSYS version of Sed as well, check out the MinGW
>> site.
> Could not locate it, so I decided that Cygwin is probably a better platform and it got further as
> well, but got a problem compiling bfd/archive.c with a missing libintl.h.
>
> To recap:
> I made a directory CYGWIN in C:\develop\gdb-6.7.1 and in the Cygwin Bash shell executed:
>
> $ cd /cygdrive/c/develop/gdb-6.7.1/cygwin
> $ ../configure --host=i686-pc-mingw32 --target=djgpp
--build=i686-pc-cygwin
Just a guess.
Andrew
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-14 16:42 ` Gerrit van Niekerk
2008-01-14 16:45 ` Bob Rossi
2008-01-14 17:41 ` Andrew STUBBS
@ 2008-01-14 17:43 ` Andrew STUBBS
2008-01-14 20:39 ` Eli Zaretskii
2 siblings, 1 reply; 15+ messages in thread
From: Andrew STUBBS @ 2008-01-14 17:43 UTC (permalink / raw)
To: gerritvn, gpvno; +Cc: Eli Zaretskii, gdb
Gerrit van Niekerk wrote:
> On 14 Jan 2008 at 6:05, Eli Zaretskii wrote:
>
>> Well, you didn't say anything about MSYS before.
>
> Sorry, I thought MinGW implied MSYS :)
>
>> I believe there's an MSYS version of Sed as well, check out the MinGW
>> site.
> Could not locate it, so I decided that Cygwin is probably a better platform and it got further as
> well, but got a problem compiling bfd/archive.c with a missing libintl.h.
>
> To recap:
> I made a directory CYGWIN in C:\develop\gdb-6.7.1 and in the Cygwin Bash shell executed:
>
> $ cd /cygdrive/c/develop/gdb-6.7.1/cygwin
> $ ../configure --host=i686-pc-mingw32 --target=djgpp
Almost forgot, you probably want CC="gcc -mno-cygwin".
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-14 17:43 ` Andrew STUBBS
@ 2008-01-14 20:39 ` Eli Zaretskii
2008-01-14 21:13 ` DJ Delorie
0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2008-01-14 20:39 UTC (permalink / raw)
To: Andrew STUBBS; +Cc: gerritvn, gpvno, gdb
> Date: Mon, 14 Jan 2008 17:42:37 +0000
> From: Andrew STUBBS <andrew.stubbs@st.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb@sourceware.org
>
> > $ cd /cygdrive/c/develop/gdb-6.7.1/cygwin
> > $ ../configure --host=i686-pc-mingw32 --target=djgpp
>
> Almost forgot, you probably want CC="gcc -mno-cygwin".
?? I'd expect --target=djgpp do that automatically (it's a
cross-compilation, right?)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-14 20:39 ` Eli Zaretskii
@ 2008-01-14 21:13 ` DJ Delorie
2008-01-15 7:33 ` Gerrit van Niekerk
0 siblings, 1 reply; 15+ messages in thread
From: DJ Delorie @ 2008-01-14 21:13 UTC (permalink / raw)
To: eliz; +Cc: gdb
> ?? I'd expect --target=djgpp do that automatically (it's a
> cross-compilation, right?)
It's the difference between a cygwin-x-djgpp cross compiler and a
mingw-x-djgpp cross compiler. If --host is mingw, you're actually
doing a canadian (although configure doesn't realize it, so it's not
the traditional build/host/target canadian), so you need to ensure
that CC is set right.
Otherwise, in the example given, you're trying to build cygwin
programs using mingw headers, or something like that. Subtle bugs
ensue.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-14 21:13 ` DJ Delorie
@ 2008-01-15 7:33 ` Gerrit van Niekerk
2008-01-15 11:07 ` Andrew STUBBS
0 siblings, 1 reply; 15+ messages in thread
From: Gerrit van Niekerk @ 2008-01-15 7:33 UTC (permalink / raw)
To: DJ Delorie; +Cc: gdb
On 14 Jan 2008 at 16:12, DJ Delorie wrote:
>
> > ?? I'd expect --target=djgpp do that automatically (it's a
> > cross-compilation, right?)
>
> It's the difference between a cygwin-x-djgpp cross compiler and a
> mingw-x-djgpp cross compiler. If --host is mingw, you're actually
> doing a canadian (although configure doesn't realize it, so it's not
> the traditional build/host/target canadian), so you need to ensure
> that CC is set right.
>
> Otherwise, in the example given, you're trying to build cygwin
> programs using mingw headers, or something like that. Subtle bugs
> ensue.
The idea is to get a cross debugger to debug a remote DJGPP system using a MinGw GDB and a TCP/IP
connection. The stock MinGW GDB works fine, except that it expects a PE target and fails to do
address to symbol conversions correctly. The other way round works fine and one can do debugging,
but a backtrace gives completely wrong results.
I have managed to move on from the last reported problem which was caused by configure/make
specifying the wrong include path for libintl.h. I solved that one by copying libintl.h to the
specified directory. Now I am having a problem with conflicts between winsock2.h and unistd.h both
declaring Winsock functions like gethostname(). It seems that the makefile uses Cygwin headers
rather than MinGW headers.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-15 7:33 ` Gerrit van Niekerk
@ 2008-01-15 11:07 ` Andrew STUBBS
2008-01-15 16:04 ` Gerrit van Niekerk
0 siblings, 1 reply; 15+ messages in thread
From: Andrew STUBBS @ 2008-01-15 11:07 UTC (permalink / raw)
To: gerritvn, gpvno; +Cc: DJ Delorie, gdb
Gerrit van Niekerk wrote:
> On 14 Jan 2008 at 16:12, DJ Delorie wrote:
>
>>> ?? I'd expect --target=djgpp do that automatically (it's a
>>> cross-compilation, right?)
>> It's the difference between a cygwin-x-djgpp cross compiler and a
>> mingw-x-djgpp cross compiler. If --host is mingw, you're actually
>> doing a canadian (although configure doesn't realize it, so it's not
>> the traditional build/host/target canadian), so you need to ensure
>> that CC is set right.
>>
>> Otherwise, in the example given, you're trying to build cygwin
>> programs using mingw headers, or something like that. Subtle bugs
>> ensue.
>
> The idea is to get a cross debugger to debug a remote DJGPP system using a MinGw GDB and a TCP/IP
> connection. The stock MinGW GDB works fine, except that it expects a PE target and fails to do
> address to symbol conversions correctly. The other way round works fine and one can do debugging,
> but a backtrace gives completely wrong results.
>
> I have managed to move on from the last reported problem which was caused by configure/make
> specifying the wrong include path for libintl.h. I solved that one by copying libintl.h to the
> specified directory. Now I am having a problem with conflicts between winsock2.h and unistd.h both
> declaring Winsock functions like gethostname(). It seems that the makefile uses Cygwin headers
> rather than MinGW headers.
If you don't use -mno-cygwin then gcc *will* use cygwin headers.
Otherwise, if you do use -mno-cygwin, then it still might - the search
paths are not quite right - but usually only as a fall back if there
isn't a mingw header of that name.
Andrew
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-15 11:07 ` Andrew STUBBS
@ 2008-01-15 16:04 ` Gerrit van Niekerk
0 siblings, 0 replies; 15+ messages in thread
From: Gerrit van Niekerk @ 2008-01-15 16:04 UTC (permalink / raw)
To: Andrew STUBBS; +Cc: DJ Delorie, gdb
On 15 Jan 2008 at 11:06, Andrew STUBBS wrote:
> If you don't use -mno-cygwin then gcc *will* use cygwin headers.
> Otherwise, if you do use -mno-cygwin, then it still might - the search
> paths are not quite right - but usually only as a fall back if there
> isn't a mingw header of that name.
Thanks for everyone who gave me tips. I decided to reduce complexity and rather build for a Cygwin
host. I also downloaded the latest CVS snapshot of GDB which got rid of the libintl.h problem. I am
still not able to even build a Cygwin build, host and target version of GDB, but that should be
another thread.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-01-13 19:18 GDB/Mingw make problem Gerrit van Niekerk
2008-01-13 20:05 ` Eli Zaretskii
@ 2008-02-09 0:48 ` Dave Murphy
2008-02-10 19:35 ` Gerrit van Niekerk
1 sibling, 1 reply; 15+ messages in thread
From: Dave Murphy @ 2008-02-09 0:48 UTC (permalink / raw)
To: gerritvn, gpvno; +Cc: gdb
Gerrit van Niekerk wrote:
> I am trying to make GDB-6.7.1 using MinGW on WinXP.
> Configure works fine:
>
> ./configure --host=i686-pc-mingw32 --target=djgpp
>
> Make gives the following error:
>
> sed -f .././bfd/targmatch.sed < .././bfd/config.bfd > targmatch.new
> sed: file .././bfd/targmatch.sed line 1: Extra characters after command
> make[4]: *** [targmatch.h] Error 1
>
> The problem seems to be a very old version (v 3.02) of SED and I can't find a more recent one.
> Any help would be appreciated.
>
Actually, I had the same problem recently building from CVS. The problem
is that targmatch.sed has DOS line endings, msys sed 3.02 will cope fine
if you run dos2unix on the file first.
I didn't have this problem with the release tarballs though, just
TortoiseCVS being a pain & doing line conversions.
Dave
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: GDB/Mingw make problem
2008-02-09 0:48 ` Dave Murphy
@ 2008-02-10 19:35 ` Gerrit van Niekerk
0 siblings, 0 replies; 15+ messages in thread
From: Gerrit van Niekerk @ 2008-02-10 19:35 UTC (permalink / raw)
To: Dave Murphy; +Cc: gdb
On 9 Feb 2008 at 0:48, Dave Murphy wrote:
Gerrit van Niekerk wrote:
>> Make gives the following error:
>> sed: file .././bfd/targmatch.sed line 1: Extra characters after command
>> make[4]: *** [targmatch.h] Error 1
> Actually, I had the same problem recently building from CVS. The problem is that targmatch.sed
> has DOS line endings, msys sed 3.02 will cope fine if you run dos2unix on the file first.
Thanks Dave, I gave up on Mingw and moved on to Cygwin which also had
problems, but I managed to patch around it.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-02-10 19:35 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-13 19:18 GDB/Mingw make problem Gerrit van Niekerk
2008-01-13 20:05 ` Eli Zaretskii
2008-01-13 20:59 ` Gerrit van Niekerk
2008-01-14 4:05 ` Eli Zaretskii
2008-01-14 16:42 ` Gerrit van Niekerk
2008-01-14 16:45 ` Bob Rossi
2008-01-14 17:41 ` Andrew STUBBS
2008-01-14 17:43 ` Andrew STUBBS
2008-01-14 20:39 ` Eli Zaretskii
2008-01-14 21:13 ` DJ Delorie
2008-01-15 7:33 ` Gerrit van Niekerk
2008-01-15 11:07 ` Andrew STUBBS
2008-01-15 16:04 ` Gerrit van Niekerk
2008-02-09 0:48 ` Dave Murphy
2008-02-10 19:35 ` Gerrit van Niekerk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox