cmake . -DCMAKE_INSTALL_PREFIX=/root/mariadb -DDEFAULT_CHARSET=utf8 -
DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -
DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -
DWITH_FEDERATED_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_USER=mariadb
然后错误:
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108中的CMake错误(消息): 找不到GnuTLS(缺少:GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) (必需至少为“3.3.24”版本) 呼叫堆栈(最近一次呼叫): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315(_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindGnuTLS.cmake:61(FIND_PACKAGE_HANDLE_STANDARD_ARGS) libmariadb / CMakeLists.txt:291(FIND_PACKAGE)
以下是我的截图
答案 0 :(得分:2)
尝试使用以下命令安装gnutls-dev
:
sudo apt-get install gnutls-dev
答案 1 :(得分:0)
遇到了同样的错误:
无法找到GnuTLS(必需至少是版本“3.3.24”)
我已降级为 v3.3.24 虽然有更新的,但要避免如果需要确切的 3.3.24 ,但错误再次发生;
在CentOS 7上安装以下软件包解决了我的问题;在重新运行cmake之前不要忘记删除CMakeCache.txt。
yum -y install libaio
yum -y install libaio-devel
yum -y install bison
yum -y install bison-devel
yum -y install zlib-devel
yum -y install openssl
yum -y install openssl-devel
yum -y install ncurses
yum -y install ncurses-devel
yum -y install libcurl-devel
yum -y install libarchive-devel
yum -y install boost
yum -y install boost-devel
yum -y install lsof
yum -y install wget
yum -y install gcc
yum -y install gcc-c++
yum -y install make
yum -y install cmake
yum -y install perl
yum -y install kernel-headers
yum -y install kernel-devel
yum -y install pcre-devel
答案 2 :(得分:0)
我能够解决其中的一些问题,但最终在centos 6上构建失败。
mkdir build-mariadb; cd build-mariadb
cmake .. -DBUILD_CONFIG=mysql_release -DWITH_SSL=system
但这会导致在制作过程中出现更多问题:
CMakeFiles/CMakeError.log:cc1plus:
error: unrecognized command line option "-std=gnu++11"
要解决此问题,我将其添加到所有CMakeLists.txt的顶部:
SET(CMAKE_CXX_FLAGS "-std=gnu++0x")
我曾经用find来做到这一点:
cd ..
find . -type f -name 'CMakeLists.txt' -exec sed -i '1iSET(CMAKE_CXX_FLAGS "-std=gnu++0x")' {} \+
我放弃了按照https://gcc.gnu.org/wiki/Atomic/GCCMM
尝试构建外部原子库的尝试错误是:
undefined reference to `my_atomic_storeptr'