TarsCloud / TarsFramework

Tars Basic service framework
BSD 3-Clause "New" or "Revised" License
200 stars 143 forks source link

编译脚本不支持mysql 8, 需要修改 #11

Closed qiuxin closed 5 years ago

qiuxin commented 5 years ago

本机环境: [root@ip-172-31-3-123 build]# mysql --version mysql Ver 8.0.13 for Linux on aarch64 (Source distribution) [root@ip-172-31-3-123 build]# cat /proc/ Display all 177 possibilities? (y or n) [root@ip-172-31-3-123 build]# cat /proc/version Linux version 4.18.0-80.4.2.el8_0.aarch64 (mockbuild@arm64-025.build.eng.bos.redhat.com) (gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)) #1 SMP Fri Jun 14 14:04:35 UTC 2019

问题: 在TarsFramework/build路径下,编译不通过,提示找不到libmysqlclient.a 导致编译出错。 因为mysql 8没有提供libmysqlclient.a, 仅仅提供了libmysqlclient.so

解决办法: 1)将TarsFramework下的CMakeList.txt语句做如下修改: link_libraries(${MYSQL_DIR_LIB}/libmysqlclient.a) 修改成: link_libraries(${MYSQL_DIR_LIB}/libmysqlclient.so) 问题解决

qiuxin commented 5 years ago

目前暂不支持mysql8,请使用mysql 5.6, or 5.7.