ValveSoftware / voglperf

Benchmarking tool for Linux OpenGL games. Spews frame information, logs frametimes.
Other
201 stars 31 forks source link

Can't build under Ubuntu 17.10 #34

Closed snigel closed 6 years ago

snigel commented 6 years ago

Install dependencies

snigel@workstation:~$ sudo apt-get install git ca-certificates cmake g++ gcc-multilib g++-multilib
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20170717).
cmake is already the newest version (3.9.1-1).
g++ is already the newest version (4:7.2.0-1ubuntu1).
g++-multilib is already the newest version (4:7.2.0-1ubuntu1).
gcc-multilib is already the newest version (4:7.2.0-1ubuntu1).
git is already the newest version (1:2.14.1-1ubuntu4).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
snigel@workstation:~$ sudo apt-get install mesa-common-dev libedit-dev libtinfo-dev libtinfo-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libedit-dev is already the newest version (3.1-20170329-1).
libtinfo-dev is already the newest version (6.0+20160625-1ubuntu1).
mesa-common-dev is already the newest version (17.2.2-0ubuntu1).
libtinfo-dev:i386 is already the newest version (6.0+20160625-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Try to build.

snigel@workstation:~$ git clone https://github.com/ValveSoftware/voglperf.git
snigel@workstation:~$ cd voglperf
snigel@workstation:~/voglperf$ 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.2.0
-- The CXX compiler identification is GNU 7.2.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/snigel/voglperf/build_x86_64/CMakeFiles/CMakeOutput.log".
See also "/home/snigel/voglperf/build_x86_64/CMakeFiles/CMakeError.log".
make[1]: Entering directory '/home/snigel/voglperf/build_x86_64'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/home/snigel/voglperf/build_x86_64'
Makefile:16: recipe for target 'voglperfnative' failed
make: *** [voglperfnative] Error 2
rombert commented 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> 
rombert commented 6 years ago

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