[postgis-devel] WKT Raster: Why having to compile PostgreSQL & PostGIS first?

Mateusz Loskot mateusz at loskot.net
Sat Feb 28 09:27:15 PST 2009


Pierre Racine wrote:
> Hi all,
> 
> Here we go...
> 
> As a newcomer I really don't like the idea of having to compile
> PostgreSQL & PostGIS before starting working on WKT Raster (I start it
> today!).

There is no need to build PostgreSQL. You need to build PostGIS once.
There is a requirement to use pretty fresh version of PostgreSQL and
PostGIS.

> I already have a production PostgreSQL/PostGIS installed on my
> machine and I need it. I don't necessarily want to have to work with my
> own (maybe unstable) development version of PostgreSQL/PostGIS.

IMHO, it's not a good idea to do development on production installation,
especially if you need it.
Why not to install VirtualBox and develop WKTRaster in complete
separation from your production environment?

Also, sometimes there may be a need [1] to fix PostGIS for WKTRaster.

[1] http://code.google.com/p/postgis/issues/detail?id=120

> I would prefer having only to install PostgreSQL & PostGIS and compile WKT
> Raster over them. This would reduce the number of dependencies, make
> starting developement much faster and would not unstabilize my
> installation. Bonus: We would be sure that WKT Raster works fine on the
> released version of PostgreSQL & PostGIS.

For what I've observed so far, it's far easier to develop and debug
WKTRaster if built and linked statically against PostGIS stuff.
However, I may be wrong.

> So what would you think about archiving the necessary (good win32 &
> linux versions) prebuilt PostgreSQL & PostGIS libraries in the WKT
> Raster source tree instead of compiling all the world?

I don't like this idea and support Frank's and Paul's position.

> What are the pros and cons?

In general, good development practice says "no binaries in
repositories". It may seems a hassle to compile, but it's a *very* easy
& fast process on Unix. I understand it's not that easy on Windows,
but with help of pre-configured Visual Studio solution or well-written
makefiles ideally for cmake (http://cmake.org/) or less ideally for
NMAKE, the whole process should be rather simple too.
Finally, development state and configuration is for developers not
end-users, so it's not supposed to be simple and straightforward.
Meaning, I think there is no point, at the moment, to invest time to
make building process simpler, more user-friendly, etc. It's more
relevant to invest time in implementing features.

For me, on Unix, all the steps of building & testing & installing
WKTRaster are included in 2 commands (with help of tiny scripts -
http://mateusz.loskot.net/tmp/wktraster/):

$ cd ~/dev/wktraster/_svn
$ ./configure.sh
or
$ ./configure.sh debug
$ ./build.sh

The build.sh will run all available tests.

Now, if I want to spatially-and-rester'ally enable a database, I use a
makefile:

$ DBNAME=mytestdb make -f Makefile.rtpostgis


With all this above, I just wanted to show that it takes some time at
the beginning to configure dev environment, but later it's very easy and
fast to achieve all necessary tasks.

> I used to do this in another project with a lot of dependencies and it
> worked great.

Did you work in a team with number of developers using different
operating systems, different compilers, etc.?

> I'm working on Windows by the way.

Still, simplification of building process is possible.
It just needs a little of time to prepare makefiles or visual studio
solution.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the postgis-devel mailing list