Re: [HACKERS] Windows build issues

2011-05-10 Thread Brar Piening

On Wed, 06 Apr 2011 22:07:52 +0200, Brar Piening b...@gmx.de wrote:

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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-05-10 Thread Brar Piening

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



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-15 Thread Magnus Hagander
On Thu, Apr 14, 2011 at 00:14, Brar Piening b...@gmx.de wrote:
 On Wed, 13 Apr 2011 10:45:25 +0200, Magnus Hagander mag...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-15 Thread Alvaro Herrera
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 b...@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 alvhe...@commandprompt.com
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-15 Thread Magnus Hagander
On Fri, Apr 15, 2011 at 15:57, Alvaro Herrera
alvhe...@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 b...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-13 Thread Magnus Hagander
On Tue, Apr 12, 2011 at 22:36, Brar Piening b...@gmx.de wrote:
 On Tue, 12 Apr 2011 08:51:57 -0400, Andrew Dunstan and...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-13 Thread Brar Piening
On Wed, 13 Apr 2011 10:45:25 +0200, Magnus Hagander 
mag...@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






--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-12 Thread Magnus Hagander
On Mon, Apr 11, 2011 at 22:16, Peter Eisentraut pete...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-12 Thread Andrew Dunstan



On 04/12/2011 08:23 AM, Magnus Hagander wrote:

On Mon, Apr 11, 2011 at 22:16, Peter Eisentrautpete...@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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-12 Thread Magnus Hagander
On Tue, Apr 12, 2011 at 14:51, Andrew Dunstan and...@dunslane.net wrote:


 On 04/12/2011 08:23 AM, Magnus Hagander wrote:

 On Mon, Apr 11, 2011 at 22:16, Peter Eisentrautpete...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-12 Thread Brar Piening
On Tue, 12 Apr 2011 08:51:57 -0400, Andrew Dunstan 
and...@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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-11 Thread Peter Eisentraut
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.

diff --git i/doc/src/sgml/install-windows.sgml w/doc/src/sgml/install-windows.sgml
index f6d38c1..d13a161 100644
--- i/doc/src/sgml/install-windows.sgml
+++ w/doc/src/sgml/install-windows.sgml
@@ -19,11 +19,11 @@
  para
   There are several different ways of building PostgreSQL on
   productnameWindows/productname. The simplest way to build with
-  Microsoft tools is to install a modern version of the
-  productnameMicrosoft Platform SDK/productname and use use the included
+  Microsoft tools is to install
+  productnameMicrosoft Visual C++ 2008 Express Edition/productname and use use the included
   compiler. It is also possible to build with the full
   productnameMicrosoft Visual C++ 2005 or 2008/productname. In some cases
-  that requires the installation of the productnamePlatform SDK/productname
+  that requires the installation of the productnameWindows SDK/productname
   in addition to the compiler.
  /para
 
@@ -68,17 +68,21 @@
  /para
 
  sect1 id=install-windows-full
-  titleBuilding with productnameVisual C++/productname or the
-  productnamePlatform SDK/productname/title
+  titleBuilding with productnameVisual C++/productname/title
 
  para
   PostgreSQL can be built using the Visual C++ compiler suite from Microsoft.
   These compilers can be either from productnameVisual Studio/productname,
-  productnameVisual Studio Express/productname or recent versions of the
-  productnamePlatform SDK/productname. If you do not already have a
-  productnameVisual Studio/productname environment set up, the easiest
-  way us to use the compilers in the productnamePlatform SDK/productname,
-  which is a free download from Microsoft.
+  productnameVisual Studio Express/productname or the
+  productnamePlatform SDK/productname.  (The productnamePlatform
+  SDK/productname approach is obsolescent.  The SDK has been renamed
+  to productnameWindows SDK/productname and is included
+  in productnameVisual Studio Express/productname).  If you do not
+  already have a
+  productnameVisual Studio/productname environment set up, the
+  easiest way us to use the productnameVisual C++
+  Express/productname component from productnameVisual Studio
+  Express/productname, which is a free download from Microsoft.
  /para
 
  para
@@ -86,7 +90,9 @@
   productnameVisual Studio 2005/productname and
   productnameVisual Studio 2008/productname. When using the Platform SDK
   only, or when building for 64-bit Windows, only
