Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Windows build cookbook
@ 2011-07-27 16:03 Eli Zaretskii
  2011-07-27 16:07 ` Joel Brobecker
  2011-07-27 16:44 ` Tom Tromey
  0 siblings, 2 replies; 16+ messages in thread
From: Eli Zaretskii @ 2011-07-27 16:03 UTC (permalink / raw)
  To: gdb

Is such a cookbook, or at least some tips for building, available
anywhere?  I mean a list of suggested packages to install that GDB
links against and any tips for popular gotchas?

I looked on the Wiki, but couldn't find anything.  Apologies if I
missed something.

If there's no such thing, could someone who regularly builds the
native Windows (a.k.a. MinGW) port please share his/her setup?

TIA


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

* Re: Windows build cookbook
  2011-07-27 16:03 Windows build cookbook Eli Zaretskii
@ 2011-07-27 16:07 ` Joel Brobecker
  2011-07-27 16:27   ` Eli Zaretskii
  2011-07-27 16:44 ` Tom Tromey
  1 sibling, 1 reply; 16+ messages in thread
From: Joel Brobecker @ 2011-07-27 16:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

> If there's no such thing, could someone who regularly builds the
> native Windows (a.k.a. MinGW) port please share his/her setup?

I use the cygwin environment with a MinGW compiler, and configure
using --build=i686-pc-mingw32 (or --build=x86_64-pc-mingw32).
Using that approach, it pretty much builds out of the box.

-- 
Joel


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

* Re: Windows build cookbook
  2011-07-27 16:07 ` Joel Brobecker
@ 2011-07-27 16:27   ` Eli Zaretskii
  2011-07-27 16:37     ` Joel Brobecker
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2011-07-27 16:27 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb

> Date: Wed, 27 Jul 2011 09:06:48 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb@sourceware.org
> 
> > If there's no such thing, could someone who regularly builds the
> > native Windows (a.k.a. MinGW) port please share his/her setup?
> 
> I use the cygwin environment with a MinGW compiler, and configure
> using --build=i686-pc-mingw32 (or --build=x86_64-pc-mingw32).
> Using that approach, it pretty much builds out of the box.

Thanks, but that's not what I meant.  I guess I didn't make myself
clear enough.  I meant the support packages that GDB needs to be
linked against: the Python libraries, termcap/curses, libexpat,
readline, libiconv, etc.  Which of them do you use?  Or do you build
them as well by yourself?


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

* Re: Windows build cookbook
  2011-07-27 16:27   ` Eli Zaretskii
@ 2011-07-27 16:37     ` Joel Brobecker
  2011-07-27 16:39       ` Joel Brobecker
  2011-07-27 18:06       ` Kai Tietz
  0 siblings, 2 replies; 16+ messages in thread
From: Joel Brobecker @ 2011-07-27 16:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

> clear enough.  I meant the support packages that GDB needs to be
> linked against: the Python libraries, termcap/curses, libexpat,
> readline, libiconv, etc.  Which of them do you use?  Or do you build
> them as well by yourself?

  - Python: I use the official binaries provided by python.org
  - termcap/curses: Not needed
  - libexpat: I build it (same as GDB)
  - readline: Not needed (included in GDB sources)
  - libiconv: I place the sources in the GDB tree, and it gets
              automatically built.  But you could also rebuild it
              yourself.

I think that, apart from Python, it's fairly easy to rebuild your
dependencies yourself, so that's what we do. However, I do not know
if the MinGW project provides pre-compiled versions of those packages
or not.

-- 
Joel


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

* Re: Windows build cookbook
  2011-07-27 16:37     ` Joel Brobecker
@ 2011-07-27 16:39       ` Joel Brobecker
  2011-07-27 17:12         ` Eli Zaretskii
  2011-07-27 18:06       ` Kai Tietz
  1 sibling, 1 reply; 16+ messages in thread
From: Joel Brobecker @ 2011-07-27 16:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

> I think that, apart from Python, it's fairly easy to rebuild your
> dependencies yourself, so that's what we do.

What I also meant to say is that, beyond that, the build procedures
are identical to build procedures on Unix systems.

-- 
Joel


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

* Re: Windows build cookbook
  2011-07-27 16:03 Windows build cookbook Eli Zaretskii
  2011-07-27 16:07 ` Joel Brobecker
@ 2011-07-27 16:44 ` Tom Tromey
  2011-07-27 17:13   ` Eli Zaretskii
  1 sibling, 1 reply; 16+ messages in thread
From: Tom Tromey @ 2011-07-27 16:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

Eli> Is such a cookbook, or at least some tips for building, available
Eli> anywhere?  I mean a list of suggested packages to install that GDB
Eli> links against and any tips for popular gotchas?

There is some stuff in the manual, see the Requirements node, or more
generally the Installing GDB appendix.

This is incomplete at best, though, seeing that Python is not mentioned.

Tom


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

* Re: Windows build cookbook
  2011-07-27 16:39       ` Joel Brobecker
