Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#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:

  1. Some usages of standard library function does not qualify with namespace

sqrt(x) instead of std::sqrt(x) etc.

  1. Use of type_info (typeid()) without including <typeinfo>
  1. 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)

geos-solaris.diff (17.8 KB ) - added by magne 16 years ago.
Patch for allowing compilation with Sun Studio on Solaris (part 1)

Download all attachments as: .zip

Change History (7)

by magne, 16 years ago

Attachment: geos-solaris.diff added

Patch for allowing compilation with Sun Studio on Solaris (part 1)

in reply to:  description comment:1 by magne, 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 mloskot, 16 years ago

Keywords: solaris sparc std added
Owner: set to mloskot
Status: newassigned

comment:3 by mloskot, 16 years ago

Milestone: 3.0.1
Version: svn-trunk

comment:4 by mloskot, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in trunk (r2131). Magne, big thanks for the patch and sorry for the submission delay.

comment:5 by (none), 15 years ago

Milestone: 3.0.1

Milestone 3.0.1 deleted

comment:6 by pramsey, 15 years ago

Milestone: 3.1.0
Note: See TracTickets for help on using tickets.