MySQL系列—编译安装8.0版本时gcc及cmake版本说明
MySQL 8.0.16以上版本是C++14标准,编译安装时需gcc 5.3以上版本。本人在结合cmake编译工具的情况下,经过多版本测试,gcc版本10.2.1是最好的选择,同时cmake的版本为3.19.8。
下面是在测试过程中遇到的错误信息详情。
1.使用gcc9.3.1时,cmake版本不能超过3.19.0
## 若使用3.19.1-3.19.8版本的cmake,就会出现如下的错误信息,无法完成编译。错误信息中已提示找不到gcc 10编译器
Could not find devtoolset compiler in /opt/rh/devtoolset-10## 若使用3.20.x版本的cmake,则会出现如下的错误信息,无法完成编译。错误信息中也提示找不到gcc 10编译器
2.使用gcc10.2.1时,cmake最好不要使用3.20.x版本,使用3.20.x版本会出现Warning提示(如下所示),但能完成cmake配置,也能完成MySQL的安装,简单测试使用也无问题。MySQL后续使用中是否会出现问题不知道。个人建议在安装过程中尽量避免出现一些不正常的提示信息。
-- Running cmake version 3.20.1
-- Found Git: /bin/git (found version "1.8.3.1") 
CMake Deprecation Warning at cmake/cmake_policies.cmake:54 (CMAKE_POLICY):
  The OLD behavior for policy CMP0075 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:233 (INCLUDE)
-- CMP0073 OLD
CMake Deprecation Warning at cmake/cmake_policies.cmake:62 (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:233 (INCLUDE)
-- This is .el7. as found from 'rpm -qf /'
-- Looking for a devtoolset compiler
-- Using /opt/rh/devtoolset-10/root/usr/bin/gcc
-- Using /opt/rh/devtoolset-10/root/usr/bin/g++                    相关文章
- Spring Boot中对接Twilio以实现发送验证码和验证短信码
 - Spring Boot 3.5:这次更新让你连配置都不用写了,惊不惊喜?
 - Spring Boot+Pinot实战:毫秒级实时竞价系统构建
 - SpringBoot敏感配置项加密与解密实战
 - SpringBoot 注解最全详解,建议收藏!
 - Spring Boot 常用注解大全:从入门到进阶
 - SpringBoot启动之谜:@SpringBootApplication如何让配置化繁为简
 - Springboot集成Kafka原理_spring集成kafka的原理
 - Spring Boot中@Data注解的深度解析与实战应用
 - 大佬用1000字就把SpringBoot的配置文件讲的明明白白!
 
