[postgis-devel] Problems compiling GEOS 3.3.0 with MngW-64

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Apr 14 02:26:32 PDT 2011


On 13/04/11 23:18, Paragon Corporation wrote:

> We are setting up our MingW64 environments with the hopes of compiling both
> 32-bit and 64-bit PostGIS 2.0.

Good choice - the MingW64 guys have been really helpful to me in the past :)

> That said we have run into stumbling blocks with compiling GEOS 3.3.0 under
> this environment.  Right now we are just trying on a 32-bit, but will be
> dong the same on our 64-bit windows 7 soon.
>
> Attached is the log of our compile.

(cut)

> I've cc'd PostGIS dev in case Mark C. or anyone else hhas any thoughts:
>
> The instructions we are putting together are here:
>
> http://trac.osgeo.org/postgis/wiki/DevWikiWinMingW64

This is all great stuff. Some initial thoughts: firstly it's good to see 
that you're building recent versions of autotools - I've lost count of 
the number of times my Win32 builds failed because the provided 
autotools were old :(

Secondly, this bug below:

   //using ::swprintf;
   //using ::vswprintf;

Was fixed upstream in MingW so shouldn't be necessary anymore if you're 
running with recent headers.

There are a various errors showing up here, but I would suggest raising 
the following errors as a starting point on the mingw-w64-public list 
here: https://lists.sourceforge.net/lists/listinfo/mingw-w64-public.

1) warning: right shift count >= width of type

I suspect this is because sizeof(*foo) != sizeof(long) on Win64 but the 
MingW-w64 guys will be able to sort this out easily. I suspect it will 
need changes committed to GEOS in order to handle the different variable 
size.

2) From the GEOS build:

/bin/sh ../../libtool --tag=CC   --mode=link i686-w64-mingw32-gcc 
-pedantic -Wall -ansi -Wno-long-long  -ffloat-store -g -O2   -o 
libindex.la   bintree/libindexbintree.la chain/libindexchain.la 
intervalrtree/libintervalrtree.la quadtree/libindexquadtree.la 
strtree/libindexstrtree.la sweepline/libindexsweepline.la
libtool: link: (cd .libs/libindex.lax/libindexbintree.a && 
i686-w64-mingw32-ar x 
"/c/projects/geos/trunk/src/index/bintree/.libs/libindexbintree.a")
File not found - *.o
libtool: link: (cd .libs/libindex.lax/libindexchain.a && 
i686-w64-mingw32-ar x 
"/c/projects/geos/trunk/src/index/chain/.libs/libindexchain.a")
File not found - *.o
libtool: link: (cd .libs/libindex.lax/libintervalrtree.a && 
i686-w64-mingw32-ar x 
"/c/projects/geos/trunk/src/index/intervalrtree/.libs/libintervalrtree.a")
File not found - *.o
libtool: link: (cd .libs/libindex.lax/libindexquadtree.a && 
i686-w64-mingw32-ar x 
"/c/projects/geos/trunk/src/index/quadtree/.libs/libindexquadtree.a")
File not found - *.o
libtool: link: (cd .libs/libindex.lax/libindexstrtree.a && 
i686-w64-mingw32-ar x 
"/c/projects/geos/trunk/src/index/strtree/.libs/libindexstrtree.a")
File not found - *.o
libtool: link: (cd .libs/libindex.lax/libindexsweepline.a && 
i686-w64-mingw32-ar x 
"/c/projects/geos/trunk/src/index/sweepline/.libs/libindexsweepline.a")
File not found - *.o
libtool: link: i686-w64-mingw32-ar cru .libs/libindex.a
libtool: link: i686-w64-mingw32-ranlib .libs/libindex.a
libtool: link: rm -fr .libs/libindex.lax
libtool: link: ( cd ".libs" && rm -f "libindex.la" && cp -p 
"../libindex.la" "libindex.la" )

This is why the final link is failing because some files are being 
omitted from the libraries - could be one of either a Windows 
native/MingW path issue or a bug in autotools.

Once you've managed to get these issues resolved (which I don't think 
will take too long), I'm happy to take another look and see if I can 
help you out again.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-devel mailing list