数据库
首页 > 数据库> > centos8下面编译mysql5.27源码失败

centos8下面编译mysql5.27源码失败

作者:互联网

先安装几个依赖

yum install -y cmake ncurses-devel

cmake -D............ 一堆参数 ,文档见这里https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html#option_cmake_cmake_install_prefix

报错:

[ 11%] Linking C executable queues
/usr/bin/ld: ../archive_output_directory/libmysys.a(my_thread.c.o): undefined reference to symbol 'pthread_join@@GLIBC_2.2.5'
//usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [mysys/CMakeFiles/queues.dir/build.make:90: mysys/queues] Error 1
make[1]: *** [CMakeFiles/Makefile2:1291: mysys/CMakeFiles/queues.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

有点小慌,马上搜索找到了答案

vi mysys/CMakeFiles/thr_lock.dir/link.txt
vi mysys/CMakeFiles/queues.dir/link.txt

这两个文件打开一下,在末尾增加  -pthread,又继续了

标签:CMakeFiles,queues,mysql5.27,mysys,源码,cmake,make,dir,centos8
来源: https://blog.csdn.net/ashchen/article/details/114374701