Bug #86914 Solaris does not support gcc
Submitted: 3 Jul 2017 20:56 Modified: 4 Jul 2017 6:08
Reporter: Sveta Smirnova (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.6.35+ OS:Any
Assigned to: CPU Architecture:Any

[3 Jul 2017 20:56] Sveta Smirnova
Description:
Originally reported at https://bugs.launchpad.net/percona-server/+bug/1686781

The code introduced since 5.6.33 explicitly forbids building with GCC on SunOS :

https://github.com/mysql/mysql-server/commit/a99019130ea198574a774921c660ab725130d4e8#diff...

Commit message for this patch says, however:

----<q>----
configuring unit tests fails, we do not recognize developer studio 12.5
build with -DCMAKE_CXX_FLAGS='-std=c++03 -m64' -DCMAKE_C_FLAGS='-m64'

Fix: backport compiler version check in cmake/os/SunOS.cmake from 5.7
----</q>----

But version 5.7 supports GCC:

# We require at least GCC 4.4 or SunStudio 12u2 (CC 5.11)
IF(NOT FORCE_UNSUPPORTED_COMPILER)
  IF(CMAKE_COMPILER_IS_GNUCC)
    EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
                    OUTPUT_VARIABLE GCC_VERSION)
    IF(GCC_VERSION VERSION_LESS 4.4)
      MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!")
    ENDIF()
ELSEIF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
...

See https://github.com/mysql/mysql-server/blob/5.7/cmake/os/SunOS.cmake

How to repeat:
Compare https://github.com/mysql/mysql-server/blob/5.6/cmake/os/SunOS.cmake and https://github.com/mysql/mysql-server/blob/5.7/cmake/os/SunOS.cmake

Suggested fix:
Backport full patch, not only SunPro-related part.
[4 Jul 2017 6:08] Umesh Shastry
Hello Sveta,

Thank you for the report and feedback.
Verifying for backport 5.7 fix into 5.6.

Thanks,
Umesh