Percona Server 5.6.35 doesn't build with gcc on OpenIndiana
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Triaged
|
Low
|
Unassigned | |||
5.7 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
The code introduced since 5.6.33 explicitly forbids building with GCC on SunOS :
--- percona-
+++ percona-
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,6 +17,33 @@
INCLUDE(
INCLUDE(
+# We require SunStudio 12u2 (CC 5.11)
+IF(NOT FORCE_UNSUPPORT
+ IF(CMAKE_
+ # CC -V yields
+ # CC: Studio 12.5 Sun C++ 5.14 SunOS_sparc Dodona 2016/04/04
+ # CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11
+ # CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
+ EXECUTE_PROCESS(
+ COMMAND ${CMAKE_
+ OUTPUT_VARIABLE stdout
+ ERROR_VARIABLE stderr
+ RESULT_VARIABLE result
+ )
+ STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr})
+ IF (NOT CMAKE_MATCH_1 OR CMAKE_MATCH_1 STREQUAL "")
+ STRING(REGEX MATCH "CC: Studio 12\\.5 Sun C\\+\\+ 5\\.([0-9]+)"
+ VERSION_STRING ${stderr})
+ ENDIF()
+ SET(CC_
+ IF(${CC_
+ MESSAGE(FATAL_ERROR "SunStudio 12u2 or newer is required!")
+ ENDIF()
+ ELSE()
+ MESSAGE(FATAL_ERROR "Unsupported compiler!")
+ ENDIF()
+ENDIF()
+
# Enable 64 bit file offsets
SET(_FILE_
@@ -29,7 +56,7 @@
# CMake defined -lthread as thread flag. This crashes in dlopen
# when trying to load plugins workaround with -lpthread
-SET(CMAKE_
+SET(CMAKE_
# Solaris specific large page support
CHECK_
diff -ur percona-
We use GCC as primary compiler at OpenIndiana, please, this check should be relaxed.
Is CMake option -DFORCE_ UNSUPPORTED_ COMPILER= ON a viable workaround?