STORM-IRIT / Radium-Engine

Research 3D Engine for rendering, animation and processing
https://storm-irit.github.io/Radium-Engine/
Apache License 2.0
100 stars 50 forks source link

Erreur while configuring the project if I let Radium fetching the dependencies by itself #685

Open Beafantles opened 3 years ago

Beafantles commented 3 years ago

OS: Windows 10 64 bits version 2004 Compiler: Visual Studio 16 2019 (v16.8.5) CMake version: 3.19.4 Ninja version: 1.10.2 Radium-Engine version: I used one of the latest version of Radium, from 9th February (commit 537caae2cf52d36c61864659515ff2aa88fbe242).

I don't have problems building Radium-Engine if I build the dependencies manually before configuring Radium-Engine (and specify them with -Dlib_DIR options), as it is done by the CI system. I have an error if I let Radium-Engine fetching the dependencies by itself though. Indeed, if I run the following command:

cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DQt5_DIR=E:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5 ..

I get the following error message:

CMake Error at E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3116 (get_property):
  get_property could not find TARGET Eigen3.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3433 (_ep_add_configure_command)
  CMakeLists.txt:80 (ExternalProject_Add)

CMake Error at E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3118 (get_property):
  get_property could not find TARGET Eigen3.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3433 (_ep_add_configure_command)
  CMakeLists.txt:80 (ExternalProject_Add)

CMake Error at E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:1730 (get_property):
  get_property could not find TARGET Eigen3.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:2015 (ExternalProject_Get_Property)
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3120 (_ep_get_step_stampfile)
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3433 (_ep_add_configure_command)
  CMakeLists.txt:80 (ExternalProject_Add)

CMake Error at E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:1732 (message):
  External project "Eigen3" has no stamp_dir
Call Stack (most recent call first):
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:2015 (ExternalProject_Get_Property)
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3120 (_ep_get_step_stampfile)
  E:/scoop/apps/cmake/3.19.4/share/cmake-3.19/Modules/ExternalProject.cmake:3433 (_ep_add_configure_command)
  CMakeLists.txt:80 (ExternalProject_Add)

-- Configuring incomplete, errors occurred!
See also "E:/src/Radium-Engine/build/ext/Engine/CMakeFiles/CMakeOutput.log".
CMake Error at cmake/externalFunc.cmake:56 (message):
  Cmake configure step failed.
Call Stack (most recent call first):
  src/Engine/CMakeLists.txt:33 (addExternalFolder)

-- Configuring incomplete, errors occurred!
See also "E:/src/Radium-Engine/build/CMakeFiles/CMakeOutput.log".
See also "E:/src/Radium-Engine/build/CMakeFiles/CMakeError.log".

Here's the full log file for that command: error_log.txt

And here's E:/src/Radium-Engine/build/CMakeFiles/CMakeOutput.log: CMakeOutput.log

And E:/src/Radium-Engine/build/CMakeFiles/CMakeError.log: CMakeError.log

If I don't use Ninja for the configuration, I still have an error, but a different one. Here's the command I tried:

cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=E:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5 ..

And here's the error I get:

CMake Error at Bundle-MSVC/lib/cmake/assimp-5.0/assimpTargets.cmake:85 (message):
  The imported target "assimp::assimp" references the file

     "E:/src/Radium-Engine/Bundle-MSVC/lib/assimp-vc142-mtd.lib"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "E:/src/Radium-Engine/Bundle-MSVC/lib/cmake/assimp-5.0/assimpTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  Bundle-MSVC/lib/cmake/assimp-5.0/assimp-config.cmake:1 (include)
  src/IO/CMakeLists.txt:30 (find_package)

-- Configuring incomplete, errors occurred!
See also "E:/src/Radium-Engine/build/CMakeFiles/CMakeOutput.log".
See also "E:/src/Radium-Engine/build/CMakeFiles/CMakeError.log".

Here's the full log: full_log_not_ninja.txt

And here's E:/src/Radium-Engine/build/CMakeFiles/CMakeOutput.log: CMakeOutput.log

And E:/src/Radium-Engine/build/CMakeFiles/CMakeError.log: CMakeError.log

It seems like it tries to use a Debug version for the Assimp lib, despite the -DCMAKE_BUILD_TYPE=Release (as the d suffix for the .lib file seems to point out). "E:/src/Radium-Engine/Bundle-MSVC/lib/assimp-vc142-mt.lib" exists but "E:/src/Radium-Engine/Bundle-MSVC/lib/assimp-vc142-mtd.lib" does not.

nmellado commented 3 years ago

Thanks for the report. This issue is expected to be fixed by #684, merged in master at a50a3b4 (tag: https://github.com/STORM-IRIT/Radium-Engine/tree/2021-02-10).

Could you please try again if confirm the problem has been fixed ?

Beafantles commented 3 years ago

Alright so I ran git pull and tried configuring the project with both commands once again (cmake -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DQt5_DIR=E:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5 .. and cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=E:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5 ..). Unfortunaly, both of them ended up with an error, the same one:

CMake Error at Bundle-MSVC/lib/cmake/assimp-5.0/assimpTargets.cmake:85 (message):
  The imported target "assimp::assimp" references the file

     "E:/src/Radium-Engine/Bundle-MSVC/lib/assimp-vc142-mtd.lib"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "E:/src/Radium-Engine/Bundle-MSVC/lib/cmake/assimp-5.0/assimpTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  Bundle-MSVC/lib/cmake/assimp-5.0/assimp-config.cmake:1 (include)
  src/IO/CMakeLists.txt:30 (find_package)

-- Configuring incomplete, errors occurred!
See also "E:/src/Radium-Engine/build/CMakeFiles/CMakeOutput.log".
See also "E:/src/Radium-Engine/build/CMakeFiles/CMakeError.log".

The error message when using Ninja has changed.

nmellado commented 3 years ago

Did you erase the cmake cache and build directories before configuring and building again ?

Beafantles commented 3 years ago

Yes, I deleted everything contained in the build directory.

nmellado commented 3 years ago

I switch to bug suspected until we can reproduce this behavior.

dlyr commented 2 years ago

let's say dependencies have to be build beforehand, @nmellado do you agree ? if yes just close the issue