Bug #95214 mysql-connector/c can't be built
Submitted: 1 May 2019 14:55 Modified: 5 Jul 2019 4:41
Reporter: Igor Korot Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / C Severity:S1 (Critical)
Version: OS:Solaris
Assigned to: CPU Architecture:x86
Tags: solaris studio

[1 May 2019 14:55] Igor Korot
Description:
mySQL-Connector/C version 6.1.9+ can not be built with the current cmake + Solaris Studio:

[code]
igor@solaris:~/dbhandlerSol/mysql$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
CMake Deprecation Warning at CMakeLists.txt:26 (CMAKE_POLICY):
  The OLD behavior for policy CMP0018 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

CMake Deprecation Warning at CMakeLists.txt:32 (CMAKE_POLICY):
  The OLD behavior for policy CMP0022 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

CMake Deprecation Warning at CMakeLists.txt:40 (CMAKE_POLICY):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- Running cmake version 3.9.1
-- The C compiler identification is SunPro 5.15.0
-- The CXX compiler identification is SunPro 5.15.0
-- Check for working C compiler: /opt/developerstudio12.6/bin/cc
-- Check for working C compiler: /opt/developerstudio12.6/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/developerstudio12.6/bin/CC
-- Check for working CXX compiler: /opt/developerstudio12.6/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Adding -m64
-- Looking for MHA_MAPSIZE_VA
-- Looking for MHA_MAPSIZE_VA - found
-- Performing Test HAVE_SOLARIS_ATOMIC
-- Performing Test HAVE_SOLARIS_ATOMIC - Success
-- Performing Test HAVE_SOLARIS_STYLE_GETHOST
-- Performing Test HAVE_SOLARIS_STYLE_GETHOST - Success
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void *
-- Check size of void * - done
-- SIZEOF_VOIDP 8
getconf: Invalid argument (LEVEL1_DCACHE_LINESIZE)
-- LibMySQL 6.1.9
-- Built from MySQL 5.7.16 sources
-- Packaging as: mysql-connector-c-6.1.10-solaris11-x86_64
-- Installing to: /usr/local/mysql
-- Performing Test HAVE_LLVM_LIBCPP
-- Performing Test HAVE_LLVM_LIBCPP - Failed
CMake Error at configure.cmake:229 (IF):
  if given arguments:

    "EQUAL" "14"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:451 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also "/export/home/igor/dbhandlerSol/mysql/CMakeFiles/CMakeOutput.log".
See also "/export/home/igor/dbhandlerSol/mysql/CMakeFiles/CMakeError.log".
igor@solaris:~/dbhandlerSol/mysql$ 
[/code]

I have an Oracle Solaris 11.4 on Intel Platform installed in VirtualBox.

Version 6.1.0 built successfully. No problems were found neither from configuring, nor from making. But the same failure happens in 6.1.9 and 6.1.10.

As a side note - it looks like it will try to build 64-bit version. Is it possible to make it to do 32-bit one?

How to repeat:
Oracle Solaris 11.4
Solaris Studio 12.6

Install latest cmake from the repository:

[code]
sudo pkg install cmake
[/code]

Download source code for mySQL-Connector/C version 6.1.9 for *nix.
Unpack it.
Execute the following from the connector/c root directory:

igor@solaris:~/dbhandlerSol/mysql$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
[4 Jul 2019 13:26] MySQL Verification Team
Hi Igor,
Thanks for the report. Verified as described
Bogdan
[5 Jul 2019 4:41] Igor Korot
Hi, Bogdan,
Are you going to fix the build?

Thank you.