-  productnameVisual Studio 2008/productname is supported.
+  productnameVisual Studio 2008/productname is
+  supported.  productnameVisual Studio 2010/productname is not yet
+  supported and will not work.
  /para
 
  para
@@ -94,13 +100,16 @@
   are in the filenamesrc/tools/msvc/filename directory. When building,
   make sure there are no tools from productnameMinGW/productname or
   productnameCygwin/productname present in your system PATH. Also, make
-  sure you have all the required Visual C++ tools available in the PATH. In
-  productnameVisual Studio/productname, start the
-  applicationVisual Studio Command Prompt/application. In the
+  sure you have all the required Visual C++ tools available in the PATH.  The easiest way to accomplish that, when using
+  productnameVisual Studio/productname, is to start the
+  applicationVisual Studio Command Prompt/application that is installed in the Start menu.  When using the
   productnamePlatform SDK/productname, start the
   applicationCMD shell/application listed under the SDK on the Start Menu.
   If you wish to build a 64-bit version, you must use the 64-bit version of
   the command, and vice versa.
+ /para
+
+ para
   All commands should be run from the filenamesrc\tools\msvc/filename
   directory.
  /para
@@ -140,18 +149,20 @@ $ENV{PATH}=$ENV{PATH} . ';c:\some\where\bison\bin';
 
variablelist
 varlistentry
- termproductnameMicrosoft Platform SDK/productname/term
+ termproductnameMicrosoft Visual C++/productname/term
  listitempara
-  It is recommended that you upgrade to the latest available version
-  of the productnameMicrosoft Platform SDK/productname, available
-  for download from ulink url=http://www.microsoft.com/downloads/;/.
+  It is recommended that you use productnameMicrosoft Visual
+  Studio 2008 Express/productname, available for download
+  from ulink url=http://www.microsoft.com/downloads/;/, if
+  you don't already have another version installed.
  /para
  para
-  You must always include the
-  applicationWindows Headers and 

Re: [HACKERS] Windows build issues

2011-04-07 Thread Dave Page
On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan and...@dunslane.net wrote:


 On 04/06/2011 01:34 PM, Dave Page wrote:

 On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentrautpete...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-07 Thread Peter Eisentraut
Another issue:

...\src\tools\msvcinstall 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\.


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-07 Thread Peter Eisentraut
On tor, 2011-04-07 at 09:26 +0100, Dave Page wrote:
 On Wed, Apr 6, 2011 at 6:47 PM, Andrew Dunstan and...@dunslane.net wrote:
 
 
  On 04/06/2011 01:34 PM, Dave Page wrote:
 
  On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentrautpete...@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.



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-07 Thread Magnus Hagander
On Thu, Apr 7, 2011 at 22:11, Peter Eisentraut pete...@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 and...@dunslane.net wrote:
 
 
  On 04/06/2011 01:34 PM, Dave Page wrote:
 
  On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentrautpete...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-07 Thread Robert Haas
On Thu, Apr 7, 2011 at 4:11 PM, Peter Eisentraut pete...@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 and...@dunslane.net wrote:
 
 
  On 04/06/2011 01:34 PM, Dave Page wrote:
 
  On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentrautpete...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-06 Thread Peter Eisentraut
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.



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-06 Thread Dave Page
On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentraut pete...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-06 Thread Andrew Dunstan



On 04/06/2011 01:34 PM, Dave Page wrote:

On Wed, Apr 6, 2011 at 6:27 PM, Peter Eisentrautpete...@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



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-06 Thread Brar Piening
On Wed, 06 Apr 2011 20:27:22 +0300, Peter Eisentraut 
pete...@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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-06 Thread Brar Piening

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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-06 Thread Andrew Dunstan



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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-04-03 Thread Magnus Hagander
On Thu, Mar 31, 2011 at 22:10, Peter Eisentraut pete...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Windows build issues

2011-03-31 Thread Peter Eisentraut
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


Re: [HACKERS] Windows build issues

2011-03-31 Thread Andrew Dunstan



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




--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-03-31 Thread Dave Page
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 pete...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-03-31 Thread Magnus Hagander
On Thu, Mar 31, 2011 at 22:00, Andrew Dunstan and...@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/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Windows build issues

2011-03-31 Thread Peter Eisentraut
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?




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers