-
Notifications
You must be signed in to change notification settings - Fork 62
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
Which gcc version should be used? #57
Comments
i have the same issue,have you solved it? |
adding more specifically, go to all three
and add the flag so that the |
hello, I modify the .sh as you say, but I get the error "gcc: error:GenRe-ShapeHD/toolbox/calc_prob/calc_prob/src/calc_prob_kernel.cu.o: No such file or directory" "cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1", could you help me, thank you very much. |
hi, I think that sounds like a pytorch version issue. Newer version of pytorch does not support the cffi interface anymore. |
Hi, running build_toolbox.sh, I have the following issue with ubuntu 16.04, cuda 10.1 ( and cuda 9.0) and gcc 5.5.0.
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o calc_prob_kernel.cu.o calc_prob_kernel.cu -x cu -Xcompiler -fPIC -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_61,code=sm_61
In file included from /usr/include/c++/5/type_traits:35:0,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/optional.h:19,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Error.h:4,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Allocator.h:6,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH/THAllocator.h:6,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h:5,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4,
from calc_prob_kernel.cu:1:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support
^
/home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob
generating /tmp/tmp0eb6_ls3/_calc_prob_lib.c
setting the current directory to '/tmp/tmp0eb6_ls3'
running build_ext
building '_calc_prob_lib' extension
creating home
creating home/s
creating home/s/Downloads
creating home/s/Downloads/GenRe-ShapeHD-master
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src
gcc -pthread -B /home/s/anaconda/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src -I/home/s/anaconda/envs/shaperecon/include/python3.6m -c _calc_prob_lib.c -o ./_calc_prob_lib.o -std=c99
gcc -pthread -B /home/s/anaconda/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src -I/home/s/anaconda/envs/shaperecon/include/python3.6m -c /home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src/calc_prob.c -o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src/calc_prob.o -std=c99
gcc -pthread -shared -B /home/s/anaconda/envs/shaperecon/compiler_compat -L/home/s/anaconda/envs/shaperecon/lib -Wl,-rpath=/home/s/anaconda/envs/shaperecon/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_calc_prob_lib.o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src/calc_prob.o /home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src/calc_prob_kernel.cu.o -o ./_calc_prob_lib.so
gcc: error: /home/s/Downloads/GenRe-ShapeHD-master/toolbox/calc_prob/calc_prob/src/calc_prob_kernel.cu.o: No such file or directory
Traceback (most recent call last):
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 197, in link
self.spawn(linker + ld_args)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
target_lang=language)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 199, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "build.py", line 42, in
ext.build()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/api.py", line 727, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/recompiler.py", line 1536, in recompile
compiler_verbose, debug)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o nnd_cuda.cu.o nnd_cuda.cu -x cu -Xcompiler -fPIC -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_61,code=sm_61
Including CUDA code.
/home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance
generating /tmp/tmpfm0jxz10/_my_lib.c
setting the current directory to '/tmp/tmpfm0jxz10'
running build_ext
building '_my_lib' extension
creating home
creating home/s
creating home/s/Downloads
creating home/s/Downloads/GenRe-ShapeHD-master
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src
gcc -pthread -B /home/s/anaconda/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/s/anaconda/envs/shaperecon/include/python3.6m -c _my_lib.c -o ./_my_lib.o -std=c99
gcc -pthread -B /home/s/anaconda/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/s/anaconda/envs/shaperecon/include/python3.6m -c /home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src/my_lib.c -o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src/my_lib.o -std=c99
gcc -pthread -B /home/s/anaconda/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/s/anaconda/envs/shaperecon/include/python3.6m -c /home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src/my_lib_cuda.c -o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src/my_lib_cuda.o -std=c99
gcc -pthread -shared -B /home/s/anaconda/envs/shaperecon/compiler_compat -L/home/s/anaconda/envs/shaperecon/lib -Wl,-rpath=/home/s/anaconda/envs/shaperecon/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_my_lib.o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src/my_lib.o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src/my_lib_cuda.o /home/s/Downloads/GenRe-ShapeHD-master/toolbox/nndistance/src/nnd_cuda.cu.o -o ./_my_lib.so
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o back_projection_kernel.cu.o back_projection_kernel.cu -x cu -Xcompiler -fPIC -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC -I /home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src -I /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_61,code=sm_61
In file included from /usr/include/c++/5/type_traits:35:0,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/optional.h:19,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Error.h:4,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/ATen/Allocator.h:6,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/TH/THAllocator.h:6,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h:5,
from /home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4,
from back_projection_kernel.cu:1:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support
^
/home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp
/home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp
generating /tmp/tmphztmwi5i/_cam_bp_lib.c
setting the current directory to '/tmp/tmphztmwi5i'
running build_ext
building '_cam_bp_lib' extension
creating home
creating home/s
creating home/s/Downloads
creating home/s/Downloads/GenRe-ShapeHD-master
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp
creating home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src
gcc -pthread -B /home/s/anaconda/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src -I/home/s/anaconda/envs/shaperecon/include/python3.6m -c _cam_bp_lib.c -o ./_cam_bp_lib.o -std=c99
gcc -pthread -B /home/s/anaconda/envs/shaperecon/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src -I/home/s/anaconda/envs/shaperecon/include/python3.6m -c /home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src/back_projection.c -o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src/back_projection.o -std=c99
gcc -pthread -shared -B /home/s/anaconda/envs/shaperecon/compiler_compat -L/home/s/anaconda/envs/shaperecon/lib -Wl,-rpath=/home/s/anaconda/envs/shaperecon/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_cam_bp_lib.o ./home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src/back_projection.o /home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src/back_projection_kernel.cu.o -o ./_cam_bp_lib.so
gcc: error: /home/s/Downloads/GenRe-ShapeHD-master/toolbox/cam_bp/cam_bp/src/back_projection_kernel.cu.o: No such file or directory
Traceback (most recent call last):
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 197, in link
self.spawn(linker + ld_args)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
target_lang=language)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/distutils/unixccompiler.py", line 199, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "build.py", line 43, in
ffi.build()
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/api.py", line 727, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/recompiler.py", line 1536, in recompile
compiler_verbose, debug)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/s/anaconda/envs/shaperecon/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1
The text was updated successfully, but these errors were encountered: