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

Externals compilation, checkout fail #984

Closed Niwol closed 2 years ago

Niwol commented 2 years ago

Hello, I am trying to compile the radium externals as described in the documentation and I get this error

lowin@lowin-pc:~/Documents/projects/univ/Radium/Radium-external/build/Release$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/lowin/Documents/projects/univ/Radium/Radium-external/install/Release/ /home/lowin/Documents/projects/univ/Radium/Radium-Engine/external/
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is Clang 14.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 
--     == radium_externals Project configuration ==
-- 
-- Externals will be built with 8 core(s)
-- Set install prefix to /home/lowin/Documents/projects/univ/Radium/Radium-external/install/Release
-- Found Git: /usr/bin/git (found version "2.34.1") 
--  Using eigen3 from remote git
--  Using OpenMesh from remote git
--  Using cpplocate from remote git
-- [CoreExternal] Using nlohmann_json from remote git
-- [EngineExternal] Using glm from remote git
-- [EngineExternal] Using glbinding from remote git
-- globjects use bundled eigen3
--  Using globjects from remote git
--  Using stb from remote git
-- [EngineExternal] Using tinyEXR from remote git
-- [IOExternal] Using assimp from remote git
--  Using tinyply from remote git
-- Set install prefix to /home/lowin/Documents/projects/univ/Radium/Radium-external/install/Release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lowin/Documents/projects/univ/Radium/Radium-external/build/Release
lowin@lowin-pc:~/Documents/projects/univ/Radium/Radium-external/build/Release$ make
[  1%] Creating directories for 'nlohmann_json'
[  3%] Performing download step (git clone) for 'nlohmann_json'
Cloning into 'nlohmann_json'...
remote: Enumerating objects: 7977, done.        
remote: Counting objects: 100% (7977/7977), done.        
remote: Compressing objects: 100% (4403/4403), done.        
remote: Total 7977 (delta 4264), reused 5812 (delta 2506), pack-reused 0        
Receiving objects: 100% (7977/7977), 154.11 MiB | 360.00 KiB/s, done.
Resolving deltas: 100% (4264/4264), done.
fatal: invalid reference: release/3.10.5
CMake Error at /home/lowin/Documents/projects/univ/Radium/Radium-external/build/Release/Core/nlohmann_json-prefix/tmp/nlohmann_json-gitclone.cmake:40 (message):
  Failed to checkout tag: 'release/3.10.5'

