[geos-devel] [GEOS] #630: CMake with mingw fail

GEOS geos-trac at osgeo.org
Tue Jun 4 21:47:26 PDT 2013


#630: CMake with mingw fail
------------------------+---------------------------------------------------
 Reporter:  robe        |       Owner:  geos-devel@…              
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:                            
Component:  Default     |     Version:  svn-trunk                 
 Severity:  Unassigned  |    Keywords:                            
------------------------+---------------------------------------------------

Comment(by robe):

 I made progress on this by looking at notes from http://osgeo-
 org.1560.x6.nabble.com/Compiling-geos-with-mingw64-td5034567.html

 I was able to compile with the below and some modifications to files which
 I'll clean up and provide a patch for once I'm done

 {{{
 cmake -G"MSYS Makefiles"
 -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}
 -DHAVE_STD_ISNAN=1 -DHAVE_LONG_LONG_INT_64=1 -DGEOS_ENABLE_INLINE=ON
 -DGEOS_ENABLE_TESTS=ON

 make
 make install
 make test
 make check
 }}}

 However I don't think -DGEOS_ENABLE_INLINE=ON is working.  It says it is
 in the output, but I get linker failures unless I explicitly change

 geos/inline.h


 {{{
 # define INLINE inline
 }}}

 as David did.

 I also think you might be missing an important include.  I had to change
 some conditions in profiler.h to


 {{{
 #if defined(__MINGW32__) && !defined( __MINGW64__)
 }}}


 when I really want to do:


 {{{
  #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
 }}}


 to properly handle building both win32 and win64 binaries with mingw64
 chain

 as detailed here:

 http://sourceforge.net/mailarchive/message.php?msg_id=28305973

 So after that long exercise I am here:


 {{{
 Running tests...
 Test project C:/ming64/projects/geos/branches/geos-3.4/build/mingw
     Start 1: geos_unit
 1/4 Test #1: geos_unit ........................   Passed    0.24 sec
     Start 2: xmltester
 2/4 Test #2: xmltester ........................   Passed    6.53 sec
     Start 3: bug234
 3/4 Test #3: bug234 ...........................   Passed    0.01 sec
     Start 4: TestSweepLineSpeed
 4/4 Test #4: TestSweepLineSpeed ...............   Passed    1.70 sec

 100% tests passed, 0 tests failed out of 4

 Total Test time (real) =   8.51 sec
 Scanning dependencies of target check
 make[3]: ctest: Command not found
 make[3]: *** [CMakeFiles/check] Error 127
 make[2]: *** [CMakeFiles/check.dir/all] Error 2
 make[1]: *** [CMakeFiles/check.dir/rule] Error 2
 make: *** [check] Error 2
 }}}

 which is good progress I guess

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/630#comment:2>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list