MeshLib
MeshLib copied to clipboard
MeshLib could not be built in the ubuntu24 container
I tried to build MeshLib in the provided environment, and it didn't work.
Steps to reproduce
git clone --recurse-submodules https://github.com/MeshInspector/MeshLib.gitdocker build . -f docker/ubuntu24Dockerfile -t meshlibdocker run --rm -it meshliband thencd ~/ && git clone --recurse-submodules https://github.com/MeshInspector/MeshLib.git && cd MeshLib- The following step produces an error:
user@c0b13035bfd1:~/MeshLib$ ./scripts/build_source.sh
Project build script started.
You could find output in /home/user/MeshLib/build_source_22-07-2024_19:01:50.log
Build with emscripten? Press (y) in 5 seconds to build (y/s/N) (s - singlethreaded)
Emscripten OFF, singlethread 0
Build MeshLib Release? Press (n) in 5 seconds to cancel (Y/n)
Release ON
Build MeshLib Debug? Press (y) in 5 seconds to build (y/N)
....
CMake Warning (dev) at source/MRCuda/CMakeLists.txt:16 (find_package):
Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake
--help-policy CMP0146" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find CUDA: Found unsuitable version ".", but required is at least
"12" (found /usr/local/cuda/)
Call Stack (most recent call first):
/usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.28/Modules/FindCUDA.cmake:1291 (find_package_handle_standard_args)
source/MRCuda/CMakeLists.txt:16 (find_package)
- Even if I try to turn the CUDA off, it still doesn't work, building with the following command gives the same error
user@c0b13035bfd1:~/MeshLib$ export MR_CMAKE_OPTIONS="-DCMAKE_POLICY_DEFAULT_CMP0146=OLD -DMESHINSPECTOR_CUDA_SUPPORT=OFF"
As for ubuntu22, an undocumented hack is required to build the library in the container (I found it in the definition of the GitHub actions workflow):
$ ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
$ ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
should be invoked in the root of the repo. Otherwise, some dependencies are not found.