Thread: Win32 port (native)
Okay, I have finally extracted out a patch that applied to a 7.2.1 tree get's me something that compiles and passes all regression tests on RedHat Linux and Windows 2000. To clearify upfront, even if the build process of this port uses a few cygwin tools, the final executables and libraries do not depend on cygwin. I need to write up the 42 steps how to build. For those who want to be prepared, you'll need a unix system to patch, a win32 environment with VC++ 6.0, Tcl, bison*, flex*, sed* and touch* (*=from cygwin). To run the regression tests, one would need an MKS toolkit as it crashes the cygwin bash ... we didn't bother with those minor issues. I will post 2 patches later (meaning, probably tomorrow or latest Sunday) to the patches list. One will be all the changes to existing files (about 11,500 lines context diff), one will be the new files added. As a PostgreSQL coreteam member I want to thank my employer, the PeerDirect Corporation, for contributing this work, which IMHO is an important step for PostgreSQL. What we need from here are some ideas how this port can be lifted up to the current 7.4 development tree. There are some TODO items scattered throughout the code. But, it compiles and works, so it's a good point to start from I think. Looking at the demand for a native Win32 port I would expect some people willing to take it from there. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
My idea was to go through the patch and break it out into the items it addresses:fork/execloop rename testhandle \r in COPYcopydir for cp -rbackslash testsrmdir not recursive for rm -rshared memorycould map to new address in exec childcompatibility definesfile path separatorsroot directoryrename atomicityspinlockchangesstr[r]chrtimeval for psqlDWORD in help.cinitdbetc. Once it is split out, each piece can be analyzed to make sure we are doing things the right way, then applied in parts. --------------------------------------------------------------------------- Jan Wieck wrote: > Okay, > > I have finally extracted out a patch that applied to a 7.2.1 tree get's > me something that compiles and passes all regression tests on RedHat > Linux and Windows 2000. > > To clearify upfront, even if the build process of this port uses a few > cygwin tools, the final executables and libraries do not depend on > cygwin. > > I need to write up the 42 steps how to build. For those who want to be > prepared, you'll need a unix system to patch, a win32 environment with > VC++ 6.0, Tcl, bison*, flex*, sed* and touch* (*=from cygwin). To run > the regression tests, one would need an MKS toolkit as it crashes the > cygwin bash ... we didn't bother with those minor issues. I will post 2 > patches later (meaning, probably tomorrow or latest Sunday) to the > patches list. One will be all the changes to existing files (about > 11,500 lines context diff), one will be the new files added. > > As a PostgreSQL coreteam member I want to thank my employer, the > PeerDirect Corporation, for contributing this work, which IMHO is an > important step for PostgreSQL. > > What we need from here are some ideas how this port can be lifted up to > the current 7.4 development tree. There are some TODO items scattered > throughout the code. But, it compiles and works, so it's a good point to > start from I think. Looking at the demand for a native Win32 port I > would expect some people willing to take it from there. > > > Jan > > -- > #======================================================================# > # It's easier to get forgiveness for being wrong than for being right. # > # Let's break this rule - forgive me. # > #================================================== JanWieck@Yahoo.com # > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
Jan Wieck wrote: > As a PostgreSQL coreteam member I want to thank my employer, the > PeerDirect Corporation, for contributing this work, which IMHO is an > important step for PostgreSQL. Yes, a very important step. A big thank you to PeerDirect. > What we need from here are some ideas how this port can be lifted up to > the current 7.4 development tree. There are some TODO items scattered > throughout the code. But, it compiles and works, so it's a good point to > start from I think. Looking at the demand for a native Win32 port I > would expect some people willing to take it from there. I have a request for this. Would it be possible to give priority to the client utilities? Apart from possibly helping in the rest of the port by facilitating dumping/restoring/testing, it would also enable those working on Windows clients with unix backends to work more easily now already. Personally, I am now using the psql that came with the beta4 of the Win32 port for everything. Even when connecting to a 7.3 server the problems (no schema support etc.) are far outweighted by the advantages of having a lightweight (just libpq.dll + psql.exe, no cygwin, no installation) client tool. But it would be nice if schema support etc. was available and with the exception of pg_dump I am personally not very concerned about using beta client utilities (while I would have reservations about using a beta database server). Jochem
Jochem van Dieten wrote: > everything. Even when connecting to a 7.3 server the problems (no schema > support etc.) are far outweighted by the advantages of having a > lightweight (just libpq.dll + psql.exe, no cygwin, no installation) > client tool. But it would be nice if schema support etc. was available You can already compile libpq and psql on win32; see: http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/install-win32.html Joe