Ticket #189 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

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.

Attachments

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

Change History

Changed 5 years ago by magne

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

in reply to: ↑ description   Changed 5 years ago 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.

  Changed 5 years ago by mloskot

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

  Changed 5 years ago by mloskot

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

  Changed 5 years ago 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.

  Changed 4 years ago by anonymous

  • milestone 3.0.1 deleted

Milestone 3.0.1 deleted

  Changed 4 years ago by pramsey

  • milestone set to 3.1.0
Note: See TracTickets for help on using tickets.