habitat-sim icon indicating copy to clipboard operation
habitat-sim copied to clipboard

Error when building from source with CUDA

Open doudoudou1999 opened this issue 3 years ago • 2 comments

when i build from source via this command:

python setup.py install --audio --headless --with-cuda --bullet

The ERROR is:

check.warn(importable) running build_ext CMake Error at /home/gyx/anaconda3/envs/habitat/share/cmake-3.24/Modules/CMakeDetermineCUDACompiler.cmake:277 (message): CMAKE_CUDA_ARCHITECTURES must be non-empty if set. Call Stack (most recent call first): CMakeLists.txt:12 (project)

-- Configuring incomplete, errors occurred! See also "/home/gyx/habitat-lab/habitat-sim/build/CMakeFiles/CMakeOutput.log". See also "/home/gyx/habitat-lab/habitat-sim/build/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "setup.py", line 484, in include_package_data=True, File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands self.run_command(cmd) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/command/install.py", line 74, in run self.do_egg_install() File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/command/install.py", line 123, in do_egg_install self.run_command('bdist_egg') File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 165, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 151, in call_command self.run_command(cmdname) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/command/install_lib.py", line 112, in build self.run_command('build_ext') File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "setup.py", line 271, in run self.build_extension(ext) File "setup.py", line 377, in build_extension cwd=self.build_temp, File "/home/gyx/anaconda3/envs/habitat/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '-DBUILD_PYTHON_BINDINGS=ON', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/gyx/habitat-lab/habitat-sim/build/lib.linux-x86_64-cpython-37/habitat_sim/_ext', '-DPYTHON_EXECUTABLE=/home/gyx/anaconda3/envs/habitat/bin/python', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DREL_BUILD_RPATH=ON', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DBUILD_GUI_VIEWERS=OFF', '-DTARGET_HEADLESS=ON', '-DBUILD_TEST=OFF', '-DBUILD_WITH_BULLET=ON', '-DBUILD_WITH_VHACD=OFF', '-DBUILD_DATATOOL=OFF', '-DBUILD_WITH_CUDA=ON', '-DBUILD_BASIS_COMPRESSOR=OFF', '-DBUILD_WITH_AUDIO=ON', '/home/gyx/habitat-lab/habitat-sim/src']' returned non-zero exit status 1.

cmake version 3.24.0

the device info is NVIDIA-SMI 510.47.03 Driver Version: 510.47.03 CUDA Version: 11.6

So how to fix this problem?

Thanks a lot!

doudoudou1999 avatar Sep 06 '22 08:09 doudoudou1999

@ChanganVR

dhruvbatra avatar Sep 06 '22 10:09 dhruvbatra

Hey @doudoudou1999, Looks like your system is having trouble finding the CUDA compiler. It could be that you need developer libraries which are missing, or your compiler system setup is non-standard.

Can you install correctly without --with-cuda? What about without --audio?

aclegg3 avatar Sep 06 '22 16:09 aclegg3