Opened 13 years ago

Closed 12 years ago

#447 closed defect (fixed)

Can't compile GEOS 3.3 under mingw-64

Reported by: robe Owned by: pramsey
Priority: minor Milestone: 3.3.3
Component: Build/Install Version: 3.3.2
Severity: Unassigned Keywords:
Cc:

Description

We've been trying to get GEOS 3.3.0 to compile udner my mingw-64 on a Windows 2008 64-bit box. I get the same issue using the mingw-64/32 bit version and with several different builds as well.

I have been successful compiling PostgreSQL under mingw-64, but to I know Andrew Dunstan went thru a great deal of pain making this possible. I fear the road to glory may be paved with rocks.

Of course this is all so I can get PostGIS to run under 64-bit PostgreSQL. BTW now that geos 3.3.0 is now released, don't you think you should add it to the version list.

I have attached our build log and configure log. for reference this is the mingw64 build we are using -- http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/sezero_20110510/

mingw-w64-bin_x86_64-mingw_20110510_sezero.zip

Attachments (2)

configure64.log (12.6 KB ) - added by robe 13 years ago.
buildx64.log.zip (20.9 KB ) - added by robe 13 years ago.

Download all attachments as: .zip

Change History (20)

by robe, 13 years ago

Attachment: configure64.log added

comment:1 by strk, 13 years ago

Version: svn-trunk3.3.0

by robe, 13 years ago

Attachment: buildx64.log.zip added

comment:2 by robe, 13 years ago

I should add. I tried CMake, but no success there. Do I need a 64-bit version of Cmake. All the windows binaries of Cmake I could find are 32-bit. It got halted at couldn't find gcc compile CL . I'll have to revisit that. I treid poitning it at my mingw-64..g++.exe one, but it didn't seem to enjoy that too much.

comment:3 by mloskot, 13 years ago

There is no need for CMake 64-bit to build software using 64-bit toolchain. CMake is just an executor, it can run nearly any compiler it can find in the system.

comment:4 by robe, 13 years ago

so it's just the path I have wrong. Which is what I suspected but couldn't find any CMake instructions for MingW64 that I could follow.

comment:5 by strk, 13 years ago

Milestone: 3.3.1

comment:6 by strk, 13 years ago

Robe: this is last item to close for 3.3.1 -- anything to do here ?

comment:7 by robe, 13 years ago

strk -- it still doesn't work. I guess you can push it to 3.3.2 once you create that milestone since it probably won't be fixed anytime soon. My next attempt is to try to building using cmake but having issue compiling cmake under mingw64 which I have to workout.

comment:8 by strk, 13 years ago

Milestone: 3.3.13.3.2

comment:9 by strk, 12 years ago

Component: DefaultBuild/Install
Owner: changed from geos-devel@… to pramsey
Version: 3.3.03.3.1

comment:10 by strk, 12 years ago

Robe: Befana is willing to put GEOS into your sock, does it need to come with this issue fixed ?

comment:11 by robe, 12 years ago

strk -- my issue is not with 32-bit / 3.3, its with mingw-64 and 3.3, so Befana does nothing for me if it's fixed for 32-bit cause it works already.

However -- I think I have another ticket that I can't compile mingw 32-bit with trunk (3.4). I'll double check to make sure I do and if not, I'll reconfirm that trunk is still an issue and put in a ticket for that.

comment:12 by strk, 12 years ago

can we postpone this for 3.3.3 then ?

comment:13 by robe, 12 years ago

Milestone: 3.3.23.3.3

yes can wait.

comment:14 by robe, 12 years ago

Priority: majorminor

comment:15 by robe, 12 years ago

Aha - someone who successefully compiled geos under mingw-64. He hacked the platform.h file. I'm trying his hack on the 3.3 svn branch to see if it fixes my issues too.

http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw64_how_to.html#libgeos

comment:16 by robe, 12 years ago

Version: 3.3.13.3.2

Sadly this did not fix my issue. Still gets all the way to the linker phase and craps out when it does this:

libtool: link: x86_64-w64-mingw32-g++ -shared -nostdlib c:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.7/../../../../x86_64-w64-mingw32/lib/dllcrt2.o c:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.7/../../../../x86_64-w64-mingw32/lib/crtbegin.o  .libs/inlines.o  -Wl,--whole-archive algorithm/.libs/libalgorithm.a geom/.libs/libgeom.a geomgraph/.libs/libgeomgraph.a index/.libs/libindex.a io/.libs/libio.a linearref/.libs/liblinearref.a noding/.libs/libnoding.a operation/.libs/liboperation.a planargraph/.libs/libplanargraph.a precision/.libs/libprecision.a simplify/.libs/libsimplify.a util/.libs/libutil.a -Wl,--no-whole-archive  -Lc:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.7 -Lc:/mingw/mingw64/bin/../lib/gcc -Lc:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.7/../../../../lib64 -Lc:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.7/../../../../x86_64-w64-mingw32/lib -Lc:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.7/../../.. -Lc:/mingw/mingw64/bin/../../mingw64/mingw/lib -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt c:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.4.7/../../../../x86_64-w64-mingw32/lib/crtend.o  -O2   -o .libs/libgeos-3-3-3dev.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgeos.dll.a

with undefined references like

c:\projects\geos\branches\3.3\src\algorithm/MCPointInRing.cpp:76: undefined reference to `geos::index::bintree::Bintree::Bintree()'

comment:17 by robe, 12 years ago

Okay I finally got this working. Issue seems to be that the linker was picking up 32-bit dlls from syswow64 instead of from windows/system32. So I did similar hack as described in http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw64_how_to.html#env

All looks much better. Make check passes except for this error:

---> group: capi::GEOSisValidDetail, test: test<3>
     problem: assertion failed
     failed assertion: "Values are not equal: expected 'POINT (NAN -5)' actual '
POINT (-1.#IND -5)'"

Not sure if its something I need to worry about or not.

comment:18 by robe, 12 years ago

Resolution: fixed
Status: newclosed

closing this out and creating another ticker

Note: See TracTickets for help on using tickets.