I run pip install git+https://github.com/ashawkey/cubvh to install cubvh.
I have updated eigen to 3.3.7 by running sudo apt install libeigen3-dev.
I successfully install cubvh in virtual environment (python3.8+cuda11.7+torch2.0.0).
However, I fail to install cubvh in virtual environment (python3.8+cuda11.3+torch1.12.0).
Error message:
pip install git+https://github.com/ashawkey/cubvh
Collecting git+https://github.com/ashawkey/cubvh
Cloning https://github.com/ashawkey/cubvh to /tmp/pip-req-build-0bzjdsmk
Running command git clone --filter=blob:none --quiet https://github.com/ashawkey/cubvh /tmp/pip-req-build-0bzjdsmk
Resolved https://github.com/ashawkey/cubvh to commit 7f935a0fd3d8168c45b671f3e9cff9b206fdf32b
Running command git submodule update --init --recursive -q
Preparing metadata (setup.py) ... done
Requirement already satisfied: ninja in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (1.11.1.1)
Requirement already satisfied: pybind11 in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (2.13.5)
Requirement already satisfied: trimesh in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (4.4.0)
Requirement already satisfied: torch in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (1.12.0+cu113)
Requirement already satisfied: numpy in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from cubvh==0.1.0) (1.24.4)
Requirement already satisfied: typing-extensions in ./Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages (from torch->cubvh==0.1.0) (4.11.0)
Building wheels for collected packages: cubvh
Building wheel for cubvh (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [117 lines of output]
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Mar_21_19:15:46_PDT_2021
Cuda compilation tools, release 11.3, V11.3.58
Build cuda_11.3.r11.3/compiler.29745058_0
Detected CUDA version 11.3
Targeting C++ standard 17
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/cubvh
copying cubvh/__init__.py -> build/lib.linux-x86_64-3.8/cubvh
copying cubvh/api.py -> build/lib.linux-x86_64-3.8/cubvh
running build_ext
creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8
creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp
creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk
creating /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src
Emitting ninja build file /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/3] /usr/local/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/bvh.cu -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bvh.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -std=c++17 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86
/tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(142): warning: 'long double' is treated as 'double' in device code
/tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(144): warning: 'long double' is treated as 'double' in device code
[2/3] c++ -MMD -MF /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o.d -pthread -B /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/bindings.cpp -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0
FAILED: /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o
c++ -MMD -MF /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o.d -pthread -B /data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/bindings.cpp -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/bindings.o -std=c++17 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /tmp/pip-req-build-0bzjdsmk/src/bindings.cpp:5:
/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h: In member function ‘bool pybind11::detail::type_caster<Type, typename std::enable_if<decltype (pybind11::detail::is_template_base_of_impl<Eigen::SparseMatrixBase>::check((typename pybind11::detail::intrinsic_type<T>::type*)(nullptr)))::value, void>::type>::load(pybind11::handle, bool)’:
/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h:573:24: error: ‘MappedSparseMatrix’ is not a member of ‘Eigen’; did you mean ‘SparseMatrix’?
573 | value = Eigen::MappedSparseMatrix<Scalar, Type::Flags, StorageIndex>(
| ^~~~~~~~~~~~~~~~~~
| SparseMatrix
/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h:573:49: error: expected primary-expression before ‘,’ token
573 | value = Eigen::MappedSparseMatrix<Scalar, Type::Flags, StorageIndex>(
| ^
/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/pybind11/eigen.h:573:76: error: expected primary-expression before ‘>’ token
573 | value = Eigen::MappedSparseMatrix<Scalar, Type::Flags, StorageIndex>(
| ^
[3/3] /usr/local/cuda-11.3/bin/nvcc -I/tmp/pip-req-build-0bzjdsmk/include -I/tmp/pip-req-build-0bzjdsmk/third_party/eigen -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/TH -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-11.3/include -I/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/include/python3.8 -c -c /tmp/pip-req-build-0bzjdsmk/src/api.cu -o /tmp/pip-req-build-0bzjdsmk/build/temp.linux-x86_64-3.8/tmp/pip-req-build-0bzjdsmk/src/api.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -std=c++17 --extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -Xcompiler=-Wno-float-conversion -Xcompiler=-fno-strict-aliasing -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86
/tmp/pip-req-build-0bzjdsmk/src/api.cu:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
/tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(142): warning: 'long double' is treated as 'double' in device code
/tmp/pip-req-build-0bzjdsmk/third_party/eigen/Eigen/src/Core/RandomImpl.h(144): warning: 'long double' is treated as 'double' in device code
/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign
/tmp/pip-req-build-0bzjdsmk/src/api.cu:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/include/c10/core/SymInt.h(84): warning: integer conversion resulted in a change of sign
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
subprocess.run(
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-0bzjdsmk/setup.py", line 77, in <module>
setup(
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 368, in run
self.run_command("build")
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
build_ext.build_extensions(self)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/data1/SunXiaoKun/Others/Software/anaconda3/envs/cd113py38tc112/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cubvh
Running setup.py clean for cubvh
Failed to build cubvh
ERROR: Could not build wheels for cubvh, which is required to install pyproject.toml-based projects
I run
pip install git+https://github.com/ashawkey/cubvh
to install cubvh. I have updated eigen to 3.3.7 by runningsudo apt install libeigen3-dev
. I successfully install cubvh in virtual environment (python3.8+cuda11.7+torch2.0.0). However, I fail to install cubvh in virtual environment (python3.8+cuda11.3+torch1.12.0). Error message:Why? Looking forward to your reply!