@ 2011-07-27 17:12         ` Eli Zaretskii
  0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2011-07-27 17:12 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: gdb

> Date: Wed, 27 Jul 2011 09:38:42 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb@sourceware.org
> 
> > I think that, apart from Python, it's fairly easy to rebuild your
> > dependencies yourself, so that's what we do.
> 
> What I also meant to say is that, beyond that, the build procedures
> are identical to build procedures on Unix systems.

Okay, thanks.


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

* Re: Windows build cookbook
  2011-07-27 16:44 ` Tom Tromey
@ 2011-07-27 17:13   ` Eli Zaretskii
  2011-07-27 17:17     ` Tom Tromey
  0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2011-07-27 17:13 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb

> From: Tom Tromey <tromey@redhat.com>
> Cc: gdb@sourceware.org
> Date: Wed, 27 Jul 2011 10:44:24 -0600
> 
> Eli> Is such a cookbook, or at least some tips for building, available
> Eli> anywhere?  I mean a list of suggested packages to install that GDB
> Eli> links against and any tips for popular gotchas?
> 
> There is some stuff in the manual, see the Requirements node, or more
> generally the Installing GDB appendix.

Thanks.  That's not Windows-specific, so I guess there are no
Windows-specific issues here?


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

* Re: Windows build cookbook
  2011-07-27 17:13   ` Eli Zaretskii
@ 2011-07-27 17:17     ` Tom Tromey
  2011-07-31  2:18       ` asmwarrior
  0 siblings, 1 reply; 16+ messages in thread
From: Tom Tromey @ 2011-07-27 17:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

Eli> Thanks.  That's not Windows-specific, so I guess there are no
Eli> Windows-specific issues here?

I would venture to guess that this is just because nobody has written
the text for the manual, rather than that there are no issues building
on Windows.

Tom


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

* Re: Windows build cookbook
  2011-07-27 16:37     ` Joel Brobecker
  2011-07-27 16:39       ` Joel Brobecker
@ 2011-07-27 18:06       ` Kai Tietz
  1 sibling, 0 replies; 16+ messages in thread
From: Kai Tietz @ 2011-07-27 18:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb

2011/7/27 Joel Brobecker <brobecker@adacore.com>:
>> clear enough.  I meant the support packages that GDB needs to be
>> linked against: the Python libraries, termcap/curses, libexpat,
>> readline, libiconv, etc.  Which of them do you use?  Or do you build
>> them as well by yourself?
>
>  - Python: I use the official binaries provided by python.org
>  - termcap/curses: Not needed
>  - libexpat: I build it (same as GDB)
>  - readline: Not needed (included in GDB sources)
>  - libiconv: I place the sources in the GDB tree, and it gets
>              automatically built.  But you could also rebuild it
>              yourself.
>
> I think that, apart from Python, it's fairly easy to rebuild your
> dependencies yourself, so that's what we do. However, I do not know
> if the MinGW project provides pre-compiled versions of those packages
> or not.
>
> --
> Joel

Well, build of Windows is mostly OOTB.  Most important point is the
libexpat, as without it DLL debugging isn't possible.  The rest is
more an issue of pre-installing proper packages.  There is not much
magic about building GDB for Windows.

Yes, both mingw.org and mingw-w64 ventures are providing pre-build
version of gdb for users.  AFAIR we (mingw-w64) provide even a version
with Python support.

Kai


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

* Re: Windows build cookbook
  2011-07-27 17:17     ` Tom Tromey
@ 2011-07-31  2:18       ` asmwarrior
  2011-07-31  7:54         ` Eli Zaretskii
  2011-07-31 20:11         ` Petr Hluzín
  0 siblings, 2 replies; 16+ messages in thread
From: asmwarrior @ 2011-07-31  2:18 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Eli Zaretskii, gdb

On 2011-7-28 1:17, Tom Tromey wrote:
> Eli>  Thanks.  That's not Windows-specific, so I guess there are no
> Eli>  Windows-specific issues here?
>
> I would venture to guess that this is just because nobody has written
> the text for the manual, rather than that there are no issues building
> on Windows.
>
> Tom
>
we have create some pages in
http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_en (English version)
and
http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_cn (Chinese version)

Also, the cross build mingw gdb from linux:
http://code.google.com/p/qp-gcc/wiki/CrossbuildGDB

also, the official Mingw page:
http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GDB/GDB-7.2/
which contains an instructions to build gdb 7.2 under MSYS.

