Ticket #189 (closed defect: fixed)

Opened 1 year ago

Last modified 4 months ago

Build problems with Sun Studio compiler (on Solaris x86 & Sparc)

Reported by: magne Assigned to: 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.

Attachments

geos-solaris.diff (17.8 kB) - added by magne on 06/26/08 07:35:39.
Patch for allowing compilation with Sun Studio on Solaris (part 1)

Change History

06/26/08 07:35:39 changed by magne

  • attachment geos-solaris.diff added.

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

(in reply to: ↑ description ) 06/26/08 07:36:14 changed by magne

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.

07/15/08 11:03:30 changed by mloskot

  • keywords set to solaris sparc std.
  • owner set to mloskot.
  • status changed from new to assigned.

07/15/08 11:04:58 changed by mloskot

  • version set to svn-trunk.
  • milestone set to 3.0.1.

07/15/08 18:05:05 changed by mloskot

  • status changed from assigned to closed.
  • resolution set to fixed.

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

01/12/09 20:41:43 changed by

  • milestone deleted.

Milestone 3.0.1 deleted

03/18/09 11:57:13 changed by pramsey

  • milestone set to 3.1.0.