Opened 15 years ago

Last modified 14 years ago

#273 closed defect

trunk build failed with MinGW — at Initial Version

Reported by: sanak Owned by: pramsey
Priority: major Milestone: 3.2.0
Component: Build/Install Version: main
Severity: Unassigned Keywords: mingw
Cc: ragi@…

Description

I had tried to build trunk source with MinGW at this weekend, and some error occurred.

  1. 'finite' function is not defined in MinGW

/ error message /
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../source/headers -I../../../source/headers/geos -I../../../source/headers -g -O2 -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -MT IndexedPointInAreaLocator.lo -MD -MP -MF .deps/IndexedPointInAreaLocator.Tpo -c IndexedPointInAreaLocator.cpp -DDLL_EXPORT -DPIC -o .libs/IndexedPointInAreaLocator.o In file included from ../../../source/headers/geos/geom/Geometry.h:26,

from IndexedPointInAreaLocator.cpp:18:

../../../source/headers/geos/platform.h: In function `bool isFinite(double)': ../../../source/headers/geos/platform.h:64: error: `finite' was not declared in this scope ../../../source/headers/geos/platform.h:64: warning: unused variable 'finite' make[4]: * [IndexedPointInAreaLocator.lo] Error 1
/

I had modified source/headers/geos/platform.h.in(see attached patch), but I don't know that my modification is the valid way, so please check my patch carefully. The following topic may be relate to this problem. http://lists.osgeo.org/pipermail/geos-devel/2006-June/002350.html

2.dllimport error

/ error message /
HCoordinate.cpp:233: warning: non-inline function 'void geos::algorithm::HCoordinate::getCoordinate(geos::geom::Coordinate&) const' is defined after prior declaration as dllimport: attribute ignored HCoordinate.cpp:233: warning: 'void geos::algorithm::HCoordinate::getCoordinate(geos::geom::Coordinate&) const' defined locally after being referenced with dllimport linkage HCoordinate.cpp: In constructor `geos::algorithm::HCoordinate::HCoordinate(const geos::geom::Coordinate&)': HCoordinate.cpp:130: internal compiler error: in rest_of_handle_final, at toplev.c:2067[[BR]]

I had modified source/headers/geos/export.h(see attached patch). I think that if no preprocessor definition (like GEOS_DLL_XXX), GEOS_DLL should be defined as null word, but I hope someone check this.

[NOTICE]
I had set MinGW environment referring to the following site, http://trac.osgeo.org/postgis/wiki/UsersWikiWinCompile and, modify some files.

*MinGW(g++-3.4.5)]
\MinGW\include\c++\3.4.5\cwchar
...comment out import (v)swprintf.

  using ::putwchar;
  //using ::swprintf; // delete
  using ::swscanf;
  using ::ungetwc;
  using ::vfwprintf;
#if _GLIBCXX_HAVE_VFWSCANF
  using ::vfwscanf;
#endif
  //using ::vswprintf; // delete
#if _GLIBCXX_HAVE_VSWSCANF
  using ::vswscanf;
#endif

*libtool(2.2.4)
\libltdl\config\ltmain.sh
... add include <process.h>

#ifdef _MSC_VER
# include <direct.h>
# include <process.h>
# include <io.h>
# define setmode _setmode
#else
# include <unistd.h>
# include <stdint.h>
# ifdef __CYGWIN__
#  include <io.h>
# endif
/* <-- add for _P_WAIT */
# ifdef __MINGW32__
#  include <process.h>
# endif
/* --> */
#endif

Regards,

Sanak.

Change History (1)

by sanak, 15 years ago

Attachment: fix-mingw.patch added

TortoiseSVN(Japanese)

Note: See TracTickets for help on using tickets.