Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Error compiling objects for extension when run setup.py build_ext #147

Open
18589 opened this issue May 29, 2021 · 1 comment

Comments

@18589
Copy link

18589 commented May 29, 2021

Ubuntu 18 cuda 11, pytorch 1.7, who can help me?
running build_ext
building 'pointnet2.ext' extension
Emitting ninja build file /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/8] :/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/ball_query_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/ball_query_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
_ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/ball_query_gpu.o
:/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/ball_query_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/ball_query_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
_ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
/bin/sh: 1: :/usr/local/cuda:/usr/local/cuda/bin/nvcc: not found
[2/8] :/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/group_points_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/group_points_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/group_points_gpu.o
:/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/group_points_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/group_points_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
_ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
/bin/sh: 1: :/usr/local/cuda:/usr/local/cuda/bin/nvcc: not found
[3/8] :/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/interpolate_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/interpolate_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/interpolate_gpu.o
:/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/interpolate_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/interpolate_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
_ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
/bin/sh: 1: :/usr/local/cuda:/usr/local/cuda/bin/nvcc: not found
[4/8] :/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/sampling_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/sampling_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/sampling_gpu.o
:/usr/local/cuda:/usr/local/cuda/bin/nvcc -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/ext-src/src/sampling_gpu.cu' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/ext-src/src/sampling_gpu.o' -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
_ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
/bin/sh: 1: :/usr/local/cuda:/usr/local/cuda/bin/nvcc: not found
[5/8] c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/group_points.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/group_points.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/group_points.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/group_points.o
c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/group_points.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/group_points.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/group_points.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149:0,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:12,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/group_points.h:2,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/group_points.cpp:1:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)

In file included from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/utils.h:2:0,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/group_points.cpp:2:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: 没有那个文件或目录
#include <cuda_runtime_api.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[6/8] c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/sampling.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/sampling.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/sampling.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/sampling.o
c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/sampling.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/sampling.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/sampling.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149:0,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:12,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/sampling.h:2,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/sampling.cpp:1:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)

In file included from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/utils.h:2:0,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/sampling.cpp:2:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: 没有那个文件或目录
#include <cuda_runtime_api.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[7/8] c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/ball_query.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/ball_query.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/ball_query.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/ball_query.o
c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/ball_query.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/ball_query.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/ball_query.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149:0,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:12,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/ball_query.h:2,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/ball_query.cpp:1:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)

In file included from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/utils.h:2:0,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/ball_query.cpp:2:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: 没有那个文件或目录
#include <cuda_runtime_api.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[8/8] c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/interpolate.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/interpolate.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/interpolate.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/interpolate.o
c++ -MMD -MF '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/interpolate.o'.d -pthread -B /home/lem/anaconda3/envs/pointnet2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/TH -I/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda:/usr/local/cuda/include -I/home/lem/anaconda3/envs/pointnet2/include/python3.7m -c -c '/home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/interpolate.cpp' -o '/home/lem/桌面/newProject1/Pointnet2_PyTorch/build/temp.linux-x86_64-3.7/pointnet2/_ext-src/src/interpolate.o' -O2 -Ipointnet2/_ext-src/include -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149:0,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:12,
from /home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/torch/extension.h:4,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/interpolate.h:3,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/interpolate.cpp:1:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/ParallelOpenMP.h:84:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for if ((end - begin) >= grain_size)

In file included from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/utils.h:2:0,
from /home/lem/桌面/newProject1/Pointnet2_PyTorch/pointnet2/_ext-src/src/interpolate.cpp:2:
/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:10: fatal error: cuda_runtime_api.h: 没有那个文件或目录
#include <cuda_runtime_api.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1522, in _run_ninja_build
env=env)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
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 "setup.py", line 39, in
cmdclass={"build_ext": BuildExtension},
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 653, in build_extensions
build_ext.build_extensions(self)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
depends=ext.depends)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 482, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/home/lem/anaconda3/envs/pointnet2/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1538, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

@lwyfish
Copy link

lwyfish commented Dec 18, 2022

我也遇到这个问题了,请问解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants