Ticket #189 (closed defect: fixed)
Build problems with Sun Studio compiler (on Solaris x86 & Sparc)
| Reported by: | magne | Owned by: | mloskot |
|---|---|---|---|
| Priority: | major | Milestone: | 3.1.0 |
| Component: | Build/Install | Version: | svn-trunk |
| Severity: | Significant | Keywords: | solaris sparc std |
| Cc: |
Description
geos does not build when using the Sun Studio compiler.
The problems are basically:
1. Some usages of standard library function does not qualify with namespace
sqrt(x) instead of std::sqrt(x) etc.
2. Use of type_info (typeid()) without including <typeinfo>
3. Problems detecting the correct 64bit integer type.
Example output:
/bin/bash ../../../libtool --tag=CXX --mode=compile CC -DHAVE_CONFIG_H -I. -I../../../source/headers -I../../../source/headers/geos -I../../../source/headers -librar y=stlport4 -DGEOS_INLINE -c -o IndexedPointInAreaLocator?.lo IndexedPointInAreaLocator?.cpp mkdir .libs
CC -DHAVE_CONFIG_H -I. -I../../../source/headers -I../../../source/headers/geos -I../../../source/headers -library=stlport4 -DGEOS_INLINE -c IndexedPointInAreaLocator?.cpp -KPIC -DPIC -o .libs/IndexedPointInAreaLocator.o
"../../../source/headers/geos/platform.h", line 59: Warning: #warning "Could not find 64bit integer definition!". "../../../source/headers/geos/geom/Coordinate.inl", line 122: Error: The function "sqrt" must have a prototype. "../../../source/headers/geos/geom/Coordinate.inl", line 140: Warning: Shift count is too large. "../../../source/headers/geos/geom/LineSegment.inl", line 143: Error: The function "atan2" must have a prototype. "IndexedPointInAreaLocator?.cpp", line 98: Error: "type_info" not defined (Missing #include "typeinfo.h"?). "IndexedPointInAreaLocator?.cpp", line 99: Error: "type_info" not defined (Missing #include "typeinfo.h"?). "IndexedPointInAreaLocator?.cpp", line 99: Error: "type_info" not defined (Missing #include "typeinfo.h"?). "IndexedPointInAreaLocator?.cpp", line 99: Error: "type_info" not defined (Missing #include "typeinfo.h"?). 6 Error(s) and 2 Warning(s) detected.

