I am about run trinity on a centos machine, and the system is centos 6.2
the compile process is as flows:
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/local/bin/cc
-- Check for working C compiler: /usr/local/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detected 64-bit platform
-- UNIX: Using jemalloc
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Detected compiler: /usr/local/bin/cc
-- GCC: Enabled c++11 support
-- GCC: Enabled C99 support
-- GCC: SFMT enabled, SSE2 flags forced
-- Found ACE library: /usr/local/lib/libACE.so
-- Found ACE headers: /usr/local/include
-- Found OpenSSL library: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- Found OpenSSL headers: /usr/include
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Using mysql-config: /usr/bin/mysql_config
-- Found MySQL library: /usr/lib64/mysql/libmysqlclient.so
-- Found MySQL headers: /usr/include/mysql
-- Found Readline library: /usr/lib64/libreadline.so
-- Include dir is: /usr/include
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.5")
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found
-- Found git binary : /usr/bin/git
* TrinityCore revision : b717ce0edaf2+ 2014-04-07 09:56:06 +0200 (master branch)
* TrinityCore buildtype : Release
* Install core to : /home/trinity/server
* Install libraries to : /home/trinity/server/lib
* Install configs to : /home/trinity/server/conf
* Build world/auth : Yes (default)
* Build with scripts : Yes (default)
* Build map/vmap tools : Yes
* Build core w/PCH : Yes (default)
* Build scripts w/PCH : Yes (default)
* Show compile-warnings : No (default)
* Use coreside debug : No (default)
* Use GIT revision hash : Yes
-- SCRIPT PREPARATIONS
-> Prepared: Spells
-> Prepared: Commands
-> Prepared: Examples
-> Prepared: Custom
-> Prepared: World
-> Prepared: Outdoor PVP Zones
-> Prepared: Eastern Kingdoms
-> Prepared: Kalimdor
-> Prepared: Outland
-> Prepared: Northrend
-> Prepared: Events
-> Prepared: Pet
-- SCRIPT PREPARATION COMPLETE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/trinity/forcompile/build
make -j 4
then it has errors as:
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/trinity/forcompile/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec3516515598/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec3516515598.dir/build.make CMakeFiles/cmTryCompileExec3516515598.dir/build
gmake[1]: Entering directory `/home/trinity/forcompile/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake28 -E cmake_progress_report /home/trinity/forcompile/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3516515598.dir/CheckSymbolExists.c.o
/usr/local/bin/cc -std=gnu99 -o CMakeFiles/cmTryCompileExec3516515598.dir/CheckSymbolExists.c.o -c /home/trinity/forcompile/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec3516515598
/usr/bin/cmake28 -E cmake_link_script CMakeFiles/cmTryCompileExec3516515598.dir/link.txt --verbose=1
/usr/local/bin/cc -std=gnu99 CMakeFiles/cmTryCompileExec3516515598.dir/CheckSymbolExists.c.o -o cmTryCompileExec3516515598 -rdynamic
CMakeFiles/cmTryCompileExec3516515598.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: Leaving directory `/home/trinity/forcompile/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec3516515598] Error 1
gmake: *** [cmTryCompileExec3516515598/fast] Error 2
File /home/trinity/forcompile/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/trinity/forcompile/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec2355673569/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec2355673569.dir/build.make CMakeFiles/cmTryCompileExec2355673569.dir/build
gmake[1]: Entering directory `/home/trinity/forcompile/build/CMakeFiles/CMakeTmp'
/usr/bin/cmake28 -E cmake_progress_report /home/trinity/forcompile/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2355673569.dir/CheckFunctionExists.c.o
/usr/local/bin/cc -std=gnu99 -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec2355673569.dir/CheckFunctionExists.c.o -c /usr/share/cmake28/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec2355673569
/usr/bin/cmake28 -E cmake_link_script CMakeFiles/cmTryCompileExec2355673569.dir/link.txt --verbose=1
/usr/local/bin/cc -std=gnu99 -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec2355673569.dir/CheckFunctionExists.c.o -o cmTryCompileExec2355673569 -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: Leaving directory `/home/trinity/forcompile/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec2355673569] Error 1
gmake: *** [cmTryCompileExec2355673569/fast] Error 2
if I compile without DTOOLS then this whole thing runs smooth without problem, however when I add -DTOOLS=1 , the error occurs,
coould anyone give me some help on how to solve this. thanks!