Description:
I've noted the following problem while building MySQL 8.0.11 from current GitHub source on both Fedora 27 and Ubuntu 14.04. When I use my usual cmake command line:
openxs@ao756:~/git/mysql-server$ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/8.0 -DWITH_BOOST=/home/openxs/boost -DDOWNLOAD_BOOST=1 -DENABLE_DOWNLOADS=1
I get the following error:
...
-- MYSQLX - Text log of protobuf messages enabled
-- Successfully downloaded https://github.com/google/googletest/archive/release-1.8.0.zip to /home/openxs/git/mysql-server/source_downloads
-- GTEST_LIBRARIES:gmock;gtest
-- Performing Test HAVE_NO_UNUSED_TYPEDEFS
-- Performing Test HAVE_NO_UNUSED_TYPEDEFS - Success
CMake Error at CMakeLists.txt:859 (ADD_SUBDIRECTORY):
The source directory
/home/openxs/git/mysql-server/rapid/unittest/gunit
does not contain a CMakeLists.txt file.
...
The only way to continue building I found is to add -DWITH_UNIT_TESTS=OFF. Then everything works as expected.
I never noticed this with MySQL 8.0.4.
How to repeat:
Get mysql-server source from GitHub, make sure you are on 8.0 branch and is up to date:
openxs@ao756:~/git/mysql-server$ git branch
5.5
5.6
5.7
* 8.0
openxs@ao756:~/git/mysql-server$ git pull
Already up-to-date.
openxs@ao756:~/git/mysql-server$ git log -1
commit 4f1d7cf5fcb11a3f84cff27e37100d7295e7d5ca
Author: mysql-builder@oracle.com <>
Date: Tue Apr 3 10:28:21 2018 +0200
Then try to build:
openxs@ao756:~/git/mysql-server$ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/8.0 -DWITH_BOOST=/home/openxs/boost -DDOWNLOAD_BOOST=1 -DENABLE_DOWNLOADS=1
...
-- Performing Test HAVE_RPC_INLINE_T - Failed
-- Performing Test OLD_XDR
-- Performing Test OLD_XDR - Failed
-- Performing Test HAS_INCOMPATIBLE_POINTER_TYPES
-- Performing Test HAS_INCOMPATIBLE_POINTER_TYPES - Failed
-- Performing Test X_PUTLONG_NOT_USE_CONST
-- Performing Test X_PUTLONG_NOT_USE_CONST - Failed
-- RPC_INCLUDE_DIR /usr/include
-- MYSQLX - Text log of protobuf messages enabled
-- GMOCK_SOURCE_DIR:/home/openxs/git/mysql-server/source_downloads/googletest-release-1.8.0/googlemock
-- GTEST_LIBRARIES:gmock;gtest
-- Performing Test HAVE_NO_UNUSED_TYPEDEFS
-- Performing Test HAVE_NO_UNUSED_TYPEDEFS - Success
CMake Error at CMakeLists.txt:859 (ADD_SUBDIRECTORY):
The source directory
/home/openxs/git/mysql-server/rapid/unittest/gunit
does not contain a CMakeLists.txt file.
-- CONFIG_CLIENT_LIBS -lpthread -lm -lrt -lssl -lcrypto -ldl
-- CONFIG_LIBS_PRIVATE -lpthread -lm -lrt -ldl
-- INSTALL mysqlclient.pc lib/pkgconfig
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: _GNU_SOURCE;_FILE_OFFSET_BITS=64;HAVE_CONFIG_H;RAPIDJSON_NO_SIZETYPEDEFINE;__STDC_LIMIT_MACROS;__STDC_FORMAT_MACROS;_USE_MATH_DEFINES;HAVE_LIBEVENT1;UNISTR_FROM_STRING_EXPLICIT=explicit;UNISTR_FROM_CHAR_EXPLICIT=explicit
-- CMAKE_C_FLAGS: -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Wwrite-strings
-- CMAKE_CXX_FLAGS: -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Woverloaded-virtual -Wno-missing-field-initializers -Wlogical-op
-- CMAKE_C_LINK_FLAGS: -fuse-ld=gold -Wl,--gc-sections
-- CMAKE_CXX_LINK_FLAGS: -fuse-ld=gold -Wl,--gc-sections
-- CMAKE_C_FLAGS_RELWITHDEBINFO: -O2 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -DDBUG_OFF
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O2 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -std=c++11 -DDBUG_OFF
-- Configuring incomplete, errors occurred!
See also "/home/openxs/git/mysql-server/CMakeFiles/CMakeOutput.log".
See also "/home/openxs/git/mysql-server/CMakeFiles/CMakeError.log".
Enjoy :)