python setup.py bdist_wheel failed
See original GitHub issueFirst of all, thank you very much for your code.I have a problem when running the command python setup.py bdist_wheel .Although I followed the instructions in #78 and #70 by @MartinHahner, #21, #167 , it did not work.Then I rummaged through almost all the problems, but I didn’t solve it.I would appreciate it if you can help me.My environment is as follows:
OS version:Ubuntu 18.04
GPU name:TITAN V
CUDA version:9.2
Pytorch:1.1
Python:3.6
gcc version:7.5.0

running bdist_wheel running build running build_py running build_ext /home/gye/PointCloud/objectDetection/spconv_8da6f96/build/lib.linux-x86_64-3.6 Release – The CUDA compiler identification is unknown – Check for working CUDA compiler: /home/gye/anaconda3/envs/cuda92/bin/nvcc – Check for working CUDA compiler: /home/gye/anaconda3/envs/cuda92/bin/nvcc – broken CMake Error at /home/gye/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.13/Modules/CMakeTestCUDACompiler.cmake:46 (message): The CUDA compiler
"/home/gye/anaconda3/envs/cuda92/bin/nvcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_cd192/fast"
/usr/bin/make -f CMakeFiles/cmTC_cd192.dir/build.make CMakeFiles/cmTC_cd192.dir/build
make[1]: 进入目录“/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp”
Building CUDA object CMakeFiles/cmTC_cd192.dir/main.cu.o
/home/gye/anaconda3/envs/cuda92/bin/nvcc "--expt-relaxed-constexpr" -x cu -c /home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_cd192.dir/main.cu.o
Linking CUDA device code CMakeFiles/cmTC_cd192.dir/cmake_device_link.o
/home/gye/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cd192.dir/dlink.txt --verbose=1
/home/gye/anaconda3/envs/cuda92/bin/nvcc "--expt-relaxed-constexpr" -shared -dlink CMakeFiles/cmTC_cd192.dir/main.cu.o -o CMakeFiles/cmTC_cd192.dir/cmake_device_link.o
Linking CUDA executable cmTC_cd192
/home/gye/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cd192.dir/link.txt --verbose=1
"" CMakeFiles/cmTC_cd192.dir/main.cu.o CMakeFiles/cmTC_cd192.dir/cmake_device_link.o -o cmTC_cd192
Error running link command: No such file or directory
CMakeFiles/cmTC_cd192.dir/build.make:105: recipe for target 'cmTC_cd192' failed
make[1]: *** [cmTC_cd192] Error 2
make[1]: 离开目录“/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeTmp”
Makefile:121: recipe for target 'cmTC_cd192/fast' failed
make: *** [cmTC_cd192/fast] Error 2
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)
– Configuring incomplete, errors occurred! See also “/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log”. See also “/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeError.log”. Traceback (most recent call last): File “setup.py”, line 103, in <module> zip_safe=False, File “/home/gye/anaconda3/envs/spconv/lib/python3.6/site-packages/setuptools/init.py”, line 163, in setup return distutils.core.setup(**attrs) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/core.py”, line 148, in setup dist.run_commands() File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 955, in run_commands self.run_command(cmd) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “/home/gye/anaconda3/envs/spconv/lib/python3.6/site-packages/wheel/bdist_wheel.py”, line 290, in run self.run_command(‘build’) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/cmd.py”, line 313, in run_command self.distribution.run_command(command) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/command/build.py”, line 135, in run self.run_command(cmd_name) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/cmd.py”, line 313, in run_command self.distribution.run_command(command) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/distutils/dist.py”, line 974, in run_command cmd_obj.run() File “setup.py”, line 39, in run self.build_extension(ext) File “setup.py”, line 71, in build_extension subprocess.check_call([‘cmake’, ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env) File “/home/gye/anaconda3/envs/spconv/lib/python3.6/subprocess.py”, line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘[‘cmake’, ‘/home/gye/PointCloud/objectDetection/spconv_8da6f96’, ‘-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/gye/PointCloud/objectDetection/spconv_8da6f96/build/lib.linux-x86_64-3.6/spconv’, ‘-DCMAKE_PREFIX_PATH=/home/gye/anaconda3/envs/spconv/lib/python3.6/site-packages/torch’, ‘-DPYBIND11_PYTHON_VERSION=3.6’, ‘-DSPCONV_BuildTests=OFF’, ‘-DCMAKE_CUDA_FLAGS=“–expt-relaxed-constexpr”’, ‘-DCMAKE_BUILD_TYPE=Release’, ‘-DCMAKE_CUDA_COMPILER:FILEPATH=/home/gye/anaconda3/envs/cuda92/bin/nvcc’]’ returned non-zero exit status 1.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14
Top Related StackOverflow Question
It is caused by the version of g++.When I change the g++ version from 4.8.5 to 7,it was solved.So the error that “g++: error: unrecognized command line option ‘-std=c++14’” means the version of g++ is too low,because -std=c++14 requires g++5.2 or more.
Putting my solution for reference.
I got this error because I had previously compiled a different version of spconv and was reusing the build folder. Removing the build folder and building the wheel again from scratch solved the issue.