Re: Windows build issues

Lists: pgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Windows build issues
Date: 2011-03-31 19:38:11
Message-ID: 1301600291.9296.9.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I was trying to build the Windows msvc build for the first time and ran
into some issues.

The documentation talks about obtaining and using the "Platform SDK". I
understand that this is nowadays called the "Windows SDK". Searching
for the former on the Microsoft download site doesn't offer anything
recent. If my understanding is correct, the documentation should be
updated.

The file src/tools/msvc/README contains some information that apparently
augments the build instructions in the main documentation. It talks
about Visual Studio 2005, which is probably outdated, and the section
"Notes about Visual Studio Express" talks about some files that my
installation doesn't contain, so probably also outdated. That last
section should probably be moved into the main documentation, if it's
still relevant.

Between the main documentation and that README, it also becomes less
clear whether the SDK or Visual Studio Express or both are needed.

Then the real issue. The build.pl tries to call "vcbuild", which
neither the SDK version 7.1 nor the Visual Studio Express 2010 contain
anywhere. (There is a vcbuild.dll, but that's it.) Some web searching
suggests that vcbuild.exe might have been renamed in the Visual Studio
2010 version. I don't see any buildfarm coverage of that version.

So is 2010 supported, and where is the vcbuild program supposed to come
from?


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-03-31 20:00:43
Message-ID: 4D94DD6B.4010605@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 03/31/2011 03:38 PM, Peter Eisentraut wrote:
> So is 2010 supported, and where is the vcbuild program supposed to come
> from?
>

Not that I know of. But VS 2008 is, and should be readily available. In
fact, I recently made patches to allow it to to be used to build all the
live branches.

cheers

andrew


From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Windows build issues
Date: 2011-03-31 20:02:08
Message-ID: AANLkTimA7g3CrjYuM88L=7-skMpx=WNUQrzLdQnFL_sh@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

No, 2010 is not yet supported, though I beleive some initial work was done.

I'm intending to work on it for 9.2.

On 3/31/11, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> I was trying to build the Windows msvc build for the first time and ran
> into some issues.
>
> The documentation talks about obtaining and using the "Platform SDK". I
> understand that this is nowadays called the "Windows SDK". Searching
> for the former on the Microsoft download site doesn't offer anything
> recent. If my understanding is correct, the documentation should be
> updated.
>
> The file src/tools/msvc/README contains some information that apparently
> augments the build instructions in the main documentation. It talks
> about Visual Studio 2005, which is probably outdated, and the section
> "Notes about Visual Studio Express" talks about some files that my
> installation doesn't contain, so probably also outdated. That last
> section should probably be moved into the main documentation, if it's
> still relevant.
>
> Between the main documentation and that README, it also becomes less
> clear whether the SDK or Visual Studio Express or both are needed.
>
> Then the real issue. The build.pl tries to call "vcbuild", which
> neither the SDK version 7.1 nor the Visual Studio Express 2010 contain
> anywhere. (There is a vcbuild.dll, but that's it.) Some web searching
> suggests that vcbuild.exe might have been renamed in the Visual Studio
> 2010 version. I don't see any buildfarm coverage of that version.
>
> So is 2010 supported, and where is the vcbuild program supposed to come
> from?
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-03-31 20:02:10
Message-ID: AANLkTimnsRJ0TQMB-dcFpf+6vEGwTedrijyAewdxo-xo@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 31, 2011 at 22:00, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 03/31/2011 03:38 PM, Peter Eisentraut wrote:
>>
>> So is 2010 supported, and where is the vcbuild program supposed to come
>> from?
>>
>
>
> Not that I know of. But VS 2008 is, and should be readily available. In
> fact, I recently made patches to allow it to to be used to build all the
> live branches.
>

Yeah, we had an initial patch for VS2010 support, but it wasn't quite
finished and it was decided to wait until 9.2.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-03-31 20:10:47
Message-ID: 1301602247.9296.23.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On tor, 2011-03-31 at 16:00 -0400, Andrew Dunstan wrote:
>
> On 03/31/2011 03:38 PM, Peter Eisentraut wrote:
> > So is 2010 supported, and where is the vcbuild program supposed to come
> > from?
> >
>
>
> Not that I know of. But VS 2008 is, and should be readily available. In
> fact, I recently made patches to allow it to to be used to build all the
> live branches.

The documentation appears to claim that the Platform/Windows SDK without
any Visual Studio should be enough. Is there also an upper limit on the
supported SDK version then?


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-03 14:04:41
Message-ID: BANLkTimuRH+T069076NXMDS=TH3wkmZsqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Mar 31, 2011 at 22:10, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On tor, 2011-03-31 at 16:00 -0400, Andrew Dunstan wrote:
>>
>> On 03/31/2011 03:38 PM, Peter Eisentraut wrote:
>> > So is 2010 supported, and where is the vcbuild program supposed to come
>> > from?
>> >
>>
>>
>> Not that I know of. But VS 2008 is, and should be readily available. In
>> fact, I recently made patches to allow it to to be used to build all the
>> live branches.
>
> The documentation appears to claim that the Platform/Windows SDK without
> any Visual Studio should be enough.  Is there also an upper limit on the
> supported SDK version then?

It certainly used to be enough, so I guess if they have bounced the
version of the VC compiler that's included in the SDK then yes, there
needs to be an upper bound on it.

What version is the compiler that comes along with the SDK reporting?
(not the VS Express one, the one in the SDK itself)

Guessing fromhttp://en.wikipedia.org/wiki/Microsoft_Windows_SDK, maybe
we need to say up to v6.1 for now?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-06 17:27:22
Message-ID: 1302110842.3238.13.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On sön, 2011-04-03 at 16:04 +0200, Magnus Hagander wrote:
> > The documentation appears to claim that the Platform/Windows SDK without
> > any Visual Studio should be enough. Is there also an upper limit on the
> > supported SDK version then?
>
> It certainly used to be enough, so I guess if they have bounced the
> version of the VC compiler that's included in the SDK then yes, there
> needs to be an upper bound on it.
>
> What version is the compiler that comes along with the SDK reporting?
> (not the VS Express one, the one in the SDK itself)
>
> Guessing fromhttp://en.wikipedia.org/wiki/Microsoft_Windows_SDK, maybe
> we need to say up to v6.1 for now?

I got it to build now. Here are is a list of notes that would make life
easier for future generations:

* As discussed, it should be noted that Visual Studio 2010 is not
supported yet.
* As previously mentioned, change Platform SDK to Windows SDK in
the documentation.
* I have some doubts about whether the SDK is at all needed or
whether it would suffice by itself. I went with Visual Studio
Express 2008.
* The build scripts should be made warnings-free with Perl 5.12,
which is the current default from ActiveState.
* There appears to be a bug in the GnuWin32 version of Bison that
is recommended to use, if you install it into a path that has
spaces in it, such as the default path C:\Program Files
\GnuWin32. The internal call to m4 chokes on that. Not our
bug, but perhaps worth warning about.
* vcregress.pl dies if there is no config.pl, even though the
other tools treat it as and the documentation claims it is
optional.
* clean.bat doesn't read buildenv.pl, causing a failure if you
have a path setting in there to find msbuild.exe.
* The major difficulty was figuring out the right path setting to
all the tools. The documentation is a bit hand-wavy about that.
In particular, it needed to find both vcbuild.exe and
msbuild.exe, which are conveniently hidden in C:\Program Files
\Microsoft Visual Studio 9.0\VC\vcpackages and C:\Windows
\Microsoft.NET\Framework\v2.0.50727 respectively. I'm not sure
if there is a pattern there that could be documented, but it
would really be helpful to at least give better hints about
this.
* It might also be in order to update pg_config.h.win32 relative
to the current pg_config.h.in.


From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-06 17:34:31
Message-ID: BANLkTim20D7qQo8QV4bv73Rk5pgk-db63Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>
>      * I have some doubts about whether the SDK is at all needed or
>        whether it would suffice by itself.  I went with Visual Studio
>        Express 2008.

The SDK is needed with 2008 Express, but not the non-express version.
The SDK on it's own should be enough for command line compilation.

>      * The major difficulty was figuring out the right path setting to
>        all the tools.  The documentation is a bit hand-wavy about that.
>        In particular, it needed to find both vcbuild.exe and
>        msbuild.exe, which are conveniently hidden in C:\Program Files
>        \Microsoft Visual Studio 9.0\VC\vcpackages and C:\Windows
>        \Microsoft.NET\Framework\v2.0.50727 respectively.  I'm not sure
>        if there is a pattern there that could be documented, but it
>        would really be helpful to at least give better hints about
>        this.

The SDK and/or Visual Studio should have created some shortcuts on the
menu to start command prompt windows with the appropriate environment
variables setup for you. On my system (which has Visual Studio 2008
Pro), there are shortcuts for 32 bit and 64 bit build environments.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-06 17:47:42
Message-ID: 4D9CA73E.40905@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 04/06/2011 01:34 PM, Dave Page wrote:
> On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut<peter_e(at)gmx(dot)net> wrote:
>> * I have some doubts about whether the SDK is at all needed or
>> whether it would suffice by itself. I went with Visual Studio
>> Express 2008.
> The SDK is needed with 2008 Express, but not the non-express version.
> The SDK on it's own should be enough for command line compilation.

When you install VC Express 2008 the SDK is installed with it. A
separate install is not required, as it was with VCE 2005.

cheers

andrew


From: Brar Piening <brar(at)gmx(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-06 18:04:37
Message-ID: 4D9CAB35.2010700@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, 06 Apr 2011 20:27:22 +0300, Peter Eisentraut
<peter_e(at)gmx(dot)net> wrote:
>
> I got it to build now. Here are is a list of notes that would make life
> easier for future generations:

You might also want to have a look at my VS2010 patch as it already
touches some of those issues.

https://commitfest.postgresql.org/action/patch_view?id=523

It's not ready yet but I'm prepared to get back to it as soon as there's
some serious interest.
My personal plan is to get the good parts of it commited for 9.2

Regards,

Brar


From: Brar Piening <brar(at)gmx(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-06 20:07:52
Message-ID: 4D9CC818.1080700@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, 06 Apr 2011 20:04:37 +0200, Brar Piening <brar(at)gmx(dot)de> wrote:
>
> It's not ready yet but I'm prepared to get back to it as soon as
> there's some serious interest.

I've rebased the patch in case somebody wants to try it.

http://www.piening.info/VS2010v5.patch

Regards,

Brar


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-06 23:57:45
Message-ID: 4D9CFDF9.3040804@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 04/06/2011 01:47 PM, Andrew Dunstan wrote:
>
>
> On 04/06/2011 01:34 PM, Dave Page wrote:
>> On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut<peter_e(at)gmx(dot)net>
>> wrote:
>>> * I have some doubts about whether the SDK is at all needed or
>>> whether it would suffice by itself. I went with Visual Studio
>>> Express 2008.
>> The SDK is needed with 2008 Express, but not the non-express version.
>> The SDK on it's own should be enough for command line compilation.
>
>
> When you install VC Express 2008 the SDK is installed with it. A
> separate install is not required, as it was with VCE 2005.
>

.... unless you want to build 64 bit binaries.

cheers

andrew


From: Dave Page <dpage(at)pgadmin(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-07 08:26:34
Message-ID: BANLkTimB=-JX6sHOT4hbVvz1fvJyDKgzaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 04/06/2011 01:34 PM, Dave Page wrote:
>>
>> On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut<peter_e(at)gmx(dot)net>  wrote:
>>>
>>>      * I have some doubts about whether the SDK is at all needed or
>>>        whether it would suffice by itself.  I went with Visual Studio
>>>        Express 2008.
>>
>> The SDK is needed with 2008 Express, but not the non-express version.
>> The SDK on it's own should be enough for command line compilation.
>
>
> When you install VC Express 2008 the SDK is installed with it. A separate
> install is not required, as it was with VCE 2005.

Oh nice :-)

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-07 20:08:44
Message-ID: 1302206924.21369.19.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Another issue:

...\src\tools\msvc>install "foo bar"
bar""=="" was unexpected at this time.

This makes it seemingly impossible to install into a standard location
such as under "C:\Program Files\".


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-07 20:11:21
Message-ID: 1302207081.21369.22.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On tor, 2011-04-07 at 09:26 +0100, Dave Page wrote:
> On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> >
> >
> > On 04/06/2011 01:34 PM, Dave Page wrote:
> >>
> >> On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut<peter_e(at)gmx(dot)net> wrote:
> >>>
> >>> * I have some doubts about whether the SDK is at all needed or
> >>> whether it would suffice by itself. I went with Visual Studio
> >>> Express 2008.
> >>
> >> The SDK is needed with 2008 Express, but not the non-express version.
> >> The SDK on it's own should be enough for command line compilation.
> >
> >
> > When you install VC Express 2008 the SDK is installed with it. A separate
> > install is not required, as it was with VCE 2005.
>
> Oh nice :-)

Well, it's good that you guys are almost as confused as I am. :)

Evidently, VC Express 2008 is good by itself, without the separate SDK
download.

The documentation also appears to imply that the SDK without VC Express
would be enough. I can't quite fathom how that would work, because the
vcbuild.exe is supplied by VC Express. Then again, the SDK installation
offers to install a C++ compiler, but I don't know where it put that.


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-07 20:13:27
Message-ID: BANLkTi=mVx-dK7i9YJpEQOd4NCFxG72nmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Apr 7, 2011 at 22:11, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On tor, 2011-04-07 at 09:26 +0100, Dave Page wrote:
>> On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> >
>> >
>> > On 04/06/2011 01:34 PM, Dave Page wrote:
>> >>
>> >> On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut<peter_e(at)gmx(dot)net>  wrote:
>> >>>
>> >>>      * I have some doubts about whether the SDK is at all needed or
>> >>>        whether it would suffice by itself.  I went with Visual Studio
>> >>>        Express 2008.
>> >>
>> >> The SDK is needed with 2008 Express, but not the non-express version.
>> >> The SDK on it's own should be enough for command line compilation.
>> >
>> >
>> > When you install VC Express 2008 the SDK is installed with it. A separate
>> > install is not required, as it was with VCE 2005.
>>
>> Oh nice :-)
>
> Well, it's good that you guys are almost as confused as I am. :)

yeah, it certainly is confusing.

> Evidently, VC Express 2008 is good by itself, without the separate SDK
> download.
>
> The documentation also appears to imply that the SDK without VC Express
> would be enough.  I can't quite fathom how that would work, because the
> vcbuild.exe is supplied by VC Express.  Then again, the SDK installation
> offers to install a C++ compiler, but I don't know where it put that.

The SDK supplies both the compiler and vcbuild.exe. At least it used
to - but since vcbuild isn't in VC 2010, iirc, it is not likely to be
in the new version of the SDK either..

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-07 20:20:35
Message-ID: BANLkTi=2BgsbxDqMML22R6a1iLq7U4PE=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Apr 7, 2011 at 4:11 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On tor, 2011-04-07 at 09:26 +0100, Dave Page wrote:
>> On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>> >
>> >
>> > On 04/06/2011 01:34 PM, Dave Page wrote:
>> >>
>> >> On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut<peter_e(at)gmx(dot)net>  wrote:
>> >>>
>> >>>      * I have some doubts about whether the SDK is at all needed or
>> >>>        whether it would suffice by itself.  I went with Visual Studio
>> >>>        Express 2008.
>> >>
>> >> The SDK is needed with 2008 Express, but not the non-express version.
>> >> The SDK on it's own should be enough for command line compilation.
>> >
>> >
>> > When you install VC Express 2008 the SDK is installed with it. A separate
>> > install is not required, as it was with VCE 2005.
>>
>> Oh nice :-)
>
> Well, it's good that you guys are almost as confused as I am. :)
>
> Evidently, VC Express 2008 is good by itself, without the separate SDK
> download.
>
> The documentation also appears to imply that the SDK without VC Express
> would be enough.  I can't quite fathom how that would work, because the
> vcbuild.exe is supplied by VC Express.  Then again, the SDK installation
> offers to install a C++ compiler, but I don't know where it put that.

It sure would be nice if someone would write a doc patch, or at least
a wiki page, explaining all the permutations here... I get the
impression it's not that hard to set up if you are reasonable
comfortable working in a Windows environment, but it's pretty
intimidating if you aren't.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-11 20:16:25
Message-ID: 1302552985.22447.9.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On tor, 2011-04-07 at 16:20 -0400, Robert Haas wrote:
> It sure would be nice if someone would write a doc patch, or at least
> a wiki page, explaining all the permutations here... I get the
> impression it's not that hard to set up if you are reasonable
> comfortable working in a Windows environment, but it's pretty
> intimidating if you aren't.

Here's a patch I came up with that matches my experience, but evidently
there could be many others.

Attachment Content-Type Size
install-windows.patch text/x-patch 6.6 KB

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-12 12:23:50
Message-ID: BANLkTiksfF7DUn2pPth9omVFDnzGyY=bzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Apr 11, 2011 at 22:16, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On tor, 2011-04-07 at 16:20 -0400, Robert Haas wrote:
>> It sure would be nice if someone would write a doc patch, or at least
>> a wiki page, explaining all the permutations here...  I get the
>> impression it's not that hard to set up if you are reasonable
>> comfortable working in a Windows environment, but it's pretty
>> intimidating if you aren't.
>
> Here's a patch I came up with that matches my experience, but evidently
> there could be many others.

Have we shown for sure that you can't build it with the compiler
that's in the SDK? If not, I still think that should be our primary
option - I certainly don't see how it's obsolete. (and you can,
afaics, still get the platform sdk with the correct version of the
compiler (non-vs2010), but I haven't tested it)

Or did I miss something in this thread?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-12 12:51:57
Message-ID: 4DA44AED.9010103@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 04/12/2011 08:23 AM, Magnus Hagander wrote:
> On Mon, Apr 11, 2011 at 22:16, Peter Eisentraut<peter_e(at)gmx(dot)net> wrote:
>> On tor, 2011-04-07 at 16:20 -0400, Robert Haas wrote:
>>> It sure would be nice if someone would write a doc patch, or at least
>>> a wiki page, explaining all the permutations here... I get the
>>> impression it's not that hard to set up if you are reasonable
>>> comfortable working in a Windows environment, but it's pretty
>>> intimidating if you aren't.
>> Here's a patch I came up with that matches my experience, but evidently
>> there could be many others.
> Have we shown for sure that you can't build it with the compiler
> that's in the SDK? If not, I still think that should be our primary
> option - I certainly don't see how it's obsolete. (and you can,
> afaics, still get the platform sdk with the correct version of the
> compiler (non-vs2010), but I haven't tested it)
>
> Or did I miss something in this thread?
>

I haven't actually tried using the SDK alone. I'll try testing that on a
cloud appliance when I get a chance, as I'm out of Windows boxes I can
reasonable perturb. I do know you *need* the SDK for 64 bit builds with
VSE 2008, as it doesn't include a 64 bit compiler.

cheers

andrew


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-12 12:54:15
Message-ID: BANLkTinC8Px1W+Go+QWAUgFEb0oHiWt0BQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Apr 12, 2011 at 14:51, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 04/12/2011 08:23 AM, Magnus Hagander wrote:
>>
>> On Mon, Apr 11, 2011 at 22:16, Peter Eisentraut<peter_e(at)gmx(dot)net>  wrote:
>>>
>>> On tor, 2011-04-07 at 16:20 -0400, Robert Haas wrote:
>>>>
>>>> It sure would be nice if someone would write a doc patch, or at least
>>>> a wiki page, explaining all the permutations here...  I get the
>>>> impression it's not that hard to set up if you are reasonable
>>>> comfortable working in a Windows environment, but it's pretty
>>>> intimidating if you aren't.
>>>
>>> Here's a patch I came up with that matches my experience, but evidently
>>> there could be many others.
>>
>> Have we shown for sure that you can't build it with the compiler
>> that's in the SDK? If not, I still think that should be our primary
>> option - I certainly don't see how it's obsolete. (and you can,
>> afaics, still get the platform sdk with the correct version of the
>> compiler (non-vs2010), but I haven't tested it)
>>
>> Or did I miss something in this thread?
>>
>
>
> I haven't actually tried using the SDK alone. I'll try testing that on a
> cloud appliance when I get a chance, as I'm out of Windows boxes I can

Yeah, I'm in the same situation on that, which is why I haven't tested
anythning (yet) myself.

> reasonable perturb. I do know you *need* the SDK for 64 bit builds with VSE
> 2008, as it doesn't include a 64 bit compiler.

That alone seems reason enough to recommend the SDK build method over
VSE, so we don't have to recommend different methods depending.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Brar Piening <brar(at)gmx(dot)de>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-12 20:36:16
Message-ID: 4DA4B7C0.3030600@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, 12 Apr 2011 08:51:57 -0400, Andrew Dunstan
<andrew(at)dunslane(dot)net> wrote:
>> that's in the SDK? If not, I still think that should be our primary
>> option - I certainly don't see how it's obsolete. (and you can,
>> afaics, still get the platform sdk with the correct version of the
>> compiler (non-vs2010), but I haven't tested it)
>>
>> Or did I miss something in this thread?
>>
> Have we shown for sure that you can't build it with the compiler
>
>
> I haven't actually tried using the SDK alone. I'll try testing that on
> a cloud appliance when I get a chance, as I'm out of Windows boxes I
> can reasonable perturb. I do know you *need* the SDK for 64 bit builds
> with VSE 2008, as it doesn't include a 64 bit compiler.

I've just built current git HEAD on a clean Windows XP virtual machine
with only "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP
1" (the latest pre VS 2010 SDK) on it.

It builds without problems (a few warnings) and passes vcregress check.

VS or VS EXPRESS is probably not needed to build Postgres with any
recent Windows SDK that includes compilers (>= 6.0).

This Wikipedia article might shed some more light on the MS SDK chaos:
http://en.wikipedia.org/wiki/Microsoft_Windows_SDK

Regards,

Brar


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Brar Piening <brar(at)gmx(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-13 08:45:25
Message-ID: BANLkTimMi-=0aqw6SRmepvhjX67jRkr3yA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Apr 12, 2011 at 22:36, Brar Piening <brar(at)gmx(dot)de> wrote:
> On Tue, 12 Apr 2011 08:51:57 -0400, Andrew Dunstan <andrew(at)dunslane(dot)net>
> wrote:
>>>
>>> that's in the SDK? If not, I still think that should be our primary
>>> option - I certainly don't see how it's obsolete. (and you can,
>>> afaics, still get the platform sdk with the correct version of the
>>> compiler (non-vs2010), but I haven't tested it)
>>>
>>> Or did I miss something in this thread?
>>>
>> Have we shown for sure that you can't build it with the compiler
>>
>>
>> I haven't actually tried using the SDK alone. I'll try testing that on a
>> cloud appliance when I get a chance, as I'm out of Windows boxes I can
>> reasonable perturb. I do know you *need* the SDK for 64 bit builds with VSE
>> 2008, as it doesn't include a 64 bit compiler.
>
> I've just built current git HEAD on a clean Windows XP virtual machine with
> only "Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP 1" (the
> latest pre VS 2010 SDK) on it.
>
> It builds without problems (a few warnings) and passes vcregress check.
>
> VS or VS EXPRESS is probably not needed to build Postgres with any recent
> Windows SDK  that includes compilers (>= 6.0).

So per your experience, all we really need to do is to define what the
*max* level of the Windows SDK we can use is, to make sure people
don't get the VS2010 compiler instead?

(And adding the note that VS2010 isn't supported with or without the
platform sdk)

> This Wikipedia article might shed some more light on the MS SDK chaos:
> http://en.wikipedia.org/wiki/Microsoft_Windows_SDK

Yeah, unfortunately it doesn't list which version of the compilers are
included...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Brar Piening <brar(at)gmx(dot)de>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-13 22:14:00
Message-ID: 4DA62028.6000307@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, 13 Apr 2011 10:45:25 +0200, Magnus Hagander
<magnus(at)hagander(dot)net> wrote:
>
> So per your experience, all we really need to do is to define what the
> *max* level of the Windows SDK we can use is, to make sure people
> don't get the VS2010 compiler instead?
>
> (And adding the note that VS2010 isn't supported with or without the
> platform sdk)
Yes, v6.0-v7.0 will work, v7.0a(=VS 2010) and v7.1 will not work.

> Yeah, unfortunately it doesn't list which version of the compilers are
> included...
>
Actually the VS 2010 compilers (and those of the associated Windows
SDK's) work fine for building postgres. They produce quite a few
additional warnings that I already mentioned
(http://archives.postgresql.org/pgsql-hackers/2011-01/msg00118.php) but
the product seems to work fine.

The problem with VS 2010 (and the associated Windows SDK's) is the fact
that MS dropped VCBuild.exe and now uses MSBuild.exe to build Visual C++
Projects so the generated build files don't work any longer. (see
http://msdn.microsoft.com/en-us/library/bb531344.aspx)

For the records (CSV):
Version,Windows SDK Version Number,Build Number,Release Date,Building
PostgreSQL
Windows Vista Update & .NET 3.0
SDK,v6.0,6.1.6000.16384.10,2007-03-22,will work (tested*)
Included in Visual Studio 2008,v6.0a,??,2007-11-19,will work (untested)
Windows Server 2008 & .NET 3.5
SDK,v6.1,6.0.6001.18000.367,2008-02-05,will work (untested)
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP
1,v7.0,6.1.7600.16385,2009-07-24,will work (tested*)
Included in Visual Studio 2010,v7.0a,6.1.7600.16385,2010-04-12,will not
work yet (tested**)
Microsoft Windows SDK for Windows 7 and .NET Framework
4,v7.1,7.1.7600.0.30514,2010-05-21,will not work yet (tested**)

* builds and passes vcregress check with current git HEAD
** fails while trying to detect vcbuild version

Regards,

Brar


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Brar Piening <brar(at)gmx(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-15 13:35:44
Message-ID: BANLkTiniyV2vLRh9aVWd_YB5cAg-ZxT4MA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Apr 14, 2011 at 00:14, Brar Piening <brar(at)gmx(dot)de> wrote:
> On Wed, 13 Apr 2011 10:45:25 +0200, Magnus Hagander <magnus(at)hagander(dot)net>
> wrote:
>>
>> So per your experience, all we really need to do is to define what the
>> *max* level of the Windows SDK we can use is, to make sure people
>> don't get the VS2010 compiler instead?
>>
>> (And adding the note that VS2010 isn't supported with or without the
>> platform sdk)
>
> Yes, v6.0-v7.0 will work, v7.0a(=VS 2010) and v7.1 will not work.

Right. Thanks for confirming!

I've applied a patch that specifies this. I also picked out the part
of Peters patch that included notes about GnuWin32, but left the parts
that rewrote things to recommend Visual C++ Express.

>> Yeah, unfortunately it doesn't list which version of the compilers are
>> included...
>>
> Actually the VS 2010 compilers (and those of the associated Windows SDK's)
> work fine for building postgres. They produce quite a few additional
> warnings that I already mentioned
> (http://archives.postgresql.org/pgsql-hackers/2011-01/msg00118.php) but the
> product seems to work fine.
>
> The problem with VS 2010 (and the associated Windows SDK's) is the fact that
> MS dropped VCBuild.exe and now uses MSBuild.exe to build Visual C++ Projects
> so the generated build files don't work any longer. (see
> http://msdn.microsoft.com/en-us/library/bb531344.aspx)

Right. From the perspective of the *end user*, however, that means it
doesn't work :-)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Brar Piening <brar(at)gmx(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-15 13:57:46
Message-ID: 1302875660-sup-5412@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Excerpts from Magnus Hagander's message of vie abr 15 10:35:44 -0300 2011:
> On Thu, Apr 14, 2011 at 00:14, Brar Piening <brar(at)gmx(dot)de> wrote:

> > The problem with VS 2010 (and the associated Windows SDK's) is the fact that
> > MS dropped VCBuild.exe and now uses MSBuild.exe to build Visual C++ Projects
> > so the generated build files don't work any longer. (see
> > http://msdn.microsoft.com/en-us/library/bb531344.aspx)
>
> Right. From the perspective of the *end user*, however, that means it
> doesn't work :-)

So we need new tools to generate the .vcxproj files now, huh? Hopefully
this just requires a replacement Save method in Project.pm ...

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Brar Piening <brar(at)gmx(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-04-15 14:02:56
Message-ID: BANLkTi=Wo1md9Op70g9Z_z7+smgNg_xe_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Apr 15, 2011 at 15:57, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Magnus Hagander's message of vie abr 15 10:35:44 -0300 2011:
>> On Thu, Apr 14, 2011 at 00:14, Brar Piening <brar(at)gmx(dot)de> wrote:
>
>> > The problem with VS 2010 (and the associated Windows SDK's) is the fact that
>> > MS dropped VCBuild.exe and now uses MSBuild.exe to build Visual C++ Projects
>> > so the generated build files don't work any longer. (see
>> > http://msdn.microsoft.com/en-us/library/bb531344.aspx)
>>
>> Right. From the perspective of the *end user*, however, that means it
>> doesn't work :-)
>
> So we need new tools to generate the .vcxproj files now, huh?  Hopefully
> this just requires a replacement Save method in Project.pm ...

We have a patch for this for the next commitfest. I intend to work
with that one and get it in, so that 9.2 should work with that.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Brar Piening <brar(at)gmx(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-05-11 04:15:08
Message-ID: 4DCA0D4C.2040207@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, 06 Apr 2011 22:07:52 +0200, Brar Piening <brar(at)gmx(dot)de> wrote:
> On Wed, 06 Apr 2011 20:04:37 +0200, Brar Piening <brar(at)gmx(dot)de> wrote:
>>
>> It's not ready yet but I'm prepared to get back to it as soon as
>> there's some serious interest.
>

I've updated the patch once again to reflect the fixes to pgbison.bat in
my alternative pgbison.pl

http://www.piening.info/VS2010v6.patch


From: Brar Piening <brar(at)gmx(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows build issues
Date: 2011-05-11 04:19:36
Message-ID: 4DCA0E58.6090808@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, 11 May 2011 06:15:08 +0200, Brar Piening <brar(at)gmx(dot)de> wrote:
>
> I've updated the patch once again to reflect the fixes to pgbison.bat
> in my alternative pgbison.pl

Actually not pgbison but pgflex