As a conclusion, no much difficult to build mingw gdb.

asmwarrior
ollydbg from codeblocks' forum


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

* Re: Windows build cookbook
  2011-07-31  2:18       ` asmwarrior
@ 2011-07-31  7:54         ` Eli Zaretskii
  2011-07-31 12:34           ` asmwarrior
  2011-07-31 20:11         ` Petr Hluzín
  1 sibling, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2011-07-31  7:54 UTC (permalink / raw)
  To: asmwarrior; +Cc: tromey, gdb

> Date: Sun, 31 Jul 2011 10:19:58 +0800
> From: asmwarrior <asmwarrior@gmail.com>
> CC: Eli Zaretskii <eliz@gnu.org>, gdb@sourceware.org
> 
> we have create some pages in
> http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_en (English version)
> and
> http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_cn (Chinese version)
> 
> Also, the cross build mingw gdb from linux:
> http://code.google.com/p/qp-gcc/wiki/CrossbuildGDB
> 
> also, the official Mingw page:
> http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GDB/GDB-7.2/
> which contains an instructions to build gdb 7.2 under MSYS.
> 
> As a conclusion, no much difficult to build mingw gdb.

Thanks.  I did eventually succeed in the build, but not without
problems, which I believe are due to bugs in MSYS tools, in particular
wrt quoted strings passed to programs.  I will report those problems
to the MSYS list and see what the MSYS developers tell me about that.

Looking at your page, I see the following differences between your
recommended setup and what I used:

 . You use a mingw-w64 version of MSYS, while I used the 32-bit
   version (as my machine is a 32-bit one).

 . You mounted the root directory of the MinGW installation on /mingw,
   while I didn't (I thought the fact that its bin/ subdirectory being
   on PATH will do the job).

I will try to experiment with the latter difference, and see if it
helps.

Thanks for sharing this information.


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

* Re: Windows build cookbook
  2011-07-31  7:54         ` Eli Zaretskii
@ 2011-07-31 12:34           ` asmwarrior
  2011-07-31 15:46             ` Eli Zaretskii
  2011-07-31 15:54             ` Eli Zaretskii
  0 siblings, 2 replies; 16+ messages in thread
From: asmwarrior @ 2011-07-31 12:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tromey, gdb

On 2011-7-31 13:40, Eli Zaretskii wrote:
> Looking at your page, I see the following differences between your
> recommended setup and what I used:
>
>   . You use a mingw-w64 version of MSYS, while I used the 32-bit
>     version (as my machine is a 32-bit one).
There is not such "mingw-w64 MSYS", all the MSYS is 32bit.
look at the folder of the link, the link name is:
External binary packages (Win64 hosted)
which means all the packages is from other site, and only hosted on the 
mingw64 site.
So, the MSYS package was took from the official MSYS site. (as the 
official MSYS installer use the MinGW-get to fetch all the tools and 
libraries. Some developer of MinGW64 project just put a full MSYS 
package contains all the MSYS tools, and put it in the MinGW64 site)
In-fact, I use Windows XP 32bit too. I do not have a 64bit Windows system.

>   . You mounted the root directory of the MinGW installation on /mingw,
>     while I didn't (I thought the fact that its bin/ subdirectory being
>     on PATH will do the job).
That's the official way of using MinGW compiler suite under MSYS, 
because the path "/mingw" will have the highest priority on the MSYS's 
search path. If you have many MinGW pathes on your Windows PATH 
variable, that maybe cause some problem.:-)

Nowadays, I use the PCX's 32bit MinGW package, which contains all the 
necessary libraries to build the GDB.
see: http://code.google.com/p/pcxprj/downloads/list

asmwarrior
ollydbg from codeblocks' forum


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

* Re: Windows build cookbook
  2011-07-31 12:34           ` asmwarrior
@ 2011-07-31 15:46             ` Eli Zaretskii
  2011-07-31 15:54             ` Eli Zaretskii
  1 sibling, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2011-07-31 15:46 UTC (permalink / raw)
  To: asmwarrior; +Cc: tromey, gdb



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

* Re: Windows build cookbook
  2011-07-31 12:34           ` asmwarrior
  2011-07-31 15:46             ` Eli Zaretskii
@ 2011-07-31 15:54             ` Eli Zaretskii
  1 sibling, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2011-07-31 15:54 UTC (permalink / raw)
  To: asmwarrior; +Cc: tromey, gdb

