错误信息:
[root@centos001 mariadb-10.1.8]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mydata -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STPRAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWIYH_READLINE=1 -DWIYH_SSL=system -DVITH_ZLIB=system -DWITH_LOBWRAP=0 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
-- Running cmake version 3.4.0-rc1
-- MariaDB 10.1.8
-- Packaging as: mariadb-10.1.8-Linux-x86_64
-- OPENSSL_INCLUDE_DIR = /usr/include
-- OPENSSL_LIBRARIES = /usr/lib64/libssl.so
-- CRYPTO_LIBRARY = /usr/lib64/libcrypto.so
-- OPENSSL_MAJOR_VERSION = 1
-- SSL_LIBRARIES = /usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl
-- Checking for one of the modules 'libsystemd;libsystemd-daemon'
-- Systemd features not enabled
CMake Warning at storage/tokudb/CMakeLists.txt:17 (MESSAGE):
TokuDB is enabled, but jemalloc is not. This configuration is not
supported
CMake Error at storage/tokudb/ft-index/cmake_modules/TokuSetupCompiler.cmake:182 (message):
/usr/bin/c++ doesn't support -std=c++11 or -std=c++0x, you need one that
does.
Call Stack (most recent call first):
storage/tokudb/ft-index/CMakeLists.txt:35 (include)
-- Configuring incomplete, errors occurred!
See also "/data/soft/mariadb-10.1.8/CMakeFiles/CMakeOutput.log".
See also "/data/soft/mariadb-10.1.8/CMakeFiles/CMakeError.log".
[root@centos001 mariadb-10.1.8]#
c++编译器版本太低,4.8以上才支持c++11的特性,jemalloc需要先安装,才能有更好的内存管理,顺便说一句,mariadb10.1系列是开发中版本你也敢拿来用
我的天,mariadb居然把10.1稳定了,少见啊
c++编译器版本太低?
(没事不要编译安装
我也是这个问题
找到症结了
project(TokuDB)
suppress -rdynamic
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
Versions of gcc >= 4.9.0 require special version of 'ar' and 'ranlib' for
link-time optimizations to work properly.
From https://gcc.gnu.org/gcc-4.9/changes.html:
When using a linker plugin, compiling with the -flto option now
generates slim objects files (.o) which only contain intermediate
language representation for LTO. Use -ffat-lto-objects to create
files which contain additionally the object code. To generate
static libraries suitable for LTO processing, use gcc-ar and
gcc-ranlib; to list symbols from a slim object file use
gcc-nm. (Requires that ar, ranlib and nm have been compiled with
plugin support.)
不是4.9.0以上不行,因为tokudb的问题,一般4.8是支持的C++11的,只是不同版本GCC支持C++11特性不同而已