DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D
http://www.reactphysics3d.com
zlib License
1.54k stars 223 forks source link

Cannot compile on Linux Debian #212

Closed rafalbraun closed 3 years ago

rafalbraun commented 3 years ago

After generating config through "ccmake ." and then turning on tests and testbed I got a makefile that caused following error


 CLONE_GIT_SUBMODULES             OFF                                                                                                                                                                             
 CMAKE_BUILD_TYPE                 Release                                                                                                                                                                         
 CMAKE_INSTALL_PREFIX             /usr/local                                                                                                                                                                      
 GLFW_USE_WAYLAND                 OFF                                                                                                                                                                             
 NANOGUI_BACKEND                  OFF                                                                                                                                                                             
 NANOGUI_BUILD_EXAMPLES           OFF                                                                                                                                                                             
 NANOGUI_BUILD_GLAD               OFF                                                                                                                                                                             
 NANOGUI_BUILD_GLFW               ON                                                                                                                                                                              
 NANOGUI_BUILD_PYTHON             OFF                                                                                                                                                                             
 NANOGUI_BUILD_SHARED             OFF                                                                                                                                                                             
 NANOGUI_INSTALL                  OFF                                                                                                                                                                             
 RP3D_CODE_COVERAGE_ENABLED       OFF                                                                                                                                                                             
 RP3D_COMPILE_TESTBED             ON                                                                                                                                                                              
 RP3D_COMPILE_TESTS               ON                                                                                                                                                                              
 RP3D_DOUBLE_PRECISION_ENABLED    ON                                                                                                                                                                              
 RP3D_PROFILING_ENABLED           OFF                                                                                                                                                                             

[-- normal build --]
[ 98%] Building CXX object test/CMakeFiles/tests.dir/Test.cpp.o
[ 99%] Building CXX object test/CMakeFiles/tests.dir/TestSuite.cpp.o
[100%] Linking CXX executable tests
/usr/bin/ld: cannot open output file tests: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/tests.dir/build.make:115: test/tests] Error 1
make[1]: *** [CMakeFiles/Makefile2:389: test/CMakeFiles/tests.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

$ ls
CHANGELOG.md    CMakeFiles           CMakeLists.txt  CTestTestfile.cmake  FUNDING.yml            helloworld  install_manifest.txt  LICENSE   ReactPhysics3DConfigVersion.cmake  src   testbed  VERSION
CMakeCache.txt  cmake_install.cmake  CMakeModules    documentation        GenerateNewVersion.py  include     libreactphysics3d.a   Makefile  README.md
DanielChappuis commented 3 years ago

Hello.

Can you try not to build the library in the source folder? I mean, could you try to first create a 'reactphysics3d-build' directory, and then build the library inside it with the following commands instead?

mkdir reactphysics3d-build
cd reactphysics3d-build
ccmake <path-to-reactphysics3d-source-folder>

Let me know if you still have an error.

DanielChappuis commented 3 years ago

Have you been able resolve your issue?

rafalbraun commented 3 years ago

Hello. Unfortunately no. The output was as below

$ reactphysics3d/reactphysics3d-build$ ccmake ../src/

 CMake Error: The source directory "reactphysics3d/src" does not appear to contain CMakeLists.txt.
 Specify --help for usage, or press the help button on the CMake GUI.
DanielChappuis commented 3 years ago

As described in the documentation here, you need to use the reactphysics3d/ folder you have cloned with the 'ccmake' command, not the src/ folder. Moreover, you should not have a ../src folder in the parent directory of reactphysics3d-buid.

Here are all the commands you need to use:

git clone git@github.com:DanielChappuis/reactphysics3d.git
mkdir reactphysics3d-build
cd reactphysics3d-build
ccmake ../reactphysics3d
DanielChappuis commented 3 years ago

Have you been able to build the library?

DanielChappuis commented 3 years ago

I am closing this issue. Feel free to reopen it if necessary.