0

我无法在 Debian 上编译最新版本的AzerothCore

CMake 失败并出现以下错误(来自CMakeError.log):

确定 pthread_create 是否存在失败,输出如下: Change Dir: /wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_49bb8/fast" /usr/bin/make - f CMakeFiles/cmTC_49bb8.dir/build.make CMakeFiles/cmTC_49bb8.dir/build make[1]: 进入目录'/wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp' 构建C对象CMakeFiles/cmTC_49bb8.dir/CheckSymbolExists.co /usr/bin/cc
-std=gnu99 -o CMakeFiles/cmTC_49bb8.dir/CheckSymbolExists.co -c /wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c 链接 C 可执行文件 cmTC_49bb8 /usr/bin/cmake - E cmake_link_script CMakeFiles/cmTC_49bb8.dir/link.txt --verbose=1 /usr/bin/cc
-std=gnu99 CMakeFiles/cmTC_49bb8.dir/CheckSymbolExists.co -o cmTC_49bb8 -rdynamic CMakeFiles/cmTC_49bb8.dir/CheckSymbolExists.co:在函数main': CheckSymbolExists.c:(.text+0x1b): undefined reference topthread_create'collect2:错误:ld返回1退出状态CMakeFiles/cmTC_49bb8.dir/build.make :97:目标'cmTC_49bb8'的配方失败make [1]:* [cmTC_49bb8]错误1 make [1]:离开目录'/wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp' Makefile:126:目标'的配方cmTC_49bb8/fast' 失败的制作: [cmTC_49bb8/fast] 错误 2 文件 /wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: / */ include int main(int argc, char** argv) { (void)argv; ifndef pthread_create return ((int*)(&pthread_create))[argc]; 否则(无效)argc;返回0;endif } 确定函数 pthread_create 是否存在于 pthreads 失败,输出如下: Change Dir: /wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_367c4/fast" / usr/bin/make -f CMakeFiles/cmTC_367c4.dir/build.make CMakeFiles/cmTC_367c4.dir/build make[1]: 进入目录'/wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp' 构建C对象CMakeFiles/cmTC_367c4 .dir/CheckFunctionExists.co /usr/bin/cc
-std=gnu99 -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_367c4.dir/CheckFunctionExists.co -c /usr/share/cmake-3.7/Modules/CheckFunctionExists.c 链接 C 可执行文件 cmTC_367c4 /usr/bin/cmake -E cmake_link_script CMakeFiles/ cmTC_367c4.dir/link.txt --verbose=1 /usr/bin/cc
-std=gnu99 -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_367c4.dir/CheckFunctionExists.co -o cmTC_367c4 -rdynamic -lpthreads /usr/bin/ld: 不能查找-lpthreads collect2:错误:ld返回1退出状态CMakeFiles/cmTC_367c4.dir/build.make:97:目标'cmTC_367c4'的配方失败make [1]:* [cmTC_367c4]错误1 make [1]:离开目录' /wow/azerothcore-wotlk/build/CMakeFiles/CMakeTmp' Makefile:126: 目标 'cmTC_367c4/fast' 的配方失败 make:* [cmTC_367c4/fast] 错误 2

这是我的CMakeOutput.log

谁能解释一下,哪里有问题?

4

1 回答 1

1

你使用什么版本的 gcc(或 clang)和 Cmake?你能发布你运行的命令吗?因为你的输出看起来像你运行 ./configure 和 make 而不是 cmake O_o

于 2019-01-15T21:30:39.383 回答