make[2]: *** [Core/CMakeFiles/nlohmann_json.dir/build.make:98: Core/nlohmann_json-prefix/src/nlohmann_json-stamp/nlohmann_json-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:353: Core/CMakeFiles/nlohmann_json.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

I am trying to do this on a relatively fresh installation of Ubuntu 22.04.1 LTS. I never had this issue befor so i am not sure if this is a problem with my computer or comes from Radium.

dlyr commented 2 years ago

Seems like https://github.com/nlohmann/json/ branch release/3.10.5 have been deleted. Quick fix: edit external/Core/CMakeLists.txt and change line 84 from GIT_TAG release/3.10.5 to GIT_TAG tags/v3.10.5 should solve the problem (PR welcome if it solve your problem).

dlyr commented 2 years ago

Seems like https://github.com/nlohmann/json/ branch release/3.10.5 have been deleted. Quick fix: edit external/Core/CMakeLists.txt and change line 84 from GIT_TAG release/3.10.5 to GIT_TAG tags/v3.10.5 should solve the problem (PR welcome if it solve your problem).

Niwol commented 2 years ago

This fixed this issue and the PR is done (I hope it satisfies the requirements)

I have another problem with tinyEXR know tho, I'm not sure if this is related

Cloning into 'tinyEXR'...
remote: Enumerating objects: 637, done.        
remote: Counting objects: 100% (637/637), done.        
remote: Compressing objects: 100% (491/491), done.        
remote: Total 637 (delta 252), reused 460 (delta 120), pack-reused 0        
Receiving objects: 100% (637/637), 22.58 MiB | 101.00 KiB/s, done.
Resolving deltas: 100% (252/252), done.
HEAD is now at a9cea1c fix install on windows
Submodule 'deps/ZFP' (https://github.com/LLNL/ZFP.git) registered for path 'deps/ZFP'
Cloning into '/home/lowin/Documents/projects/univ/Radium/Radium-external/build/Release/Engine/tinyEXR-prefix/src/tinyEXR/deps/ZFP'...
Submodule path 'deps/ZFP': checked out 'a26be7c44ed4920e0fa27ef9562dc06d7d87b1b8'
[ 37%] Performing update step for 'tinyEXR'
HEAD is now at a9cea1c fix install on windows
[ 39%] No patch step for 'tinyEXR'
[ 39%] Performing configure step for 'tinyEXR'
Not searching for unused variables given on the command line.
-- --The CXX compiler identification is Clang 14.0.0
-- --Detecting CXX compiler ABI info
-- --Detecting CXX compiler ABI info - done
-- --Check for working CXX compiler: /usr/bin/c++ - skipped
-- --Detecting CXX compile features
-- --Detecting CXX compile features - done
-- --tinyEXR uses miniz
-- --The C compiler identification is GNU 11.2.0
-- --Detecting C compiler ABI info
-- --Detecting C compiler ABI info - done
-- --Check for working C compiler: /usr/bin/cc - skipped
-- --Detecting C compile features
-- --Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lowin/Documents/projects/univ/Radium/Radium-external/build/Release/Engine/tinyEXR-prefix/src/tinyEXR-build
[ 41%] Performing build step for 'tinyEXR'
[ 25%] Building C object CMakeFiles/miniz.dir/deps/miniz/miniz.c.o
/home/lowin/Documents/projects/univ/Radium/Radium-external/build/Release/Engine/tinyEXR-prefix/src/tinyEXR/deps/miniz/miniz.c:3089:9: note: ‘#pragma message: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.’
 3089 | #pragma message("Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.")
      |         ^~~~~~~
[ 50%] Linking C static library libminiz.a
[ 50%] Built target miniz
[ 75%] Building CXX object CMakeFiles/tinyEXR.dir/tinyexr.cc.o
[100%] Linking CXX shared library libtinyEXR.so
/usr/bin/ld: libminiz.a(miniz.c.o): warning: relocation against `miniz_def_free_func' in read-only section `.text'
/usr/bin/ld: libminiz.a(miniz.c.o): relocation R_X86_64_PC32 against symbol `miniz_def_realloc_func' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [CMakeFiles/tinyEXR.dir/build.make:98: libtinyEXR.so] Error 1
make[4]: *** [CMakeFiles/Makefile2:111: CMakeFiles/tinyEXR.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [Engine/CMakeFiles/tinyEXR.dir/build.make:86: Engine/tinyEXR-prefix/src/tinyEXR-stamp/tinyEXR-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:676: Engine/CMakeFiles/tinyEXR.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
dlyr commented 2 years ago

Seems tinyEXR issue is not related, do you still have the issue ? On my system (Debian GNU/Linux 11 (bullseye)) I have the following output for tinyEXR build

[ 35%] Creating directories for 'tinyEXR'
[ 37%] Performing download step (git clone) for 'tinyEXR'
Cloning into 'tinyEXR'...
remote: Enumerating objects: 637, done.        
remote: Counting objects: 100% (637/637), done.        
remote: Compressing objects: 100% (491/491), done.        
remote: Total 637 (delta 252), reused 460 (delta 120), pack-reused 0        
Receiving objects: 100% (637/637), 22.58 MiB | 10.74 MiB/s, done.
Resolving deltas: 100% (252/252), done.
HEAD is now at a9cea1c fix install on windows
Submodule 'deps/ZFP' (https://github.com/LLNL/ZFP.git) registered for path 'deps/ZFP'
Cloning into '/build-dir/Engine/tinyEXR-prefix/src/tinyEXR/deps/ZFP'...
Submodule path 'deps/ZFP': checked out 'a26be7c44ed4920e0fa27ef9562dc06d7d87b1b8'
[ 37%] Performing update step for 'tinyEXR'
HEAD is now at a9cea1c fix install on windows
[ 39%] No patch step for 'tinyEXR'
[ 39%] Performing configure step for 'tinyEXR'
Not searching for unused variables given on the command line.
-- --The CXX compiler identification is GNU 10.2.1
-- --Detecting CXX compiler ABI info
-- --Detecting CXX compiler ABI info - done
-- --Check for working CXX compiler: /usr/bin/c++ - skipped
-- --Detecting CXX compile features
-- --Detecting CXX compile features - done
-- --tinyEXR uses zlib
-- Configuring done
-- Generating done
-- Build files have been written to: /build-dir/Engine/tinyEXR-prefix/src/tinyEXR-build
[ 41%] Performing build step for 'tinyEXR'
[ 50%] Building CXX object CMakeFiles/tinyEXR.dir/tinyexr.cc.o
[100%] Linking CXX shared library libtinyEXR.so
[100%] Built target tinyEXR
[ 41%] Performing install step for 'tinyEXR'
Consolidate compiler generated dependencies of target tinyEXR
[100%] Built target tinyEXR
Install the project...
-- Install configuration: "Release"
-- Installing: /install-dir/include/tinyEXR/tinyexr.h
-- Installing: /install-dir/share/tinyEXR/cmake/tinyEXRConfig.cmake
-- Installing: /install-dir/share/tinyEXR/cmake/tinyEXRTargets.cmake
-- Installing: /install-dir/share/tinyEXR/cmake/tinyEXRTargets-release.cmake
-- Installing: /install-dir/lib/libtinyEXR.so
[ 43%] Completed 'tinyEXR'
[ 43%] Built target tinyEXR
Niwol commented 2 years ago

yes i still have the same issue

dlyr commented 2 years ago

Ok, I see we have use a forked version of tinyEXR, can you try ton compile from https://github.com/MathiasPaulin/tinyexr/tree/radium and open an issue on MathiasPaulin/tineyexr repo if you have the same issue out of radium external build.

MathiasPaulin commented 2 years ago

@Niwol I've fixed (I hope) your problem. So, you can solve it either by building the TinyEXR external (just delete your build-dir/Engine/tinyEXR-prefix directory and configure/compile your externals again, this will pull and compile only TinyEXR) or install zlib on your system. If this does not solve your problem, open an issue on https://github.com/MathiasPaulin/tinyexr/tree/radium If this fix solved your problem, please close this issue.

Niwol commented 2 years ago

Installing zlib fixed the problem, thank you.