Thread: Windows build issues

Windows build issues

From
Peter Eisentraut
Date:
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?




Re: Windows build issues

From
Andrew Dunstan
Date:

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





Re: Windows build issues

From
Dave Page
Date:
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@gmx.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@postgresql.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


Re: Windows build issues

From
Magnus Hagander
Date:
On Thu, Mar 31, 2011 at 22:00, Andrew Dunstan <andrew@dunslane.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/


Re: Windows build issues

From
Peter Eisentraut
Date:
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?





Re: Windows build issues

From
Magnus Hagander
Date:
On Thu, Mar 31, 2011 at 22:10, Peter Eisentraut <peter_e@gmx.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/


Re: Windows build issues

From
Peter Eisentraut
Date:
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
isat all needed or       whether it would suffice by itself.  I went with Visual Studio       Express 2008.     * The
buildscripts should be made warnings-free with Perl 5.12,       which is the current default from ActiveState.     *
Thereappears to be a bug in the GnuWin32 version of Bison that       is recommended to use, if you install it into a
paththat has       spaces in it, such as the default path C:\Program Files       \GnuWin32.  The internal call to m4
chokeson that.  Not our       bug, but perhaps worth warning about.     * vcregress.pl dies if there is no config.pl,
eventhough the       other tools treat it as and the documentation claims it is       optional.     * clean.bat doesn't
readbuildenv.pl, causing a failure if you       have a path setting in there to find msbuild.exe.     * The major
difficultywas 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:\ProgramFiles       \Microsoft Visual Studio 9.0\VC\vcpackages and C:\Windows
\Microsoft.NET\Framework\v2.0.50727respectively.  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
inorder to update pg_config.h.win32 relative       to the current pg_config.h.in.
 




Re: Windows build issues

From
Dave Page
Date:
On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut <peter_e@gmx.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


Re: Windows build issues

From
Andrew Dunstan
Date:

On 04/06/2011 01:34 PM, Dave Page wrote:
> On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut<peter_e@gmx.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




Re: Windows build issues

From
Brar Piening
Date:
On Wed, 06 Apr 2011 20:27:22 +0300, Peter Eisentraut 
<peter_e@gmx.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



Re: Windows build issues

From
Brar Piening
Date:
On Wed, 06 Apr 2011 20:04:37 +0200, Brar Piening <brar@gmx.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


Re: Windows build issues

From
Andrew Dunstan
Date:

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


Re: Windows build issues

From
Dave Page
Date:
On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan <andrew@dunslane.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@gmx.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


Re: Windows build issues

From
Peter Eisentraut
Date:
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\".



Re: Windows build issues

From
Peter Eisentraut
Date:
On tor, 2011-04-07 at 09:26 +0100, Dave Page wrote:
> On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan <andrew@dunslane.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@gmx.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.




Re: Windows build issues

From
Magnus Hagander
Date:
On Thu, Apr 7, 2011 at 22:11, Peter Eisentraut <peter_e@gmx.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@dunslane.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@gmx.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/


Re: Windows build issues

From
Robert Haas
Date:
On Thu, Apr 7, 2011 at 4:11 PM, Peter Eisentraut <peter_e@gmx.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@dunslane.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@gmx.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


Re: Windows build issues

From
Peter Eisentraut
Date:
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

Re: Windows build issues

From
Magnus Hagander
Date:
On Mon, Apr 11, 2011 at 22:16, Peter Eisentraut <peter_e@gmx.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/


Re: Windows build issues

From
Andrew Dunstan
Date:

On 04/12/2011 08:23 AM, Magnus Hagander wrote:
> On Mon, Apr 11, 2011 at 22:16, Peter Eisentraut<peter_e@gmx.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


Re: Windows build issues

From
Magnus Hagander
Date:
On Tue, Apr 12, 2011 at 14:51, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 04/12/2011 08:23 AM, Magnus Hagander wrote:
>>
>> On Mon, Apr 11, 2011 at 22:16, Peter Eisentraut<peter_e@gmx.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/


Re: Windows build issues

From
Brar Piening
Date:
On Tue, 12 Apr 2011 08:51:57 -0400, Andrew Dunstan 
<andrew@dunslane.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


Re: Windows build issues

From
Magnus Hagander
Date:
On Tue, Apr 12, 2011 at 22:36, Brar Piening <brar@gmx.de> wrote:
> On Tue, 12 Apr 2011 08:51:57 -0400, Andrew Dunstan <andrew@dunslane.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/


Re: Windows build issues

From
Brar Piening
Date:
On Wed, 13 Apr 2011 10:45:25 +0200, Magnus Hagander 
<magnus@hagander.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







Re: Windows build issues

From
Magnus Hagander
Date:
On Thu, Apr 14, 2011 at 00:14, Brar Piening <brar@gmx.de> wrote:
> On Wed, 13 Apr 2011 10:45:25 +0200, Magnus Hagander <magnus@hagander.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/


Re: Windows build issues

From
Alvaro Herrera
Date:
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@gmx.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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Windows build issues

From
Magnus Hagander
Date:
On Fri, Apr 15, 2011 at 15:57, Alvaro Herrera
<alvherre@commandprompt.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@gmx.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/


Re: Windows build issues

From
Brar Piening
Date:
On Wed, 06 Apr 2011 22:07:52 +0200, Brar Piening <brar@gmx.de> wrote:
> On Wed, 06 Apr 2011 20:04:37 +0200, Brar Piening <brar@gmx.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



Re: Windows build issues

From
Brar Piening
Date:
On Wed, 11 May 2011 06:15:08 +0200, Brar Piening <brar@gmx.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