> Date: Sun, 31 Jul 2011 20:35:42 +0800
> From: asmwarrior <asmwarrior@gmail.com>
> CC: tromey@redhat.com, gdb@sourceware.org
> 
> On 2011-7-31 13:40, Eli Zaretskii wrote:
> > Looking at your page, I see the following differences between your
> > recommended setup and what I used:
> >
> >   . You use a mingw-w64 version of MSYS, while I used the 32-bit
> >     version (as my machine is a 32-bit one).
> There is not such "mingw-w64 MSYS", all the MSYS is 32bit.
> look at the folder of the link, the link name is:
> External binary packages (Win64 hosted)
> which means all the packages is from other site, and only hosted on the 
> mingw64 site.
> So, the MSYS package was took from the official MSYS site. (as the 
> official MSYS installer use the MinGW-get to fetch all the tools and 
> libraries. Some developer of MinGW64 project just put a full MSYS 
> package contains all the MSYS tools, and put it in the MinGW64 site)
> In-fact, I use Windows XP 32bit too. I do not have a 64bit Windows system.
> 
> >   . You mounted the root directory of the MinGW installation on /mingw,
> >     while I didn't (I thought the fact that its bin/ subdirectory being
> >     on PATH will do the job).
> That's the official way of using MinGW compiler suite under MSYS, 
> because the path "/mingw" will have the highest priority on the MSYS's 
> search path. If you have many MinGW pathes on your Windows PATH 
> variable, that maybe cause some problem.:-)

Thanks.

It turned out my problems were transient, due to some unknown factor,
because after restarting the machine, a fresh build ran successfully
to completion (module 2 issues that I will be reporting on gdb-patches
shortly).

Sorry for the noise, and thanks for your help.


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

* Re: Windows build cookbook
  2011-07-31  2:18       ` asmwarrior
  2011-07-31  7:54         ` Eli Zaretskii
@ 2011-07-31 20:11         ` Petr Hluzín
  1 sibling, 0 replies; 16+ messages in thread
From: Petr Hluzín @ 2011-07-31 20:11 UTC (permalink / raw)
  To: asmwarrior; +Cc: Tom Tromey, Eli Zaretskii, gdb

On 31 July 2011 04:19, asmwarrior <asmwarrior@gmail.com> wrote:
> On 2011-7-28 1:17, Tom Tromey wrote:
>>
>> Eli>  Thanks.  That's not Windows-specific, so I guess there are no
>> Eli>  Windows-specific issues here?
>>
>> I would venture to guess that this is just because nobody has written
>> the text for the manual, rather than that there are no issues building
>> on Windows.
>>
>> Tom
>>
> we have create some pages in
> http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_en (English version)
> and
> http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_cn (Chinese version)
>
> Also, the cross build mingw gdb from linux:
> http://code.google.com/p/qp-gcc/wiki/CrossbuildGDB
>
> also, the official Mingw page:
> http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/GDB/GDB-7.2/
> which contains an instructions to build gdb 7.2 under MSYS.
>
> As a conclusion, no much difficult to build mingw gdb.

I wish I knew about those links yesterday.

Yesterday I spent 5 hours trying to build the GDB on Windows. After
reading your links was able to build the GDB without expat & python
and then even a full GDB - it took 5 more hours of careful touching
and trying to not upset the tools. (Geez, I knew why I avoided
building from sources.)

Let future generations benefit from my notes below:

whitespace in directory names: PATH=$(echo $PATH  |  sed 's,Program
Files,PROGRA~1,g')

cp ar.exe mingw32-ar.exe

Using MinGW Shell:
./configure  --host=mingw32

Used expat build instructions from
http://code.google.com/p/qp-gcc/wiki/build_gdb_msys_en

$ ./configure  --host=mingw32 --target=avr CFLAGS="-s
-L/C/Python27/libs -I/C/Python27/PH-temp/include
-I/c/gdb-7.3/expat-2.0.1/include -static -L/c/gdb-7.3/expat-2.0.1/lib"
 --with-python --with-expat

Thanks for the links. I would have given up.

-- 
Petr Hluzin


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

end of thread, other threads:[~2011-07-31 20:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 16:03 Windows build cookbook Eli Zaretskii
2011-07-27 16:07 ` Joel Brobecker
2011-07-27 16:27   ` Eli Zaretskii
2011-07-27 16:37     ` Joel Brobecker
2011-07-27 16:39       ` Joel Brobecker
2011-07-27 17:12         ` Eli Zaretskii
2011-07-27 18:06       ` Kai Tietz
2011-07-27 16:44 ` Tom Tromey
2011-07-27 17:13   ` Eli Zaretskii
2011-07-27 17:17     ` Tom Tromey
2011-07-31  2:18       ` asmwarrior
2011-07-31  7:54         ` Eli Zaretskii
2011-07-31 12:34           ` asmwarrior
2011-07-31 15:46             ` Eli Zaretskii
2011-07-31 15:54             ` Eli Zaretskii
2011-07-31 20:11         ` Petr Hluzín

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