Makefiles for building with mingw32 on win32

Поиск
Список
Период
Сортировка
Искать

Makefiles for building with mingw32 on win32

От:
Gerhard Häring <haering_python@gmx.de>
Дата:
Makefiles for building the win32 parts with the native (mingw32) mode of gcc. 
Currently, only libpq is implemented because I only cared for that :-) 
Supports cross-compilation and includes documentation updates. So people don't 
need to spend big $$$ for Visual C++ :-)

Gerhard
-- 
mail:   gerhard  bigfoot  de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
diff -N -r -C3 --exclude=CVS ../pgsql_HEAD/doc/src/sgml/install-win32.sgml ./doc/src/sgml/install-win32.sgml
*** ../pgsql_HEAD/doc/src/sgml/install-win32.sgml	Sun May 13 00:51:35 2001
--- ./doc/src/sgml/install-win32.sgml	Mon Aug 27 06:59:52 2001
***************
*** 111,116 ****
--- 111,134 ----
    C++, just right-click on the project and chose to add it.)
   
  
+  
+  Alternatively, you can use the native mode of the GNU compilers (minimalist
+  GNU win32 - mingw32) to compile the win32 parts of PostgreSQL.
+  Currently, only libpq has a Makefile suitable for compilation with mingw32.
+  
+  
+   To build everything that you can with GNU tools on
+   Windows, change into the
+   src directory and type the command
+ 
+ make -f mingw32.mak
+ 
+   This assumes that you are theCygnus Toolkit's bash
+   shell or have a suitable mingw32 environment with make and gcc installed. The
+   Makefiles also support cross-compilation.
+   
+ 
+ 
  
  
  

Re: Makefiles for building with mingw32 on win32

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Gerhard Häring writes:

> Makefiles for building the win32 parts with the native (mingw32) mode of gcc.
> Currently, only libpq is implemented because I only cared for that :-)

Can't you run configure on mingw32?

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter

Re: Makefiles for building with mingw32 on win32

От:
Gerhard Häring <haering_python@gmx.de>
Дата:
Peter Eisentraut wrote:

>Gerhard Häring writes:
>
>>Makefiles for building the win32 parts with the native (mingw32) mode of gcc.
>>Currently, only libpq is implemented because I only cared for that :-)
>>
>
>Can't you run configure on mingw32?
>
It doesn't work on my system. If  somebody gets this to work, why not 
submit a patch to the documentation?

I am not a Makefile hacker, let alone an autoconf hacker, so I can't 
debug that.

-- Gerhard


Re: Makefiles for building with mingw32 on win32

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Your patch has been added to the PostgreSQL unapplied patches list at:

	http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

> Makefiles for building the win32 parts with the native (mingw32) mode of gcc. 
> Currently, only libpq is implemented because I only cared for that :-) 
> Supports cross-compilation and includes documentation updates. So people don't 
> need to spend big $$$ for Visual C++ :-)
> 
> Gerhard
> -- 
> mail:   gerhard  bigfoot  de       registered Linux user #64239
> web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
> public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
> reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

> diff -N -r -C3 --exclude=CVS ../pgsql_HEAD/doc/src/sgml/install-win32.sgml ./doc/src/sgml/install-win32.sgml
> *** ../pgsql_HEAD/doc/src/sgml/install-win32.sgml	Sun May 13 00:51:35 2001
> --- ./doc/src/sgml/install-win32.sgml	Mon Aug 27 06:59:52 2001
> ***************
> *** 111,116 ****
> --- 111,134 ----
>     C++, just right-click on the project and chose to add it.)
>    
>   
> +  
> +  Alternatively, you can use the native mode of the GNU compilers (minimalist
> +  GNU win32 - mingw32) to compile the win32 parts of PostgreSQL.
> +  Currently, only libpq has a Makefile suitable for compilation with mingw32.
> +  
> +  
> +   To build everything that you can with GNU tools on
> +   Windows, change into the
> +   src directory and type the command
> + 
> + make -f mingw32.mak
> + 
> +   This assumes that you are theCygnus Toolkit's bash
> +   shell or have a suitable mingw32 environment with make and gcc installed. The
> +   Makefiles also support cross-compilation.
> +   
> + 
> + 
>   
>   
>   

Re: Makefiles for building with mingw32 on win32

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Gerhard Häring writes:

> >Can't you run configure on mingw32?
> >
> It doesn't work on my system. If  somebody gets this to work, why not
> submit a patch to the documentation?

