CMake编译出现’CMAKE_C_COMPILER and CMAKE_CXX_COMPILER’
[root@localhost bld]# cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DMYSQL_DATADIR=/data/mysql -DSYSCONFDIR=/etc -DMYSQL_USER=mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_MROONGA_STORAGE_ENGINE=1 -DWITH_DEBUG=0 -DWITH_READLINE=1 -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_LIBWRAP=0 -DENABLED_LOCAL_INFILE=1 -DMYSQL_UNIX_ADDR=/data/mysql.sock
-- Running cmake version 3.20.2
-- Could NOT find Git (missing: GIT_EXECUTABLE)
CMake Deprecation Warning at cmake/cmake_policies.cmake:59 (CMAKE_POLICY):
The OLD behavior for policy CMP0073 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.
Call Stack (most recent call first):
CMakeLists.txt:234 (INCLUDE)
-- This is .el8. as found from 'rpm -qf /'
-- Looking for a devtoolset compiler
CMake Warning at CMakeLists.txt:313 (MESSAGE):
Could not find devtoolset compiler in /opt/rh/gcc-toolset-10
CMake Error at CMakeLists.txt:315 (MESSAGE):
Please set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER explicitly.
-- Configuring incomplete, errors occurred!
CMake Error at cmake/boost.cmake:107 (MESSAGE):
You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>
This CMake script will lookforboostin<directory>. If it is not there,
it will download and unpack it (in that directory)for you.
You can also download boost manually, from
https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.gz
If you are inside a firewall, you may need to use an https proxy:
exporthttps_proxy=http://example.com:80
Call Stack (most recent call first):
cmake/boost.cmake:307 (COULD_NOT_FIND_BOOST)
CMakeLists.txt:1284 (INCLUDE)
-- Configuring incomplete, errors occurred!
See also "/usr/src/mysql-8.0.26/CMakeFiles/CMakeOutput.log".
See also "/usr/src/mysql-8.0.26/CMakeFiles/CMakeError.log".
CMake Warning at cmake/rpc.cmake:29 (MESSAGE):
Cannot find rpcgen executable. You need to install the required packages:
Debian/Ubuntu: aptinstall rpcsvc-proto
RedHat/Fedora/Oracle Linux: yum install rpcgen
SuSE: zypperinstall glibc-devel
Call Stack (most recent call first):
plugin/group_replication/libmysqlgcs/cmake/rpcgen.cmake:104 (WARN_MISSING_RPCGEN_EXECUTABLE)
plugin/group_replication/libmysqlgcs/CMakeLists.txt:53 (INCLUDE)
CMake Error at plugin/group_replication/libmysqlgcs/cmake/rpcgen.cmake:105 (MESSAGE):
Could not find rpcgen
Call Stack (most recent call first):
plugin/group_replication/libmysqlgcs/CMakeLists.txt:53 (INCLUDE)
-- Configuring incomplete, errors occurred!
解决办法
[root@src-mysql ~]# wget https://github.com/thkukuk/rpcsvc-proto/releases/download/v1.4.2/rpcsvc-proto-1.4.2.tar.xz[root@src-mysql ~]# tar -xf rpcsvc-proto-1.4.2.tar.xz[root@src-mysql ~]# cd rpcsvc-proto-1.4.2[root@src-mysql rpcsvc-proto-1.4.2]# ./configure[root@src-mysql rpcsvc-proto-1.4.2]# make -j $(grep -ic process /proc/cpuinfo) && make install