bjornbytes / lovr

Lua Virtual Reality Framework
https://lovr.org
MIT License
2k stars 138 forks source link

I cant compile LoVR in linux :( #179

Closed darltrash closed 4 years ago

darltrash commented 4 years ago

I tried running the compiling code from the documentation (https://lovr.org/docs/Compiling) But i always get an error:

-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.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
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 
CMake Error at CMakeLists.txt:93 (add_subdirectory):
  The source directory

    /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/enet

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:116 (add_subdirectory):
  The source directory

    /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/glfw

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:133 (add_subdirectory):
  The source directory

    /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/luajit

  does not chttps://github.com/deepmind/open_spiel/issues/11ontain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:157 (add_subdirectory):
  The source directory

    /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/msdfgen

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:176 (add_subdirectory):
  The source directory

    /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/ode

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:178 (set_target_properties):
  set_target_properties Can not find target to add properties to: ode

CMake Error at CMakeLists.txt:204 (add_subdirectory):
  The source directory

    /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/openal-soft

  does not contain a CMakeLists.txt file.

CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:216 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/libOpenGL.so   
CMake Error at CMakeLists.txt:233 (add_subdirectory):
  The source directory

    /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/openvr

  does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:234 (set_target_properties):
  set_target_properties Can not find target to add properties to: openvr_api

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Configuring incomplete, errors occurred!
See also "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeError.log".

The "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeError.log" file (i translated some parts because some of them were in spanish):

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_84ce4/fast && /usr/bin/make -f CMakeFiles/cmTC_84ce4.dir/build.make CMakeFiles/cmTC_84ce4.dir/build
make[1]: Entering directory '/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_84ce4.dir/src.c.o
/usr/bin/cc   -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_84ce4.dir/src.c.o   -c /home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_84ce4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84ce4.dir/link.txt --verbose=1
/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD    -rdynamic CMakeFiles/cmTC_84ce4.dir/src.c.o  -o cmTC_84ce4 
/usr/bin/ld: CMakeFiles/cmTC_84ce4.dir/src.c.o: in function `main':
src.c:(.text+0x3e): reference to `pthread_create' without being defined
/usr/bin/ld: src.c:(.text+0x4a): reference to `pthread_detach' without being defined
/usr/bin/ld: src.c:(.text+0x5b): reference to `pthread_join' without being defined
collect2: error: ld returned exit state 1
make[1]: *** [CMakeFiles/cmTC_84ce4.dir/build.make:87: cmTC_84ce4] Error 1
make[1]: Getting out of directory '/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_84ce4/fast] Error 2

Source file was:
#include <pthread.h>

void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

The "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeOutput.log" file was too long so i saved it into a pastebin

Info about my OS:

OS: Manjaro KDE minimal (arch based)
CMake version: 3.16.2
Kernel: Linux 5.4.2-1-MANJARO (5.4)
Steam: Latest
Architecture: x86_64

I really hope this gets fixed soon :(

shakesoda commented 4 years ago

did you remember to init submodules? looks like you have files missing

On Thu, Jan 2, 2020 at 11:03 AM Dario notifications@github.com wrote:

I tried running the compiling code from the documentation ( https://lovr.org/docs/Compiling) But i always get an error:

-- The C compiler identification is GNU 9.2.0 -- The CXX compiler identification is GNU 9.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 -- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") CMake Error at CMakeLists.txt:93 (add_subdirectory): The source directory

/home/darltrash/Escritorio/bitsaaah/lovr-master/deps/enet

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:116 (add_subdirectory): The source directory

/home/darltrash/Escritorio/bitsaaah/lovr-master/deps/glfw

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:133 (add_subdirectory): The source directory

/home/darltrash/Escritorio/bitsaaah/lovr-master/deps/luajit

does not chttps://github.com/deepmind/open_spiel/issues/11ontain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:157 (add_subdirectory): The source directory

/home/darltrash/Escritorio/bitsaaah/lovr-master/deps/msdfgen

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:176 (add_subdirectory): The source directory

/home/darltrash/Escritorio/bitsaaah/lovr-master/deps/ode

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:178 (set_target_properties): set_target_properties Can not find target to add properties to: ode

CMake Error at CMakeLists.txt:204 (add_subdirectory): The source directory

/home/darltrash/Escritorio/bitsaaah/lovr-master/deps/openal-soft

does not contain a CMakeLists.txt file.

CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): CMakeLists.txt:216 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/libOpenGL.so CMake Error at CMakeLists.txt:233 (add_subdirectory): The source directory

/home/darltrash/Escritorio/bitsaaah/lovr-master/deps/openvr

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:234 (set_target_properties): set_target_properties Can not find target to add properties to: openvr_api

-- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Configuring incomplete, errors occurred! See also "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeOutput.log". See also "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeError.log".

The "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeError.log" file (i translated some parts because some of them were in spanish):

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_84ce4/fast && /usr/bin/make -f CMakeFiles/cmTC_84ce4.dir/build.make CMakeFiles/cmTC_84ce4.dir/build make[1]: Entering directory '/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_84ce4.dir/src.c.o /usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_84ce4.dir/src.c.o -c /home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_84ce4 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84ce4.dir/link.txt --verbose=1 /usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_84ce4.dir/src.c.o -o cmTC_84ce4 /usr/bin/ld: CMakeFiles/cmTC_84ce4.dir/src.c.o: in function main': src.c:(.text+0x3e): reference topthread_create' without being defined /usr/bin/ld: src.c:(.text+0x4a): reference to pthread_detach' without being defined /usr/bin/ld: src.c:(.text+0x5b): reference topthread_join' without being defined collect2: error: ld returned exit state 1 make[1]: [CMakeFiles/cmTC_84ce4.dir/build.make:87: cmTC_84ce4] Error 1 make[1]: Getting out of directory '/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp' make: [Makefile:121: cmTC_84ce4/fast] Error 2

Source file was:

include

void test_func(void data) { return data; }

int main(void) { pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); pthread_detach(thread); pthread_join(thread, NULL); pthread_atfork(NULL, NULL, NULL); pthread_exit(NULL);

return 0; }

The "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeOutput.log" file was too long so i saved it into a pastebin https://pastebin.com/4y99eJWB

Info about my OS:

OS: Manjaro KDE minimal (arch based) CMake version: 3.16.2 Kernel: Linux 5.4.2-1-MANJARO (5.4) Steam: Latest Architecture: x86_64

I really hope this gets fixed soon :(

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bjornbytes/lovr/issues/179?email_source=notifications&email_token=AABVS5QXUQP3OSGU2LA5XLLQ3Y3BLA5CNFSM4KCFSHT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDXQ2FQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABVS5RAWVRNK775TKUV2ZTQ3Y3BLANCNFSM4KCFSHTQ .

darltrash commented 4 years ago

did you remember to init submodules? looks like you have files missing On Thu, Jan 2, 2020 at 11:03 AM Dario @.> wrote: I tried running the compiling code from the documentation ( https://lovr.org/docs/Compiling) But i always get an error: -- The C compiler identification is GNU 9.2.0 -- The CXX compiler identification is GNU 9.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 -- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") CMake Error at CMakeLists.txt:93 (add_subdirectory): The source directory /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/enet does not contain a CMakeLists.txt file. CMake Error at CMakeLists.txt:116 (add_subdirectory): The source directory /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/glfw does not contain a CMakeLists.txt file. CMake Error at CMakeLists.txt:133 (add_subdirectory): The source directory /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/luajit does not chttps://github.com/deepmind/open_spiel/issues/11ontain a CMakeLists.txt file. CMake Error at CMakeLists.txt:157 (add_subdirectory): The source directory /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/msdfgen does not contain a CMakeLists.txt file. CMake Error at CMakeLists.txt:176 (add_subdirectory): The source directory /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/ode does not contain a CMakeLists.txt file. CMake Error at CMakeLists.txt:178 (set_target_properties): set_target_properties Can not find target to add properties to: ode CMake Error at CMakeLists.txt:204 (add_subdirectory): The source directory /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/openal-soft does not contain a CMakeLists.txt file. CMake Warning (dev) at /usr/share/cmake-3.16/Modules/FindOpenGL.cmake:275 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning. FindOpenGL found both a legacy GL library: OPENGL_gl_LIBRARY: /usr/lib/libGL.so and GLVND libraries for OpenGL and GLX: OPENGL_opengl_LIBRARY: /usr/lib/libOpenGL.so OPENGL_glx_LIBRARY: /usr/lib/libGLX.so OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): CMakeLists.txt:216 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Found OpenGL: /usr/lib/libOpenGL.so CMake Error at CMakeLists.txt:233 (add_subdirectory): The source directory /home/darltrash/Escritorio/bitsaaah/lovr-master/deps/openvr does not contain a CMakeLists.txt file. CMake Error at CMakeLists.txt:234 (set_target_properties): set_target_properties Can not find target to add properties to: openvr_api -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Configuring incomplete, errors occurred! See also "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeOutput.log". See also "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeError.log". The "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeError.log" file (i translated some parts because some of them were in spanish): Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/make cmTC_84ce4/fast && /usr/bin/make -f CMakeFiles/cmTC_84ce4.dir/build.make CMakeFiles/cmTC_84ce4.dir/build make[1]: Entering directory '/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_84ce4.dir/src.c.o /usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_84ce4.dir/src.c.o -c /home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_84ce4 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84ce4.dir/link.txt --verbose=1 /usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_84ce4.dir/src.c.o -o cmTC_84ce4 /usr/bin/ld: CMakeFiles/cmTC_84ce4.dir/src.c.o: in function main': src.c:(.text+0x3e): reference topthread_create' without being defined /usr/bin/ld: src.c:(.text+0x4a): reference to pthread_detach' without being defined /usr/bin/ld: src.c:(.text+0x5b): reference topthread_join' without being defined collect2: error: ld returned exit state 1 make[1]: [CMakeFiles/cmTC_84ce4.dir/build.make:87: cmTC_84ce4] Error 1 make[1]: Getting out of directory '/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeTmp' make: ** [Makefile:121: cmTC_84ce4/fast] Error 2 Source file was: #include void test_func(void* data) { return data; } int main(void) { pthread_t thread; pthread_create(&thread, NULL, test_func, NULL); pthread_detach(thread); pthread_join(thread, NULL); pthread_atfork(NULL, NULL, NULL); pthread_exit(NULL); return 0; } The "/home/darltrash/Escritorio/bitsaaah/lovr-master/build/CMakeFiles/CMakeOutput.log" file was too long so i saved it into a pastebin https://pastebin.com/4y99eJWB Info about my OS: OS: Manjaro KDE minimal (arch based) CMake version: 3.16.2 Kernel: Linux 5.4.2-1-MANJARO (5.4) Steam: Latest Architecture: x86_64 I really hope this gets fixed soon :( — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#179?email_source=notifications&email_token=AABVS5QXUQP3OSGU2LA5XLLQ3Y3BLA5CNFSM4KCFSHT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDXQ2FQ>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABVS5RAWVRNK775TKUV2ZTQ3Y3BLANCNFSM4KCFSHTQ .

Yeah it was the submodules. Final code:

git clone https://github.com/bjornbytes/lovr
git submodule init
git submodule update
cd lovr
mkdir build
cd build
cmake ..
cmake --build .