What do you mean with "work"?  You don't have a shell, configure aborts
with an error, ...?  It would be a whole lot prettier to make this work
instead of having to maintain yet another non-standard makefile.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter

Re: Makefiles for building with mingw32 on win32

От:
haering_python@gmx.de
Дата:
On Tue, Sep 04, 2001 at 02:42:28AM +0200, Peter Eisentraut wrote:
> Gerhard Häring writes:
> 
> > >Can't you run configure on mingw32?
> > >
> > It doesn't work on my system. If  somebody gets this to work, why not
> > submit a patch to the documentation?
> 
> What do you mean with "work"?  You don't have a shell, configure aborts
> with an error, ...?

Yes, with "C compiler cannot create executables.".

> It would be a whole lot prettier to make this work

I agree that it would be "prettier", but I am not willing to make enourmous
efforts myself (i. e. learn several new tools and langauges like awk, m4) for
this. I know next to zero autoconf, so I will need assistance. Are you
volonteering?  Where should I ask questions? On the cygwin-pgsql list I
suppose.

> instead of having to maintain yet another non-standard makefile.

You could remove the Visual C++ support so there's only one non-standard
Makefile to maintain. ;-)

So?

Gerhard
-- 
mail:   gerhard  bigfoot  de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

Re: Makefiles for building with mingw32 on win32

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

We are waiting to see if you can get the existing Win32 makefiles to
work on both compilers, right?


> Makefiles for building the win32 parts with the native (mingw32) mode of gcc. 
> Currently, only libpq is implemented because I only cared for that :-) 
> Supports cross-compilation and includes documentation updates. So people don't 
> need to spend big $$$ for Visual C++ :-)
> 
> Gerhard
> -- 
> mail:   gerhard  bigfoot  de       registered Linux user #64239
> web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
> public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
> reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

> diff -N -r -C3 --exclude=CVS ../pgsql_HEAD/doc/src/sgml/install-win32.sgml ./doc/src/sgml/install-win32.sgml
> *** ../pgsql_HEAD/doc/src/sgml/install-win32.sgml	Sun May 13 00:51:35 2001
> --- ./doc/src/sgml/install-win32.sgml	Mon Aug 27 06:59:52 2001
> ***************
> *** 111,116 ****
> --- 111,134 ----
>     C++, just right-click on the project and chose to add it.)
>    
>   
> +  
> +  Alternatively, you can use the native mode of the GNU compilers (minimalist
> +  GNU win32 - mingw32) to compile the win32 parts of PostgreSQL.
> +  Currently, only libpq has a Makefile suitable for compilation with mingw32.
> +  
> +  
> +   To build everything that you can with GNU tools on
> +   Windows, change into the
> +   src directory and type the command
> + 
> + make -f mingw32.mak
> + 
> +   This assumes that you are theCygnus Toolkit's bash
> +   shell or have a suitable mingw32 environment with make and gcc installed. The
> +   Makefiles also support cross-compilation.
> +   
> + 
> + 
>   
>   
>   

Re: Makefiles for building with mingw32 on win32

От:
Gerhard Häring <haering_python@gmx.de>
Дата:
On Wed, Sep 05, 2001 at 11:19:20PM -0400, Bruce Momjian wrote:
> 
> We are waiting to see if you can get the existing Win32 makefiles to
                           ^^^ erhm!!
> work on both compilers, right?

I assume you mean getting
- setting-weird-environment-variables
- calling ./configure with weird parameters
- calling make with parameters
- hack configure.in
- execute autoconf

to work, right?

> > [me:]
> > Makefiles for building the win32 parts with the native (mingw32) mode of gcc

Ok. As I said, I need somebody who is knowledgable in autoconf and Cygwin whom
I can bug, or better yet, who just steps forward and invests an hour or two to
do this, document it and submit a patch.

Volunteers/helpers are wery welcome, also in PM, of course.

later,

Gerhard

PS: I'm trying to subscribe to pgsql-cygwin, but it looks as if Majordomo is in
a bad mood again. Whom would I write to if I think it is broken?
-- 
mail:   gerhard  bigfoot  de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

Re: Makefiles for building with mingw32 on win32

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

OK, I found Peter E saying this:

> > >Can't you run configure on mingw32?
> > >
> > It doesn't work on my system. If  somebody gets this to work, why not
> > submit a patch to the documentation?
> 
> What do you mean with "work"?  You don't have a shell, configure aborts
> with an error, ...?  It would be a whole lot prettier to make this work
> instead of having to maintain yet another non-standard makefile.

