Cannot build STK 0.9.2 on Ubuntu 16.04 - OpenAL issue

Cannot build STK 0.9.2 on Ubuntu 16.04 - OpenAL issue

Postby Holkidan » 12 Oct 2016, 13:08

Hello everyone

I have some trouble to build the game with CMake. I have installed all the librairies needed and I get an error during the compilation:

{l Code}: {l Select All Code}
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
                 Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
                 /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
                 /usr/share/cmake-3.5/Modules/FindOpenAL.cmake:108 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
                 CMakeLists.txt:153 (find_package)

I look for the OpenAL librairie (with "dpkg --list | grep openal" ) and it's install on the computer:
{l Code}: {l Select All Code}
ii  libopenal-data                         1:1.16.0-3                     all                 Software implementation of the OpenAL audio API (data files)
ii  libopenal1:amd64                       1:1.16.0-3                     amd64               Software implementation of the OpenAL audio API (shared library)


Here is the CMakeError.log:
{l Code}: {l Select All Code}
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0fb2e/fast"
/usr/bin/make -f CMakeFiles/cmTC_0fb2e.dir/build.make CMakeFiles/cmTC_0fb2e.dir/build
make[1] : on entre dans le répertoire « /home/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_build/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_0fb2e.dir/CheckSymbolExists.c.o
/usr/bin/cc     -o CMakeFiles/cmTC_0fb2e.dir/CheckSymbolExists.c.o   -c "/home/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_build/CMakeFiles/CMakeTmp/CheckSymbolExists.c"
Linking C executable cmTC_0fb2e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0fb2e.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTC_0fb2e.dir/CheckSymbolExists.c.o  -o cmTC_0fb2e -rdynamic
CMakeFiles/cmTC_0fb2e.dir/CheckSymbolExists.c.o : Dans la fonction « main » :
CheckSymbolExists.c:(.text+0x16) : référence indéfinie vers « pthread_create »
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_0fb2e.dir/build.make:97 : la recette pour la cible « cmTC_0fb2e » a échouée
make[1]: *** [cmTC_0fb2e] Erreur 1
make[1] : on quitte le répertoire « /home/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_build/CMakeFiles/CMakeTmp »
Makefile:126 : la recette pour la cible « cmTC_0fb2e/fast » a échouée
make: *** [cmTC_0fb2e/fast] Erreur 2

File /home/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_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/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_2fd1b/fast"
/usr/bin/make -f CMakeFiles/cmTC_2fd1b.dir/build.make CMakeFiles/cmTC_2fd1b.dir/build
make[1] : on entre dans le répertoire « /home/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_build/CMakeFiles/CMakeTmp »
Building C object CMakeFiles/cmTC_2fd1b.dir/CheckFunctionExists.c.o
/usr/bin/cc    -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_2fd1b.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c
Linking C executable cmTC_2fd1b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2fd1b.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_2fd1b.dir/CheckFunctionExists.c.o  -o cmTC_2fd1b -rdynamic -lpthreads
/usr/bin/ld : ne peut trouver -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_2fd1b.dir/build.make:97 : la recette pour la cible « cmTC_2fd1b » a échouée
make[1]: *** [cmTC_2fd1b] Erreur 1
make[1] : on quitte le répertoire « /home/ma1/user/Documents/Master-1/GL/Projet - SuperTux Kart/supertuxkart-0.9.2/cmake_build/CMakeFiles/CMakeTmp »
Makefile:126 : la recette pour la cible « cmTC_2fd1b/fast » a échouée
make: *** [cmTC_2fd1b/fast] Erreur 2


Please help me
Holkidan
 
Posts: 2
Joined: 12 Oct 2016, 12:45

Re: Cannot build STK 0.9.2 on Ubuntu 16.04 - OpenAL issue

Postby Auria » 13 Oct 2016, 00:23

That's weird, the issue actually seems to be about pthread, not OpenAL

{l Code}: {l Select All Code}
CheckSymbolExists.c:(.text+0x16) : référence indéfinie vers « pthread_create »


Anyone got an idea?
Image
User avatar
Auria
STK Moderator
 
Posts: 2976
Joined: 07 Dec 2009, 03:52

Re: Cannot build STK 0.9.2 on Ubuntu 16.04 - OpenAL issue

Postby QwertyChouskie » 13 Oct 2016, 00:29

Try running:

sudo apt-get install build-essential cmake libbluetooth-dev \
libcurl4-gnutls-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev \
libjpeg-dev libogg-dev libopenal-dev libpng-dev libvorbis-dev libxrandr-dev \
mesa-common-dev pkg-config zlib1g-dev

This will make sure you have all that is needed.
Contributor to/fan of STK (Upstreamed Cartoon theme, numerous random big fixes/tweaks)
User avatar
QwertyChouskie
 
Posts: 559
Joined: 29 Jun 2016, 14:57

Re: Cannot build STK 0.9.2 on Ubuntu 16.04 - OpenAL issue

Postby Holkidan » 19 Oct 2016, 13:29

Thanks for your help guys.
I'll try to install all the dependencies again and I tell you the result ;)
Holkidan
 
Posts: 2
Joined: 12 Oct 2016, 12:45

Who is online

Users browsing this forum: No registered users and 1 guest