#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: | main |
Severity: | Significant | Keywords: | solaris sparc std |
Cc: |
Description
geos does not build when using the Sun Studio compiler.
The problems are basically:
- Some usages of standard library function does not qualify with namespace
sqrt(x) instead of std::sqrt(x) etc.
- Use of type_info (typeid()) without including <typeinfo>
- 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.
Attachments (1)
Change History (7)
by , 16 years ago
Attachment: | geos-solaris.diff added |
---|
comment:1 by , 16 years ago
Replying to magne:
geos does not build when using the Sun Studio compiler.
I'm creating two patches for this one. The first contains "cleanup" (i.e adds namespace specifiers, and adding #include <typeinfo> where missing) and should be problem-free, I think.
The other has some (minor) changes to autogen.sh and configure.in, and I will create a separate trac entry for it.
comment:2 by , 16 years ago
Keywords: | solaris sparc std added |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:3 by , 16 years ago
Milestone: | → 3.0.1 |
---|---|
Version: | → svn-trunk |
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in trunk (r2131). Magne, big thanks for the patch and sorry for the submission delay.
comment:6 by , 15 years ago
Milestone: | → 3.1.0 |
---|
Patch for allowing compilation with Sun Studio on Solaris (part 1)