Forums WoW Modding Discussion Miscellaneous [Archive] cmake error on debian

[Archive] cmake error on debian

[Archive] cmake error on debian

rektbyfaith
Administrator
0
11-04-2025, 05:14 PM
#1
Archived author: levani4321 • Posted: 2025-11-04T18:14:22.605178
Original source

hello someone know how to fix that error

Determining if the pthread_create exist failed with the following output:

Change Dir: /home/test/testwow335/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e7e5b/fast"

/usr/bin/make -f CMakeFiles/cmTC_e7e5b.dir/build.make CMakeFiles/cmTC_e7e5b.dir/build

make[1]: Entering directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o

/usr/bin/cc -o CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o -c /home/test/testwow335/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c

Linking C executable cmTC_e7e5b

/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e7e5b.dir/link.txt --verbose=1

/usr/bin/cc CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o -o cmTC_e7e5b -rdynamic

CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o: In function `main':

/home/test/testwow335/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c.text+0x19): undefined reference to `pthread_create'

clang: error: linker command failed with exit code 1 (use -v to see invocation)

CMakeFiles/cmTC_e7e5b.dir/build.make:97: recipe for target 'cmTC_e7e5b' failed

make[1]: *** [cmTC_e7e5b] Error 1

make[1]: Leaving directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Makefile:126: recipe for target 'cmTC_e7e5b/fast' failed

make: *** [cmTC_e7e5b/fast] Error 2

File /home/test/testwow335/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/test/testwow335/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_4eede/fast"

/usr/bin/make -f CMakeFiles/cmTC_4eede.dir/build.make CMakeFiles/cmTC_4eede.dir/build

make[1]: Entering directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_4eede.dir/CheckFunctionExists.c.o

/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_4eede.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.7/Modules/CheckFunctionExists.c

Linking C executable cmTC_4eede

/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4eede.dir/link.txt --verbose=1

/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_4eede.dir/CheckFunctionExists.c.o -o cmTC_4eede -rdynamic -lpthreads

/usr/bin/ld: cannot find -lpthreads

clang: error: linker command failed with exit code 1 (use -v to see invocation)

CMakeFiles/cmTC_4eede.dir/build.make:97: recipe for target 'cmTC_4eede' failed

make[1]: *** [cmTC_4eede] Error 1

make[1]: Leaving directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Makefile:126: recipe for target 'cmTC_4eede/fast' failed

make: *** [cmTC_4eede/fast] Error 2
rektbyfaith
11-04-2025, 05:14 PM #1

Archived author: levani4321 • Posted: 2025-11-04T18:14:22.605178
Original source

hello someone know how to fix that error

Determining if the pthread_create exist failed with the following output:

Change Dir: /home/test/testwow335/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e7e5b/fast"

/usr/bin/make -f CMakeFiles/cmTC_e7e5b.dir/build.make CMakeFiles/cmTC_e7e5b.dir/build

make[1]: Entering directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o

/usr/bin/cc -o CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o -c /home/test/testwow335/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c

Linking C executable cmTC_e7e5b

/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e7e5b.dir/link.txt --verbose=1

/usr/bin/cc CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o -o cmTC_e7e5b -rdynamic

CMakeFiles/cmTC_e7e5b.dir/CheckSymbolExists.c.o: In function `main':

/home/test/testwow335/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c.text+0x19): undefined reference to `pthread_create'

clang: error: linker command failed with exit code 1 (use -v to see invocation)

CMakeFiles/cmTC_e7e5b.dir/build.make:97: recipe for target 'cmTC_e7e5b' failed

make[1]: *** [cmTC_e7e5b] Error 1

make[1]: Leaving directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Makefile:126: recipe for target 'cmTC_e7e5b/fast' failed

make: *** [cmTC_e7e5b/fast] Error 2

File /home/test/testwow335/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/test/testwow335/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_4eede/fast"

/usr/bin/make -f CMakeFiles/cmTC_4eede.dir/build.make CMakeFiles/cmTC_4eede.dir/build

make[1]: Entering directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_4eede.dir/CheckFunctionExists.c.o

/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_4eede.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.7/Modules/CheckFunctionExists.c

Linking C executable cmTC_4eede

/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4eede.dir/link.txt --verbose=1

/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_4eede.dir/CheckFunctionExists.c.o -o cmTC_4eede -rdynamic -lpthreads

/usr/bin/ld: cannot find -lpthreads

clang: error: linker command failed with exit code 1 (use -v to see invocation)

CMakeFiles/cmTC_4eede.dir/build.make:97: recipe for target 'cmTC_4eede' failed

make[1]: *** [cmTC_4eede] Error 1

make[1]: Leaving directory '/home/test/testwow335/build/CMakeFiles/CMakeTmp'

Makefile:126: recipe for target 'cmTC_4eede/fast' failed

make: *** [cmTC_4eede/fast] Error 2

rektbyfaith
Administrator
0
11-04-2025, 05:14 PM
#2
Archived author: levani4321 • Posted: 2025-11-04T18:14:22.605178
Original source

Just a suggestion:

new gcc compiler requires that library follows the object.

Example:

gcc pthread_example.c -lpthread

instead of

gcc -lpthread pthread_example.c

Not exactly sure what you are compiling but the order the compile command is entered has been known to cause issues in new gcc.

Good luck
rektbyfaith
11-04-2025, 05:14 PM #2

Archived author: levani4321 • Posted: 2025-11-04T18:14:22.605178
Original source

Just a suggestion:

new gcc compiler requires that library follows the object.

Example:

gcc pthread_example.c -lpthread

instead of

gcc -lpthread pthread_example.c

Not exactly sure what you are compiling but the order the compile command is entered has been known to cause issues in new gcc.

Good luck

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)