Can we actually get configure to work on Win32, and if we can, why do we
have other Win32 makefiles?  I don't understand why Peter E was saying
we should use configure either.

---------------------------------------------------------------------------


> On Wed, Sep 05, 2001 at 11:19:20PM -0400, Bruce Momjian wrote:
> > 
> > We are waiting to see if you can get the existing Win32 makefiles to
>                            ^^^ erhm!!
> > work on both compilers, right?
> 
> I assume you mean getting
> - setting-weird-environment-variables
> - calling ./configure with weird parameters
> - calling make with parameters
> - hack configure.in
> - execute autoconf
> 
> to work, right?
> 
> > > [me:]
> > > Makefiles for building the win32 parts with the native (mingw32) mode of gcc
> 
> Ok. As I said, I need somebody who is knowledgable in autoconf and Cygwin whom
> I can bug, or better yet, who just steps forward and invests an hour or two to
> do this, document it and submit a patch.
> 
> Volunteers/helpers are wery welcome, also in PM, of course.
> 
> later,
> 
> Gerhard
> 
> PS: I'm trying to subscribe to pgsql-cygwin, but it looks as if Majordomo is in
> a bad mood again. Whom would I write to if I think it is broken?
> -- 
> mail:   gerhard  bigfoot  de       registered Linux user #64239
> web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
> public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
> reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: Makefiles for building with mingw32 on win32

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Bruce Momjian writes:

> Can we actually get configure to work on Win32, and if we can, why do we
> have other Win32 makefiles?  I don't understand why Peter E was saying
> we should use configure either.

mingw32 is the "minimal GNU environment for Win32" -- sort of like Cygwin
ultra-light.  As a consequence it should work to run configure on it.  In
fact, we already have

checking for Cygwin environment... no
checking for mingw32 environment... no

So I'd be interested to know what happens when you do try it.

Also, what would be the advantage of the mingw32 specific makefiles that
you sent, versus just using the win32 native ones that we already have?

> > PS: I'm trying to subscribe to pgsql-cygwin, but it looks as if Majordomo is in
> > a bad mood again. Whom would I write to if I think it is broken?

Probably pgsql-cygwin-owner@postgresql.org.  But the lists should be back
up by now.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter

Re: Makefiles for building with mingw32 on win32

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Can I have a vote on whether to apply this patch?


> Makefiles for building the win32 parts with the native (mingw32) mode of gcc. 
> Currently, only libpq is implemented because I only cared for that :-) 
> Supports cross-compilation and includes documentation updates. So people don't 
> need to spend big $$$ for Visual C++ :-)
> 
> Gerhard
> -- 
> mail:   gerhard  bigfoot  de       registered Linux user #64239
> web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
> public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
> reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

> diff -N -r -C3 --exclude=CVS ../pgsql_HEAD/doc/src/sgml/install-win32.sgml ./doc/src/sgml/install-win32.sgml
> *** ../pgsql_HEAD/doc/src/sgml/install-win32.sgml	Sun May 13 00:51:35 2001
> --- ./doc/src/sgml/install-win32.sgml	Mon Aug 27 06:59:52 2001
> ***************
> *** 111,116 ****
> --- 111,134 ----
>     C++, just right-click on the project and chose to add it.)
>    
>   
> +  
> +  Alternatively, you can use the native mode of the GNU compilers (minimalist
> +  GNU win32 - mingw32) to compile the win32 parts of PostgreSQL.
> +  Currently, only libpq has a Makefile suitable for compilation with mingw32.
> +  
> +  
> +   To build everything that you can with GNU tools on
> +   Windows, change into the
> +   src directory and type the command
> + 
> + make -f mingw32.mak
> + 
> +   This assumes that you are theCygnus Toolkit's bash
> +   shell or have a suitable mingw32 environment with make and gcc installed. The
> +   Makefiles also support cross-compilation.
> +   
> + 
> + 
>   
>   
>   

Re: Makefiles for building with mingw32 on win32

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bruce Momjian  writes:
> Can I have a vote on whether to apply this patch?

>> Makefiles for building the win32 parts with the native (mingw32) mode of gcc. 

I think we shouldn't do this, unless someone tries and fails to make
configure work in this context.  So far I've not heard any reason that
configure couldn't work...

			regards, tom lane

Re: Makefiles for building with mingw32 on win32

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

In talking to others, it seems people would like to concentrate on
getting configure to work on your platform rather than adding another
makefile.  Can we assist in that or is that not a possible solution?


