Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
> VC++6.0 isn't a very good compiler and it's not very compatible with > gcc, while Visual Studio 2005 compiler is much more > compatible and has a better optimizer. > > Plus, VC++6.0 had a closed "proprietary" data format for .dsp > and .dsw files, while the current Visual Studio uses a > standard XML format. > > Finally, Microsoft gives away (as in free, no cost) Visual > C++ Express edition, which includes the current compiler. > > I don't see any reason we'd want to target VC++6.0. > > > P.s. With the current Visual Studio, it's easy to add Bison > and Flex custom rules, so that it automatically calls them > for .y and .l files. Right. It can be done. It's not quite that easy though - we need to rename the output files as well, the default names generated by bison/flex won't work. //Magnus ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
> > You mean they have a tool that parses GNU Makefiles and generate VC > > project files? Sure, that might be interesting. I've seen I > think two > > others, and tried, but they fell over badly because the pg build > > system was too complicated. But I beleive I'm still allowed > to loko at > > GPL stuff and get ideas as long as I don't copy the code :-) > > [Note: I have no idea how much people have done on this > already. It's just that all this talk of automatic generation > makes me curious. > Myself, I have no idea how VC makefile work.] > > Is it so hard to automatically generate the necessary info? No. Not really :-) > On a clean source tree, "make -n" will dump all the commands > required to complete the build. You could probably extract > all the info you required from there, although the directory > changing would kill you. Can't do that on a clean source tree, you need to ./configure first. > So my thought is, create a number of tracing scripts, eg > cc-trace which examine their arguments to see what needs to > be done, recording the current directory and such. Then execute: > > make CC="cc-trace" LD="ld-trace" etc... > > And you should be able to build up a tree of what depends on > what. This doesn't take care of the other stuff the makefile > does though (like the generation of pg_config_paths.h, can VC > makefile do things like that?) Again, this requires msys and GNU make to start with. I want it to work without those completely. And the script I have now does this just fine, it just needs some cleanup work and the removing of a couple of hardcoded things. A lot of space in it right now is because I list each project manually in the beginning (postgres, one for each binary in bin/ etc) because the makefiles aren't entirely consistent for that. And it also gorws a bit because the conversion procs are built a different way... //Magnus ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
On Fri, May 05, 2006 at 09:50:38AM +0200, Magnus Hagander wrote: > You mean they have a tool that parses GNU Makefiles and generate VC > project files? Sure, that might be interesting. I've seen I think two > others, and tried, but they fell over badly because the pg build system > was too complicated. But I beleive I'm still allowed to loko at GPL > stuff and get ideas as long as I don't copy the code :-) [Note: I have no idea how much people have done on this already. It's just that all this talk of automatic generation makes me curious. Myself, I have no idea how VC makefile work.] Is it so hard to automatically generate the necessary info? On a clean source tree, "make -n" will dump all the commands required to complete the build. You could probably extract all the info you required from there, although the directory changing would kill you. So my thought is, create a number of tracing scripts, eg cc-trace which examine their arguments to see what needs to be done, recording the current directory and such. Then execute: make CC="cc-trace" LD="ld-trace" etc... And you should be able to build up a tree of what depends on what. This doesn't take care of the other stuff the makefile does though (like the generation of pg_config_paths.h, can VC makefile do things like that?) Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
- Original Message - From: "Magnus Hagander" > The target is VC++ 2003 and 2005 ATM, but it should just be a matter of > a different output format for VC 6.0 I guess. > > You will still need things like bison and flex if you want to build off > cvs, of course - there is no builtin support for that in VC++. Ahh, Your right... However, I wish to offer construction of the DSP project of VC6. I continues after you. But, This is not fully considered carefully yet. http://inetrt.skcapi.co.jp/~saito/pgsql82dev/ Probably , Flex and bison do not need for the formal release souce of PostgreSQL. It will already be generated. Regards, Horoshi Saito ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
You mean they have a tool that parses GNU Makefiles and generate VC project files? Sure, that might be interesting. I've seen I think two others, and tried, but they fell over badly because the pg build system was too complicated. But I beleive I'm still allowed to loko at GPL stuff and get ideas as long as I don't copy the code :-) http://cvs.sourceforge.net/viewcvs.py/crystal/CS/mk/msvcgen/ I think it actually takes some sort of XML format or something...or just reads in files in directories. I'm not sure. Chris ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
> > Yes. There is a patch pending on -patches which fix almost all of > > these in HEAD. (There are a few tiny things related to perl and NLS > > that aren't included in it ATM. And I'm just assuming you're seeing > > the same problems as I was but I didn't base my work off > vcproject). > > I'm also working on a buildscript to convert the Makefiles > to visual > > c++ project files, but that's not quite done yet. The idea > with this > > work is to have the stuff as integrated as possible with > main CVS, so > > the maintenance will be as low as possible - unlike the vcproject > > project which has been focusing on keeping a separate build > environment maintained. > > > The CrystalSpace and PlaneShift projects I'm associated with > have automated MSVC generators. Want me to try to grab them > for you? They'd be GPL though. You mean they have a tool that parses GNU Makefiles and generate VC project files? Sure, that might be interesting. I've seen I think two others, and tried, but they fell over badly because the pg build system was too complicated. But I beleive I'm still allowed to loko at GPL stuff and get ideas as long as I don't copy the code :-) //MAgnus ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
Yes. There is a patch pending on -patches which fix almost all of these in HEAD. (There are a few tiny things related to perl and NLS that aren't included in it ATM. And I'm just assuming you're seeing the same problems as I was but I didn't base my work off vcproject). I'm also working on a buildscript to convert the Makefiles to visual c++ project files, but that's not quite done yet. The idea with this work is to have the stuff as integrated as possible with main CVS, so the maintenance will be as low as possible - unlike the vcproject project which has been focusing on keeping a separate build environment maintained. The CrystalSpace and PlaneShift projects I'm associated with have automated MSVC generators. Want me to try to grab them for you? They'd be GPL though. Chris ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
> Hi William(uniware), Chuck and Hackers, > > I have been interested in doing complete PGSQL > development in MSVC for a long time now. With reference to > one of Chuck's mails to > -hackers-win32 with the same subject, you said that you were > able to successfully compile PG 8.1 with some minor tweaks. > > Also, William has 'vcproject' hosted on pgfoundry, I > downloaded it, and tried compiling > vcproject\msvc\postgres\postgres.dsw on > VC++6.0. It failed miserably with over 1000 errors. I am sure there's > some tweaks needed here too!!! Yes. There is a patch pending on -patches which fix almost all of these in HEAD. (There are a few tiny things related to perl and NLS that aren't included in it ATM. And I'm just assuming you're seeing the same problems as I was but I didn't base my work off vcproject). I'm also working on a buildscript to convert the Makefiles to visual c++ project files, but that's not quite done yet. The idea with this work is to have the stuff as integrated as possible with main CVS, so the maintenance will be as low as possible - unlike the vcproject project which has been focusing on keeping a separate build environment maintained. The target is VC++ 2003 and 2005 ATM, but it should just be a matter of a different output format for VC 6.0 I guess. You will still need things like bison and flex if you want to build off cvs, of course - there is no builtin support for that in VC++. //Magnus ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
On 5/4/06, Gurjeet Singh <[EMAIL PROTECTED]> wrote: My main grudge is that if we are supporting almost all flovours of nixens and compilers (close to 34 according to official website), then why are we leaving Windows platform alone? This will bring in quite a lot more developers. Sorry, but this sounds pretty rude. If you have a grudge, do something about it and stop whining about our support for tons of *nix platforms instead of Windows. For the most part, the reason *nix platform support is more popular is because that's what most of us use on a daily basis. Keep in mind this is an open source project and a lot of us have more important things to work on than simple porting. It's easy to criticize, it's much harder to do the actual work. -- Jonah H. Harris, Database Internals Architect EnterpriseDB Corporation 732.331.1324 ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
Hi William(uniware), Chuck and Hackers, I have been interested in doing complete PGSQL development in MSVC for a long time now. With reference to one of Chuck's mails to -hackers-win32 with the same subject, you said that you were able to successfully compile PG 8.1 with some minor tweaks. Also, William has 'vcproject' hosted on pgfoundry, I downloaded it, and tried compiling vcproject\msvc\postgres\postgres.dsw on VC++6.0. It failed miserably with over 1000 errors. I am sure there's some tweaks needed here too!!! First of all, I would like to build entire server using just VC++ 6.0, with NO mingw toolchain (or try to minimize it's dependency as much as possible). If successful, I'd be glad to maintain it too for future releases, and add support for other components/tools too. My main grudge is that if we are supporting almost all flovours of nixens and compilers (close to 34 according to official website), then why are we leaving Windows platform alone? This will bring in quite a lot more developers. I am sure it's not going to be easy, but I am sure with this great community suppport, we sure can achieve it. Will and Chuck, please send the detailed steps of how to compile pgsql the way you did it. All, please send in quirks, watch-outs when trying to build using VC. Thanks in advance, Gurjeet. ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
Hi all, A remark linked to the preceding discussion: Even if I could find some interest in compiling postgresql with Microsoft’s C compiler, I understand the technical and organizational difficulties implied by such a feature. If I want to rebuild from sources postgresql, I have to go the developers way, here use the mingw toolchain. I think that writing _extensions_ for postgresql is another story. Even before version 8.0, the binary win32/cygwin distribution contained precompiled libraries for client side programming with VisualC. This allows you to write postgresql client code in VC _and_ without rebuilding postgresql yourself. Something similar (I think it has been discussed earlier but don’t remember the decisions) should exist for writing UDFs (stored procedures, the main reason for our use of postgresql compared to commercial databases where this feature is generally badly documented, to say the least). It would be nice if this was possible _without_ rebuilding postgresql from sources. This would imply that the binary native win32 distribution of postgresql contains (or that a supplementary package exists) the libraries (and headers) that are necessary. Having these libraries in mingw format would be nice, having them for VC++ would probably be very helpful to some of us. Jean-Marc Dave Page wrote: *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Chuck McDevitt *Sent:* 09 September 2005 19:38 *To:* [EMAIL PROTECTED] *Cc:* PostgreSQL-development *Subject:* [HACKERS] Build with Visual Studio & MSVC Just for fun, I went through PostgreSQL 8.1 and did a complete build using Microsoft’s C and the latest Visual Studio. With a few minor tweaks, everything compiled with no errors. My assumption is that because PostgreSQL is a UNIX/Linux-centric project (and gcc/gdb centric), this really isn’t of much interest to anyone. So other than this e-mail, I don’t plan to do anything with this except for my own amusement. If I’m wrong, and there is some real interest in supporting MSVC, let me know, and I’ll put some work into cleaning it up and making patches out of it, etc. Hi Chuck, We discussed this again on list only the other day in fact! Basically we're not particulalry interested in supporting VS prject files in place of gmake/autoconf, purely because they will undoubtedly cause maintenance headaches as the majority of our developers don't have Windows boxes, let alone a copy of Visual Studio. However, if you need something to keep yourself amused (unless I can persuade you to come help out with psqlODBC :-) ), we would be interested in patches that allow us to use Microsoft's compiler as an alternative to gcc. It's interesting to know it built fairly easily though... Regards, Dave. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
-Original Message- From: "Jean-Marc EBER"<[EMAIL PROTECTED]> Sent: 10/09/05 14:26:15 To: "Dave Page" Cc: "Chuck McDevitt"<[EMAIL PROTECTED]>, "[EMAIL PROTECTED]"<[EMAIL PROTECTED]>, "PostgreSQL-development" Subject: Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC >. This would imply that the > binary native win32 distribution of > postgresql contains (or that a > supplementary > package exists) the libraries (and headers) > that are necessary. Having > these > libraries in mingw format would be nice, > having them for VC++ would probably be > very helpful to some of us. Err, they (libpq and ecpglib) are included in both formats. Admittedley 8.0 missed some headers, but that is already fixed for 8.1. Regards, Dave -Unmodified Original Message- Hi all, A remark linked to the preceding discussion: Even if I could find some interest in compiling postgresql with Microsoft’s C compiler, I understand the technical and organizational difficulties implied by such a feature. If I want to rebuild from sources postgresql, I have to go the developers way, here use the mingw toolchain. I think that writing _extensions_ for postgresql is another story. Even before version 8.0, the binary win32/cygwin distribution contained precompiled libraries for client side programming with VisualC. This allows you to write postgresql client code in VC _and_ without rebuilding postgresql yourself. Something similar (I think it has been discussed earlier but don’t remember the decisions) should exist for writing UDFs (stored procedures, the main reason for our use of postgresql compared to commercial databases where this feature is generally badly documented, to say the least). It would be nice if this was possible _without_ rebuilding postgresql from sources. This would imply that the binary native win32 distribution of postgresql contains (or that a supplementary package exists) the libraries (and headers) that are necessary. Having these libraries in mingw format would be nice, having them for VC++ would probably be very helpful to some of us. Jean-Marc Dave Page wrote: > > > > *From:* [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] *On Behalf Of *Chuck > McDevitt > *Sent:* 09 September 2005 19:38 > *To:* [EMAIL PROTECTED] > *Cc:* PostgreSQL-development > *Subject:* [HACKERS] Build with Visual Studio & MSVC > > Just for fun, I went through PostgreSQL 8.1 and did a complete build > using Microsoft’s C and the latest Visual Studio. > > With a few minor tweaks, everything compiled with no errors. > > > > My assumption is that because PostgreSQL is a UNIX/Linux-centric > project (and gcc/gdb centric), this really isn’t of much interest to > anyone. > > So other than this e-mail, I don’t plan to do anything with this > except for my own amusement. > > > > If I’m wrong, and there is some real interest in supporting MSVC, > let me know, and I’ll put some work into cleaning it up and making > patches out of it, etc. > > > > Hi Chuck, > > > > We discussed this again on list only the other day in fact! Basically > we're not particulalry interested in supporting VS prject files in place > of gmake/autoconf, purely because they will undoubtedly cause > maintenance headaches as the majority of our developers don't have > Windows boxes, let alone a copy of Visual Studio. > > > > However, if you need something to keep yourself amused (unless I can > persuade you to come help out with psqlODBC :-) ), we would be > interested in patches that allow us to use Microsoft's compiler as an > alternative to gcc. > > > > It's interesting to know it built fairly easily though... > > > > Regards, Dave. > > > > > ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [pgsql-hackers-win32] [HACKERS] Build with Visual Studio & MSVC
Dave Page wrote: Just for fun, I went through PostgreSQL 8.1 and did a complete build using Microsoft’s C and the latest Visual Studio. With a few minor tweaks, everything compiled with no errors. My assumption is that because PostgreSQL is a UNIX/Linux-centric project (and gcc/gdb centric), this really isn’t of much interest to anyone. So other than this e-mail, I don’t plan to do anything with this except for my own amusement. If I’m wrong, and there is some real interest in supporting MSVC, let me know, and I’ll put some work into cleaning it up and making patches out of it, etc. Hi Chuck, We discussed this again on list only the other day in fact! Basically we're not particulalry interested in supporting VS prject files in place of gmake/autoconf, purely because they will undoubtedly cause maintenance headaches as the majority of our developers don't have Windows boxes, let alone a copy of Visual Studio. However, if you need something to keep yourself amused (unless I can persuade you to come help out with psqlODBC :-) ), we would be interested in patches that allow us to use Microsoft's compiler as an alternative to gcc. It's interesting to know it built fairly easily though... There is also a pgfoundry project for maintaining Visual Studio project files. see http://pgfoundry.org/projects/vcproject/ cheers andrew ---(end of broadcast)--- TIP 6: explain analyze is your friend