[postgis-devel] Win32 Adventures

Paul Ramsey pramsey at cleverelephant.ca
Sat Feb 25 16:29:04 PST 2012


Bad news update, GDAL per se does not fail, but the GDAL PNG does,
this is the crasher...

SELECT CASE WHEN
length(ST_AsGDALRaster(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10,
2, 2, 0, 0), 1, '8BSI',123, NULL),'PNG')) > 0 THEN 1 ELSE 0 END;

Next thing for me to check is if the problem is a clash between the
GTK+ png lib and the one bundled w/ gdal. Unfortunately the stack
trace is useless...

(gdb) bt
#0  0x7855ae7a in memcpy ()
   from C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161
_x-ww_31a54e43\msvcr90.dll
#1  0x038ab768 in gdal!?IReadBlock at MEMRasterBand@@UAE?AW4CPLErr@@HHPAX at Z ()
   from c:\pgsql\bin\gdal.dll
Backtrace stopped: Not enough registers or memory available to unwind further
(gdb) quit



On Sat, Feb 25, 2012 at 3:04 PM, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
> Good news and bad news update.
> Good news: I have removed the final regression from the postgis
> module, it fully builds and regresses cleanly.
> Bad news: the raster module crashes in rt_asgdalraster, which doesn't
> speak well to my handling of the build/link of GDAL. Will have to try
> some other approaches.
>
> P.
>
> On Sat, Feb 25, 2012 at 1:36 PM, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
>> Hey all, here's a little summary of my Adventures in Windows.
>>
>> I decided to try and re-work the build process using the new
>> mingw-get-inst package and the mingw-get utility. This allowed me to
>> get the "latest and greatest" packages with a minimum of fussing.  All
>> the build packages came down with these commands:
>>
>> mingw-get install msys-bison msys-flex
>> mingw-get install msys-unzip msys-zip
>> mingw-get install msys-autoconf
>> mingw-get install msys-automake
>> mingw-get install msys-libtool
>> mingw-get install msys-wget
>> mingw-get install mingw32-gettext
>> mingw-get install mingw32-libiconv
>> mingw-get install mingw32-zlib mingw32-libz
>> mingw-get install mingw-utils
>>
>> SVN is curiously not part of mingw-get, I guess it has too many
>> dependencies, so I used the commandline build from sliksvn.
>>
>> In the end though, the only things I built with mingw were PostgreSQL,
>> CUnit, and JSON-C.
>>
>> GDAL, GEOS, and Proj4 I built with Visual Studio Express 2008.
>>
>> GTK+ and LibXML2 I downloaded prebuilt binaries.
>>
>> I ended up assembling everything in a big /c/pgsql directory, and then
>> having to hand-craft config scripts for geos-config, xml2-config and
>> gdal-config, since the MSVC builds don't create those, but the PostGIS
>> build requires them.
>>
>> Net result, I have a PostGIS that builds and regresses the postgis
>> component with the exception of *one* test (ticket #11, which I am
>> pretty sure traces back to the -ffloat-store flag that is usually
>> applied to one component of GEOS, but I betcha is not applied in the
>> MSVC CMake build). You'll have seen a few commits I had to do to get
>> run_test working and a fix to the loader. I still have a small custom
>> hack in my regress/Makefile.in because 'pwd -W' doesn't work on my
>> mingw the way folks seem to thing it should.
>>
>> I feel like my big bundle of binaries could be useful for getting
>> folks up and running with working development environments, and might
>> create a set of instructions based around downloading an SDK package.
>>
>> Anyhow, wanted to share the good news...
>>
>> P.



More information about the postgis-devel mailing list