View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013277CMakeCMakepublic2012-06-07 12:572012-11-05 14:33
ReporterDaniel Richard G. 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformSPARCOSSolarisOS Version8
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0013277: archive_endian.h needs "inline" fix for Sun WorkShop (SunPro) compiler
DescriptionBuilding CMake's git nightly on a Solaris 8 system with the SunPro compiler yields

[ 38%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_rpm.c.o
".../CMake/Utilities/cmlibarchive/libarchive/archive_endian.h.", line 59: undefined or not a type: inline
".../CMake/Utilities/cmlibarchive/libarchive/archive_endian.h", line 61: parameter not in identifier list: archive_be16dec
".../CMake/Utilities/cmlibarchive/libarchive/archive_endian.h", line 61: syntax error before or at: {
[...]

(See http://open.cdash.org/viewBuildError.php?buildid=2340544 [^] for more)

This compiler doesn't grok "inline"---at least not version 5.1.

A proposed patch (against git nightly) that addresses this is attached. The macro magic is gleaned from http://lists.x.org/archives/xorg-devel/2009-April/000580.html [^] .
TagsNo tags attached.
Attached Filespatch file icon cmake-sunpro-inline-fix.patch [^] (857 bytes) 2012-06-07 12:57 [Show Content]

 Relationships

  Notes
(0029626)
Brad King (manager)
2012-06-07 13:03

For SunPro >= 5.9 why "define inline __inline__" instead of just leaving it undefined?
(0029627)
Daniel Richard G. (reporter)
2012-06-07 13:40

Hmm. I thought that was so things would continue to work in strict-ANSI mode (as with g++), but I just tried the 5.10 compiler using -Xc, and it accepts plain old "inline" just as well.

I guess leaving it undefined should be fine, then :-]
(0029628)
Brad King (manager)
2012-06-07 13:47

How about this?

diff --git a/Utilities/cmlibarchive/libarchive/archive_endian.h b/Utilities/cmlibarchive/libarchive/archive_endian.h

index c3c78b3..bbf58fd 100644
--- a/Utilities/cmlibarchive/libarchive/archive_endian.h
+++ b/Utilities/cmlibarchive/libarchive/archive_endian.h
@@ -45,11 +45,14 @@
  * - SGI MIPSpro
  * - Microsoft Visual C++ 6.0 (supposedly newer versions too)
  * - IBM VisualAge 6 (XL v6)
+ * - Sun WorkShop C (SunPro) before 5.9
  */
 #if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__)
 #define        inline
 #elif defined(__IBMC__) && __IBMC__ < 700
 #define        inline
+#elif defined(__SUNPRO_C) && __SUNPRO_C < 0x590
+#define inline
 #elif defined(_MSC_VER) || defined(__osf__)
 #define inline __inline
 #endif
(0029634)
Daniel Richard G. (reporter)
2012-06-07 15:00

Yep, that gets cmlibarchive built.
(0029639)
Brad King (manager)
2012-06-07 15:25

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54ffb5b4 [^]
(0031446)
David Cole (manager)
2012-11-05 14:33

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-06-07 12:57 Daniel Richard G. New Issue
2012-06-07 12:57 Daniel Richard G. File Added: cmake-sunpro-inline-fix.patch
2012-06-07 13:03 Brad King Note Added: 0029626
2012-06-07 13:40 Daniel Richard G. Note Added: 0029627
2012-06-07 13:47 Brad King Note Added: 0029628
2012-06-07 15:00 Daniel Richard G. Note Added: 0029634
2012-06-07 15:25 Brad King Note Added: 0029639
2012-06-07 15:25 Brad King Status new => resolved
2012-06-07 15:25 Brad King Resolution open => fixed
2012-06-07 15:25 Brad King Fixed in Version => CMake 2.8.9
2012-06-07 15:25 Brad King Target Version => CMake 2.8.9
2012-11-05 14:33 David Cole Note Added: 0031446
2012-11-05 14:33 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team