> Makefiles for building the win32 parts with the native (mingw32) mode of gcc. 
> Currently, only libpq is implemented because I only cared for that :-) 
> Supports cross-compilation and includes documentation updates. So people don't 
> need to spend big $$$ for Visual C++ :-)
> 
> Gerhard
> -- 
> mail:   gerhard  bigfoot  de       registered Linux user #64239
> web:    http://www.cs.fhm.edu/~ifw00065/    public key at homepage
> public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
> reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

> diff -N -r -C3 --exclude=CVS ../pgsql_HEAD/doc/src/sgml/install-win32.sgml ./doc/src/sgml/install-win32.sgml
> *** ../pgsql_HEAD/doc/src/sgml/install-win32.sgml	Sun May 13 00:51:35 2001
> --- ./doc/src/sgml/install-win32.sgml	Mon Aug 27 06:59:52 2001
> ***************
> *** 111,116 ****
> --- 111,134 ----
>     C++, just right-click on the project and chose to add it.)
>    
>   
> +  
> +  Alternatively, you can use the native mode of the GNU compilers (minimalist
> +  GNU win32 - mingw32) to compile the win32 parts of PostgreSQL.
> +  Currently, only libpq has a Makefile suitable for compilation with mingw32.
> +  
> +  
> +   To build everything that you can with GNU tools on
> +   Windows, change into the
> +   src directory and type the command
> + 
> + make -f mingw32.mak
> + 
> +   This assumes that you are theCygnus Toolkit's bash
> +   shell or have a suitable mingw32 environment with make and gcc installed. The
> +   Makefiles also support cross-compilation.
> +   
> + 
> + 
>   
>   
>   

Re: Makefiles for building with mingw32 on win32

От:
Gerhard Häring <haering_python@gmx.de>
Дата:
On Thu, Sep 06, 2001 at 03:29:15PM +0200, Peter Eisentraut wrote:
> [...] 
> mingw32 is the "minimal GNU environment for Win32" -- sort of like Cygwin
> ultra-light.  As a consequence it should work to run configure on it.  In
> fact, we already have
> 
> checking for Cygwin environment... no
> checking for mingw32 environment... no
> 
> So I'd be interested to know what happens when you do try it.

"C compiler cannot create executables."

I'll try to sort this out. The current configure script doesn't know anything
about mingw32. It doesn't add the "-mno-cygwin" option and it still tries to
link against libcrypt and libcygipc.  I'll try to sort this out on the
pgsql-cygwin list, to which now, I finally managed to subscribe. I'll also try
not to swear too loud about autoconf.

> Also, what would be the advantage of the mingw32 specific makefiles that
> you sent,

That's simple: they build native win32 libraries with zero euros worth of
tools.

>versus just using the win32 native ones that we already have?

These only work with M$ Visual C++ and are in a proprietary Makefile format
that works with no other compiler than M$'s.

Later,

Gerhard
-- 
mail:   gerhard  bigfoot  de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

Re: Makefiles for building with mingw32 on win32

От:
Gerhard Häring <haering_python@gmx.de>
Дата:
On Sun, Sep 09, 2001 at 08:19:51PM -0400, Bruce Momjian wrote:
> In talking to others, it seems people would like to concentrate on getting
> configure to work on your platform rather than adding another makefile.  Can
> we assist in that or is that not a possible solution?
>
> > [me]
> > Makefiles for building the win32 parts with the native (mingw32) mode of
> > gcc. [...]

Bruce,

it would be a solution, but it takes more effort, too. I would very much
appreciate it if you and the others that are familiar with the build process
could assist me with the autoconf stuff.

Thanks,

Gerhard
-- 
mail:   gerhard  bigfoot  de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

Re: Makefiles for building with mingw32 on win32

От:
Justin Clift <justin@postgresql.org>
Дата:
Gerhard Häring wrote:
> 
 
> > Also, what would be the advantage of the mingw32 specific makefiles that
> > you sent,
> 
> That's simple: they build native win32 libraries with zero euros worth of
> tools.
> 
> >versus just using the win32 native ones that we already have?
> 
> These only work with M$ Visual C++ and are in a proprietary Makefile format
> that works with no other compiler than M$'s.

Does this mean with these patches people can compile PostgreSQL on WinNT
using something free like Bloodshed's Dev-C++?  (er... www.bloodshed.net
if anyone's interested, it includes mingw32 with the install).

My only comment is "at last" if this can be made to work.

Regards and best wishes,

Justin Clift

 
> Later,
> 
> Gerhard
> --
> mail:   gerhard  bigfoot  de       registered Linux user #64239
> web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
> public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
> reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

-- 
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi
FAQ