[HACKERS] Fwd: [pgsql-hackers-win32] Build with Visual Studio MSVC
(missed the mailing list last time) Hi William, Thanks for the steps to succeed with vcproject. I am sure that there will be a few more tweaks involved (like setting VC's include path etc.). I will try to build it and consult/inform you if there is any deviation from the README. This will work as a starting point in understanding the requirements for what I intend to do. As Magnus mentioned earlier, I also wish to create the project that will not include the source files like 'vcproject' does; instead, it will contain just the dsp and the dsw (VC 6) files. Somebody interested in working with newer versions of VS can use it's feature to upgrade these formats to the respective version. Chris, the on initial cursory look, the msvcgen.sh file stored in the attic shows that your project uses some tool called jam to do the magic. I would really love to have this functionality in the new port we are developing. I will look deeper into it. Thomas, I love the idea of eclipse; any platform, any language, one IDE. I am downloading it right now. Can you please send in the steps that you perform to setup the environment, including mingw toolkit; I will try to grow on that. The idea of this effort is to have a GUI IDE, with a slew of features that MSVC offers: Memory window that allows you to edit memory inplace, call-stack window, watches, quick-expression evaluater with class/struct support, etc. etc. . If Eclipse can offer all these, then I dont think anyone would mind using it insead of MSVC. Jonah ...If you have a grudge, do something about it... ...a lot of us have more important things to work on than simple porting... /Jonah That's exactly the point Mr Jonah. I am trying to do something, and trying to leverage from the past experiences of others in the community. Looking at these handful of the responses, it seems that I am not alone in the quest for using a better IDE!!! And, no one is forced to respond to a mail to criticize, rather than help. 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? At least I dont see anybody documening any such procedure. This 'simple porting' will allow and pull-in a lot more talented devs than you and I. Wish me luck in this effort Mr Jonah. Gurjeet. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] [pgsql-hackers-win32] Build with Visual Studio MSVC
On 5/5/06, Jonah H. Harris [EMAIL PROTECTED] wrote: On 5/5/06, Gurjeet Singh [EMAIL PROTECTED] 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
[HACKERS] Demoting the width part of EXPLAIN
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Seeing as how width is so unused relative to the other items in the explain output, how about removing it from the normal explain output and requiring people to do an explain verbose if they really need to see it? It would have the virtue of shortening the explain output quite a bit. - -- Greg Sabino Mullane [EMAIL PROTECTED] PGP Key: 0x14964AC8 200605071158 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -BEGIN PGP SIGNATURE- iD8DBQFEXhoJvJuQZxSWSsgRAhwMAJ0fx50409xt/mbrPzlOQo9hHIFb/QCfeo6c cS5OUplpDEdcwQ1G547MD3I= =k2jb -END PGP SIGNATURE- ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[HACKERS] Compiling PL/Perl and Pl/Python on x86_64
Dear all, I cannot compile PL/Perl and PL/Python under x86_64. I'm running Intel Pentium D 3.2GHz Dual-core, Debian GNU/Linux AMD64 port, kernel 2.6.16.14, gcc 3.4.4, glibc 2.3.2, perl 5.8.8, Python 2.4.3. [EMAIL PROTECTED] ~ % uname -a Linux yuki 2.6.16.14-allmods #1 SMP Sat May 6 18:25:11 CST 2006 x86_64 GNU/Linux To complie PL/Perl: [EMAIL PROTECTED] /tmp/postgresql-8.1.3 % ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --enable-nls --with-docdir=/usr/sha re/doc/postgresql --with-perl --with-pam checking build system type... x86_64-unknown-linux-gnu ... config.status: linking ./src/makefiles/Makefile.linux to src/Makefile.port [EMAIL PROTECTED] /tmp/postgresql-8.1.3 % make make -C doc all ... tsort: -: input contains a loop: tsort: SPI.o tsort: plperl.o ranlib libplperl.a gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after- statement -Wendif-labels -fno-strict-aliasing -fpic -shared -Wl,-soname,libplper l.so.0 plperl.o spi_internal.o SPI.o -L/usr/local/lib -L/usr/lib/perl5/5.8.8/x8 6_64-linux-thread-multi-ld/CORE -L../../../src/port /usr/lib/perl5/5.8.8/x86_64- linux-thread-multi-ld/auto/DynaLoader/DynaLoader.a -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -Wl,-rpath,/usr/lib/perl5/5.8.8/x86_64-linux-thread-multi- ld/CORE -o libplperl.so.0.0 /usr/bin/ld: /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi-ld/auto/DynaLoader/D ynaLoader.a(DynaLoader.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi-ld/auto/DynaLoader/DynaLoader.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [libplperl.so.0.0] Error 1 make[3]: Leaving directory `/tmp/postgresql-8.1.3/src/pl/plperl' make[2]: *** [all] Error 1 make[2]: Leaving directory `/tmp/postgresql-8.1.3/src/pl' make[1]: *** [all] Error 2 make[1]: Leaving directory `/tmp/postgresql-8.1.3/src' make: *** [all] Error 2 [EMAIL PROTECTED] /tmp/postgresql-8.1.3 % The same goes for PL/Python: [EMAIL PROTECTED] /tmp/postgresql-8.1.3 % ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --enable-nls --with-docdir=/usr/share/doc/postgresql --with-python --with-pam checking build system type... x86_64-unknown-linux-gnu ... config.status: linking ./src/makefiles/Makefile.linux to src/Makefile.port [EMAIL PROTECTED] /tmp/postgresql-8.1.3 % make make -C doc all ... make[3]: Entering directory `/tmp/postgresql-8.1.3/src/pl/plpython' gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fpic -I. -I/usr/include/python2.4 -I../../../src/include -D_GNU_SOURCE -c -o plpython.o plpython.c ar crs libplpython.a `lorder plpython.o | tsort` ranlib libplpython.a gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fpic -shared -Wl,-soname,libplpython.so.0 plpython.o -L/usr/lib/python2.4/config -L../../../src/port -lpython2.4 -lpthread -ldl -lutil -lm -Wl,-rpath,/usr/lib/python2.4/config -o libplpython.so.0.0 /usr/bin/ld: /usr/lib/python2.4/config/libpython2.4.a(abstract.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /usr/lib/python2.4/config/libpython2.4.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [libplpython.so.0.0] Error 1 make[3]: Leaving directory `/tmp/postgresql-8.1.3/src/pl/plpython' make[2]: *** [all] Error 1 make[2]: Leaving directory `/tmp/postgresql-8.1.3/src/pl' make[1]: *** [all] Error 2 make[1]: Leaving directory `/tmp/postgresql-8.1.3/src' make: *** [all] Error 2 [EMAIL PROTECTED] /tmp/postgresql-8.1.3 % I have recompiled my perl many times, with: ./Configure -Dusethreads -Dcc=gcc -Duselongdouble -Doptimize=-g -O3 -Duse64bitint -Duse64bitall -Dprefix=/usr -Dd_dosuid -Dotherlibdirs=/usr/share/perl5 -Dinc_version_list=none -Acccdlflags=-fPIC -Duseshrplib=false [EMAIL PROTECTED] I've changed CFLAGS_SL to -fPIC in src/makefiles/Makefile.linux, and it still doesn't help. ... tsort: plperl.o ranlib libplperl.a gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fPIC -shared -Wl,-soname,libplperl.so.0 plperl.o spi_internal.o SPI.o -L/usr/local/lib -L/usr/lib/perl5/5.8.8/x86_64-linux-thread-multi-ld/CORE -L../../../src/port /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi-ld/au to/DynaLoader/DynaLoader.a -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -Wl,-rpath,/usr/lib/perl5/5.8.8/x86_64-linux-thread-multi-ld/CORE -o libplperl.so.0.0 /usr/bin/ld: /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi-ld/auto/Dyn aLoader/DynaLoader.a(DynaLoader.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi-ld/auto/DynaLoader/DynaLoader.a:
Re: [HACKERS] Demoting the width part of EXPLAIN
On Sun, May 07, 2006 at 04:03:45PM -, Greg Sabino Mullane wrote: Seeing as how width is so unused relative to the other items in the explain output, how about removing it from the normal explain output and requiring people to do an explain verbose if they really need to see it? It would have the virtue of shortening the explain output quite a bit. The problem with that is that it's essentially impossible to obtain information from explain verbose, and width is sometimes useful. Maybe change existing EXPLAIN VERBOSE to EXPLAIN DEBUG? -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] Demoting the width part of EXPLAIN
Greg Sabino Mullane [EMAIL PROTECTED] writes: Seeing as how width is so unused relative to the other items in the explain output, Huh? It's a critical part of the cost calculations for some things (eg, sort and hash operations). regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] Compiling PL/Perl and Pl/Python on x86_64
imacat [EMAIL PROTECTED] writes: I cannot compile PL/Perl and PL/Python under x86_64. Works fine for me (without any tinkering with flags) on Fedora Core 4. Maybe you don't have 64-bit versions of the perl and python libraries? regards, tom lane ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [HACKERS] Compiling PL/Perl and Pl/Python on x86_64
On Sun, 07 May 2006 13:09:48 -0400 Tom Lane [EMAIL PROTECTED] wrote: imacat [EMAIL PROTECTED] writes: I cannot compile PL/Perl and PL/Python under x86_64. Works fine for me (without any tinkering with flags) on Fedora Core 4. Maybe you don't have 64-bit versions of the perl and python libraries? Will... thank you for the hint. I have tested to build with the precompiled binary perl 5.8.4 that comes with the Debian distribution, and it works. It now seems that the problem resides on my perl compilation. I'll go for that direction. -- Best regards, imacat ^_*' [EMAIL PROTECTED] PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt Woman's Voice News: http://www.wov.idv.tw/ Tavern IMACAT's: http://www.imacat.idv.tw/ TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug pgpvnk5Hrg97u.pgp Description: PGP signature
Re: [HACKERS] Fwd: [pgsql-hackers-win32] Build with Visual Studio MSVC
Gurjeet Singh wrote: Thomas, I love the idea of eclipse; any platform, any language, one IDE. I am downloading it right now. Can you please send in the steps that you perform to setup the environment, including mingw toolkit; I will try to grow on that. My setup is pretty basic. I can't give you an exact step by step instruction since it's been a while since I last did it. I installed msys, mingw, Eclipse. and then, using the Eclipse update manager and the 'Callisto' site, I installed the C/C++ plugin. I also made sure that the PATH in effect for the Eclipse IDE contains entries for the %MSYS_HOME%\bin and %MINGW_HOME%\bin. That's it basically. The idea of this effort is to have a GUI IDE, with a slew of features that MSVC offers: Memory window that allows you to edit memory inplace, call-stack window, watches, quick-expression evaluater with class/struct support, etc. etc. . If Eclipse can offer all these, then I dont think anyone would mind using it insead of MSVC. Eclipse won't offer all of these. Not yet anyway. What you get is a fair C/C++ editor and parsers for your make output that will annotate your files with errors and warnings. There's said to be some debugging support too on top of gdb, but to be honest, I've never tried it on Windows. I do my C-debugging using gdb on Linux. My attempts to use gdb on Windows have been quite futile so far. Then again, I'm not using the latest MinGW version so perhaps there's still hope. All in all, Eclipse C/C++ has some way to go before it can match up with MSVC. My point was that you can do Windows development without MSVC and you can do it fairly well. If you are a Linux hacker, you might even prefer doing it that way. So as a platform, Windows is not by any means left alone. I really think that what you and others are trying to accomplish is very valuable. If not for me (since I'm mixing Java and C and work on multiple platforms) then certainly for many others. Personally, I'd rather see a Visual Studio port than one for VC++6.0. I wish you the best of luck. Regards, Thomas Hallgren ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org