Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Jeremy Drake
On Tue, 3 Oct 2006, Magnus Hagander wrote: Looks like the gendef script is failing. Check the contents of release\postgres\postgres.def - it should have thousands of symbols, but I'm willing to bet it's empty... It contains one word: EXPORTS. I assume this means it is empty. What should I

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
Looks like the gendef script is failing. Check the contents of release\postgres\postgres.def - it should have thousands of symbols, but I'm willing to bet it's empty... It contains one word: EXPORTS. I assume this means it is empty. What should I do about it? Is there something I

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Jeremy Drake
On Tue, 3 Oct 2006, Magnus Hagander wrote: Looks like the gendef script is failing. Check the contents of release\postgres\postgres.def - it should have thousands of symbols, but I'm willing to bet it's empty... It contains one word: EXPORTS. I assume this means it is empty.

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
Delete the DEF file and run the gendef command manually (see the project file for commandline, IIRC there are no parameters, but just to be sure). I'm wondering if you're seeing the samre problem as Joachim Wieland (off-list conversation) where the output from dumpbin.exe goes to

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Jeremy Drake
On Tue, 3 Oct 2006, Magnus Hagander wrote: Funky. Can you try having it run the dumpbin command into a tempfile, and then open-and-read that tempfile, to see if that makes a difference? (Assuming you know enough perl to do that, of course) Doing it as system(dumpbin /symbols $_ $tmpfn)

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Joachim Wieland
On Tue, Oct 03, 2006 at 12:27:47AM -0700, Jeremy Drake wrote: On Tue, 3 Oct 2006, Magnus Hagander wrote: Funky. Can you try having it run the dumpbin command into a tempfile, and then open-and-read that tempfile, to see if that makes a difference? (Assuming you know enough perl to do

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: which looks like they figured out that they needed to check for MicroSoft C explicitly. I have no idea why they do not define __STDC__ however. Can we just define __STDC__ when compiling that file (or rather, when compiling any bison-generated

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Chuck McDevitt
:51 AM To: Magnus Hagander Cc: Jeremy Drake; PostgreSQL Hackers Subject: Re: [HACKERS] src/tools/msvc usage instructions Magnus Hagander [EMAIL PROTECTED] writes: which looks like they figured out that they needed to check for MicroSoft C explicitly. I have no idea why they do not define

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
which looks like they figured out that they needed to check for MicroSoft C explicitly. I have no idea why they do not define __STDC__ however. Can we just define __STDC__ when compiling that file (or rather, when compiling any bison-generated output file)? Or is that likely to

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: That seems pretty risky. Better to use the /Za switch or whatever it was to get the compiler to assert it for itself. Unfortunatly, that breaks things so bad it's not even funny. Um. Well, then we tell people not to use bison 2.1 with MSVC.

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Bruce Momjian
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: That seems pretty risky. Better to use the /Za switch or whatever it was to get the compiler to assert it for itself. Unfortunatly, that breaks things so bad it's not even funny. Um. Well, then we tell people not to use

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
That seems pretty risky. Better to use the /Za switch or whatever it was to get the compiler to assert it for itself. Unfortunatly, that breaks things so bad it's not even funny. Um. Well, then we tell people not to use bison 2.1 with MSVC. Or add a configure test to

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Or add a configure test to prevent it, and display a proper error message. Yeha, I will do this. As long as we're touching that code: the existing test for too-old bison seriously sucks, because all that it does is to print a warning that most people

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
Magnus Hagander [EMAIL PROTECTED] writes: Or add a configure test to prevent it, and display a proper error message. Yeha, I will do this. As long as we're touching that code: the existing test for too-old bison seriously sucks, because all that it does is to Oh, I'm not touching

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Magnus Hagander
That's on my TODO list to write, but I haven't had the time yet. The basic is that if you disable everything in the config.pl file, you can run with almost no external dependencies. You'll need flex+bison if buliding off CVS. Oh, and it requires Visual C++ 2005. Should work

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Jeremy Drake
On Mon, 2 Oct 2006, Tom Lane wrote: Jeremy Drake [EMAIL PROTECTED] writes: I grabbed flex and bison from GNUwin32 (http://gnuwin32.sourceforge.net/packages/bison.htm) This appears to not work out well. If I copy the generated files from bison from a linux box, then they are ok, but if

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Jeremy Drake
On Mon, 2 Oct 2006, Magnus Hagander wrote: This appears to not work out well. If I copy the generated files from bison from a linux box, then they are ok, but if I try to use ones generated using that version of bison, it does not compile. I'll look around for a different one. That's

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Jeremy Drake
On Sun, 1 Oct 2006, Jeremy Drake wrote: On Mon, 2 Oct 2006, Magnus Hagander wrote: If you do build solution it should build all project sin the correct order - there are dependency references set between them that should take care of this automatically. If I do build solution it tells

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Magnus Hagander
If you do build solution it should build all project sin the correct order - there are dependency references set between them that should take care of this automatically. If I do build solution it tells me Project not selected to build for this solution configuration for all

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Hiroshi Saito
Hi. I think that it has forgotten for VS2005-express to add path of SDK by myself. http://www.winpg.jp/~saito/VS2005/VS2005_Include.png http://www.winpg.jp/~saito/VS2005/VS2005_Library.png Do I mistake your meaning? Regards, Hiroshi Saito I switched to short paths in the INCLUDE env var, but

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Certainly not --- we work with both of those (I have 1.875 on one of my devel machines and 2.1 on two others). Well, it *does* break with 2.1 on win32-native. Could be something simple, could be that it's just generating msvc-incompatible code. Hm,

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Tom Lane
Jeremy Drake [EMAIL PROTECTED] writes: The errors I got on this file were: 1bootparse.tab.c(1065) : error C2449: found '{' at file scope (missing function header?) I looked at this. Line 1065 is the left brace starting yyparse(). On my Fedora Core 5 box with Bison 2.1 installed, the stuff

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Jeremy Drake
On Mon, 2 Oct 2006, Tom Lane wrote: Jeremy Drake [EMAIL PROTECTED] writes: The errors I got on this file were: 1bootparse.tab.c(1065) : error C2449: found '{' at file scope (missing function header?) I looked at this. Line 1065 is the left brace starting yyparse(). On my Fedora Core

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Sergey E. Koposov
On Mon, 2 Oct 2006, Jeremy Drake wrote: In the bison 2.2 generated code, the #if check is #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) which looks like they figured out that they needed to check for MicroSoft C explicitly. I have no idea

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Jeremy Drake
I now get things to compile, but now I get linker errors on any dll which needs to access symbols from postgres.exe via postgres.lib. For example: 1-- Build started: Project: autoinc, Configuration: Release Win32 -- 1Generate DEF file 1Not re-generating AUTOINC.DEF, file already exists.

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Magnus Hagander
To: Magnus Hagander Cc: PostgreSQL Hackers Subject: Re: [HACKERS] src/tools/msvc usage instructions I now get things to compile, but now I get linker errors on any dll which needs to access symbols from postgres.exe via postgres.lib. For example: 1-- Build started: Project: autoinc

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-02 Thread Magnus Hagander
Jeremy Drake [EMAIL PROTECTED] writes: The errors I got on this file were: 1bootparse.tab.c(1065) : error C2449: found '{' at file scope 1(missing function header?) I looked at this. Line 1065 is the left brace starting yyparse(). On my Fedora Core 5 box with Bison 2.1

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-01 Thread Magnus Hagander
I was just trying to build using the src/tools/msvc scripts on windows, and I was wondering if there were any instructions on how to do this, what prerequisites there are, where to get them, etc. I couldn't find any, but I may not know the correct place to look. That's on my TODO list

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-01 Thread Tom Lane
Jeremy Drake [EMAIL PROTECTED] writes: I grabbed flex and bison from GNUwin32 (http://gnuwin32.sourceforge.net/packages/bison.htm) This appears to not work out well. If I copy the generated files from bison from a linux box, then they are ok, but if I try to use ones generated using that