Open3D
Open3D copied to clipboard
Cannot compile on jetson nano with cuda on
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (for
masterbranch).
Steps to reproduce the issue
I first cloned Open3D by:
git clone https://github.com/isl-org/Open3D.git
cd Open3D
Then, I build Open3D (on Ubuntu 20.04, with CUDA 11.5) with:
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_CUDA_MODULE=OFF -DUSE_BLAS=ON -DBUILD_WEBRTC=OFF ..
make -j$(nproc)
Error message
CMake Deprecation Warning at CMakeLists.txt:170 (cmake_policy):
The OLD behavior for policy CMP0072 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Open3D 0.15.2+b15f8af00
-- Using security hardening compiler flags: $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-fstack-protector-strong,-Wformat,-Wformat-security>;$<$<COMPILE_LANGUAGE:CXX>:-fstack-protector-strong;-Wformat;-Wformat-security>
-- Using security hardening linker flags: $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-Wl,-z,noexecstack,-Wl,-z,relro,-z,now,$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-pie>,$<$<CONFIG:Release>:LINKER:--strip-debug>>;$<$<COMPILE_LANGUAGE:CXX>:-Wl,-z,noexecstack;-Wl,-z,relro,-z,now;$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-pie>;$<$<CONFIG:Release>:LINKER:--strip-debug>>
-- Using security hardening compiler definitions: _FORTIFY_SOURCE=2
-- Building with detected architectures
-- Using CUDA architectures: 53-real
-- The CUDA compiler identification is unknown
CMake Error at /usr/local/share/cmake-3.23/Modules/CMakeDetermineCUDACompiler.cmake:653 (message):
The CMAKE_CUDA_ARCHITECTURES:
53
do not all work with this compiler. Try:
instead.
Call Stack (most recent call first):
CMakeLists.txt:368 (enable_language)
-- Configuring incomplete, errors occurred!
Open3D, Python and System information
- Operating system: Ubuntu 20.04 / macOS 10.15 / Windows 10 64-bit
- Python version: Python 3.8 / output from `import sys; print(sys.version)`
- Open3D version: output from python: `print(open3d.__version__)`
- System architecture: x86 / arm64 / apple-silicon / jetson / rpi
- Is this a remote workstation?: yes or no
- How did you install Open3D?: pip / conda / build from source
- Compiler version (if built from source): gcc 7.5 / clang 7.0
Additional information
cmake
-DBUILD_GUI=ON
-DBUILD_CUDA_MODULE=ON
-DPYTHON_EXECUTABLE=$(which python3)
-DBUILD_LIBREALSENSE=ON
..
jetson nao ubuntu18.04 Open3D 0.15.2 b15f8af00
Change this line: https://github.com/isl-org/Open3D/blob/b15f8af00c57d7b398ce37cf907572750b7b89a3/CMakeLists.txt#L365
to more modern CUDA versions.
Try one of the followings:
set(CMAKE_CUDA_ARCHITECTURES 50-real)set(CMAKE_CUDA_ARCHITECTURES 60-real)set(CMAKE_CUDA_ARCHITECTURES 70-real)set(CMAKE_CUDA_ARCHITECTURES 72-real)set(CMAKE_CUDA_ARCHITECTURES 80-real)
I don't know which one will work. Let us know what you find.
I solved this problem,the reason is that cuda is not set