liutinglt / CE2P

214 stars 41 forks source link

error when running build.py #23

Closed liiiiiiiiil closed 5 years ago

liiiiiiiiil commented 5 years ago

generating /tmp/tmp8wq9dcv2/__ext.c setting the current directory to '/tmp/tmp8wq9dcv2' running build_ext building 'ext' extension creating mnt creating mnt/disk1 creating mnt/disk1/lihao creating mnt/disk1/lihao/CE2P creating mnt/disk1/lihao/CE2P/libs creating mnt/disk1/lihao/CE2P/libs/src gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/usr/local/include/python3.6m -c ext.c -o ./ext.o -std=c99 -std=c++11 cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C In file included from /mnt/disk1/lihao/6virt/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THC.h:4:0, from ext.c:493: /mnt/disk1/lihao/6virt/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC/THCGeneral.h:12:18: fatal error: cuda.h: No such file or directory compilation terminated. Traceback (most recent call last): File "/usr/local/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile extra_postargs) File "/usr/local/lib/python3.6/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/local/lib/python3.6/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/local/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 "/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build dist.run_command('build_ext') File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/distutils/command/build_ext.py", line 339, in run self.build_extensions() File "/usr/local/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions self._build_extensions_serial() File "/usr/local/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial self.build_extension(ext) File "/usr/local/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension depends=ext.depends) File "/usr/local/lib/python3.6/distutils/ccompiler.py", line 574, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/local/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile raise CompileError(msg) distutils.errors.CompileError: 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 24, in ffi.build() File "/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build _build_extension(ffi, cffi_wrapper_name, target_dir, verbose) File "/mnt/disk1/lihao/6virt/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 "/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/cffi/api.py", line 723, in compile compiler_verbose=verbose, debug=debug, **kwds) File "/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/cffi/recompiler.py", line 1526, in recompile compiler_verbose, debug) File "/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug) File "/mnt/disk1/lihao/6virt/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build raise VerificationError('%s: %s' % (e.class.name, e)) cffi.VerificationError: CompileError: command 'gcc' failed with exit status 1

My server: Ubuntu 16.04 gcc5.4.0 cuda-9.0 python3.6 torch0.4.1

liiiiiiiiil commented 5 years ago

It's the error of cuda path

Zoesxw commented 5 years ago

It's the error of cuda path

I also encountered this problem, can you tell me specifically?