Closed snigel closed 6 years ago
I am getting a similar error on openSUSE Tumbleweed
make
cmake options:
-DCMAKE_BUILD_TYPE='Release': Build debug or release. (Debug|Release)
-DCMAKE_VERBOSE='': Spew cmake project options. (On|Off)
-DBUILD_X64='': Build 32 or 64-bit. (On|Off)
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for 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
Building 64-bit voglperf...
CMake Error at build_options.cmake:136 (list):
list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
CMakeLists.txt:16 (include)
-- Configuring incomplete, errors occurred!
See also "/home/robert/Documents/sources/oss/voglperf/build_x86_64/CMakeFiles/CMakeOutput.log".
See also "/home/robert/Documents/sources/oss/voglperf/build_x86_64/CMakeFiles/CMakeError.log".
make[1]: Entering directory '/home/robert/Documents/sources/oss/voglperf/build_x86_64'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory '/home/robert/Documents/sources/oss/voglperf/build_x86_64'
make: *** [Makefile:16: voglperfnative] Error 2
robert@mars:~/Documents/sources/oss/voglperf>
Root cause seems to be
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_29e5d.dir/CheckFunctionExists.c.o -o cmTC_29e5d -lpthreads
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lpthreads
However, I have the pthreads development files installed
/usr/include/bits/pthreadtypes-arch.h
/usr/include/bits/pthreadtypes.h
/usr/include/pthread.h
/usr/lib64/libpthread.so
/usr/lib64/libpthread_nonshared.a
Install dependencies
Try to build.