Re: [pgsql-hackers-win32] Build with Visual Studio & MSVC

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Cc: "William ZHANG" <uniware(at)zedware(dot)org>, "Magnus Hagander" <mha(at)sollentuna(dot)net>, "Chuck McDevitt" <cmcdevitt(at)greenplum(dot)com>, "Christopher Kings-Lynne" <chris(dot)kings-lynne(at)calorieking(dot)com>
Subject: Re: [pgsql-hackers-win32] Build with Visual Studio & MSVC
Date: 2006-05-07 12:03:42
Message-ID: 65937bea0605070503h2cee8860qb660e53e595970fb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 5/5/06, Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com> wrote:
> On 5/5/06, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> wrote:
> > If it is such a 'simple porting', may I ask why hasn't it been
> > attempted successfuly in so many years of PG's history?
>
> Because most of use don't use Windows... I thought I said that.

But a sizable number of pgsql's users (developers and others) do!!!

>
> > This 'simple porting' will allow and pull-in a lot more talented
> > devs than you and I.
>
> Sorry, but when it comes to Windows, the word talent is extremely relative.

So is the case with Nixens too! For eg., nixen developers are
known for great programming talent, but when it comes to being
user-friendly and look-and-feel their creations suck! I dont know the
case now, but till a year ago (before it went open), even after 20
years in production, SUN Solaris' GUI was a shame.

I favour Windows over nixens, not because I like Billy, or because
Unix is Evil, but because, Windows has snatched the monopoly of
computers from geeks and brought it to the common man. It has enabled
the not-so-rich to buy a computer and hop on to the tech bandwagon;
which ultimately means more-to-do (jobs) for geeks!

It might be buggy, it might be slow, they might have stolen the
idea from Mac... I don't care; I am using one right now to communicate
with the world.

Let other's make fun of it... I respect it; and will continue to,
for the rest of my life, even if I ever start using Linux in future.

>
> > Wish me luck in this effort
>
> Good luck!

Thank you Mr Jonah, I think your wish materialized and I have found a solution!

>
> --
> Jonah H. Harris, Database Internals Architect
> EnterpriseDB Corporation
> 732.331.1324
>

Hi Everybody,

Finally I have succeeded in being able to debug pgsql using a GUI
IDE, and no, it is not MSVC; its Eclipse.

As a Windows developer alI I was looking for was a
simple-yet-effective GUI, that is capable of showing me multiple
facets of the project very easily, and allow me to switch settings
easly (radio buttons, check-boxes) instead of messing around with
cryptic makefiles and config files.

CDT (Eclipse plugin for C/C++) comes very close to what I (a
WinDev) wanted to get started with PG/OSS. It has nice configurable
GUI, breakpoints, watches, keyboard shortcuts, etc etc, almost
everything that I wanted. Best of all, the shortcuts are configurable;
although I think the defaults are for emacs users, but I can change
them to work like in VC. I say 'almost' because it is a
work-in-progress, and there are a few (major) performance bottlenecks
(especially the symbol-indexer).

It works seamlessly with the msys (mingw) toolkit. It parses the
make-output and builds it's project; no need to scratch your head and
which files are to be imported in the project. Then, it uses the gdb
in the background, to let you attach to an already-running process,
and lets you debug it, just lilke in VC. It surely is a dream come
true.

I spent few hours installing/uninstalling the msys toolkit, before
I got it right with the help from mingw's wiki pages. There were other
gotchas too after the toolkit started working; creating user postgres
and running postmaster under it, --with-debug flag to ./configure for
gdb work, hacking config file to disable gcc optimizations, having to
run Eclipse as user 'postgres', and many more....

The best part about it is that there is no need for any new
project to be created and maintained (like vcproject), nor are any
changes/inclusions required to the existing source-tree. Simply
checkout a CVS module, and start working with it!!!! On top of that,
it uses the pg-recommended toolkit for Windows; so, you can even
package and distribute your builds (not recommended though)!

Finally I have got what I wanted. Now I think I (and any other
WinDev) can work/learn/contribute to the PG and other OSS! I will put
together a complete, step-by-step procedure of how to set it all up,
so that one can get up and running in no time at all.

I am not going to pursue the VC or VS integration anymore, and I
highly recommend everyone to use this solution if you want to develop
PG/OSS on windows.

A big thank you to all,
Gurjeet.

PS: Here's a bit long PS where I took the liberty to pour my heart out:

I know that I (re-)started this thread with a request for MSVC
support. I like VC++6 very much; convenience of shortcuts for
everything (I hardly use mouse when working on VC), and the nice
configurable layout. I like it more than it's successors, VS.Net
versions (mouse is almost indispensable), and thats why I was pushing
for VC rather than VS.

But I am giving up on the idea because the situation demands it.

Last year I had tried my hands on building version 7.4 of PG using
the cygwin, but was put-off by gdb's kludgy interface when it came to
debugging; so I gave up on it and got busy with other things. Although
I have worked on Solaris and Linux for 1 and 1/2 years, and used
gcc-gdb for everything, but I couldn't get to terms with the fact that
such a great talent-pool of Unix/Linux developers were not able to pu
together a nice GUI in so many years.

Probably the fact that, in the first two years as a developer I
used VC 6, also kept pushing me away from the command-line-debugging.
Without knowing it, I fell in love with VC and I realized it only when
I had to start using gdb; I longed to get back to VC. I think unix
also played a big role in my leaving one of the dream-jobs at one of
the dream-companies.

I did get away from gdb, but couldn't get back to VC. I got VS.Net
in exchange, which looks like a more good-looking but high-maintenance
step-sister of a plain, simple and beautiful-in-its-own-way VC.

I am spending my office hours with VS, but I still keep VC on my
home machine. You never forget your first love...

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-05-07 13:43:21 Re: [HACKERS] Question on win32 semaphore simulation
Previous Message Volkan YAZICI 2006-05-07 10:21:36 Re: intarray internals