{"action":"created","issue":{"url":"https://api.github.com/repos/jwyang/faster-rcnn.pytorch/issues/246","repository_url":"https://api.github.com/repos/jwyang/faster-rcnn.pytorch","labels_url":"https://api.github.com/repos/jwyang/faster-rcnn.pytorch/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/jwyang/faster-rcnn.pytorch/issues/246/comments","events_url":"https://api.github.com/repos/jwyang/faster-rcnn.pytorch/issues/246/events","html_url":"https://github.com/jwyang/faster-rcnn.pytorch/issues/246","id":341739386,"node_id":"MDU6SXNzdWUzNDE3MzkzODY=","number":246,"title":"gcc failing","user":{"login":"kalyanb29","id":10346518,"node_id":"MDQ6VXNlcjEwMzQ2NTE4","avatar_url":"https://avatars0.githubusercontent.com/u/10346518?v=4","gravatar_id":"","url":"https://api.github.com/users/kalyanb29","html_url":"https://github.com/kalyanb29","followers_url":"https://api.github.com/users/kalyanb29/followers","following_url":"https://api.github.com/users/kalyanb29/following{/other_user}","gists_url":"https://api.github.com/users/kalyanb29/gists{/gist_id}","starred_url":"https://api.github.com/users/kalyanb29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalyanb29/subscriptions","organizations_url":"https://api.github.com/users/kalyanb29/orgs","repos_url":"https://api.github.com/users/kalyanb29/repos","events_url":"https://api.github.com/users/kalyanb29/events{/privacy}","received_events_url":"https://api.github.com/users/kalyanb29/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-17T02:08:21Z","updated_at":"2018-07-17T04:44:23Z","closed_at":"2018-07-17T04:44:23Z","author_association":"NONE","body":"Hi,\r\n\r\nThanks for your code. When I am trying to compile make.sh based on your instruction on centos-7 with titan-x gpu and cuda-8.0 I am getting the following error. Could you please help me setting this up properly. Many thanks.\r\n\r\n\r\nrunning build_ext\r\nskipping 'model/utils/bbox.c' Cython extension (up-to-date)\r\nskipping 'pycocotools/_mask.c' Cython extension (up-to-date)\r\nCompiling nms kernels by nvcc...\r\n/home/kalyanb/Desktop/faster-rcnn/lib/model/nms\r\nIncluding CUDA code.\r\n['/home/kalyanb/Desktop/faster-rcnn/lib/model/nms/src/nms_cuda_kernel.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/ATen.lib', '/usr/local/cuda-8.0/lib/x64/cudart.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/_C.lib']\r\ngenerating /tmp/tmp8otu47o2/_nms.c\r\nsetting the current directory to '/tmp/tmp8otu47o2'\r\nrunning build_ext\r\nbuilding '_nms' extension\r\ncreating home\r\ncreating home/kalyanb\r\ncreating home/kalyanb/Desktop\r\ncreating home/kalyanb/Desktop/faster-rcnn\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/nms\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/nms/src\r\ngcc -pthread -B /home/kalyanb/anaconda3/envs/pytorch/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda-8.0/include -I/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/include -I/home/kalyanb/anaconda3/envs/pytorch/include/python3.5m -c _nms.c -o ./_nms.o\r\nIn file included from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,\r\n                 from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,\r\n                 from _nms.c:492:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevl\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: note: use option -std=c99 or -std=gnu99 to compile your code\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevlf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:142:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigamma\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:260:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigammaf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:278:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 118, in _compile\r\n    extra_postargs)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 909, in spawn\r\n    spawn(cmd, dry_run=self.dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 36, in spawn\r\n    _spawn_posix(cmd, search_path, dry_run=dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 159, in _spawn_posix\r\n    % (cmd, exit_status))\r\ndistutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 51, in _build\r\n    dist.run_command('build_ext')\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/dist.py\", line 974, in run_command\r\n    cmd_obj.run()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 339, in run\r\n    self.build_extensions()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 448, in build_extensions\r\n    self._build_extensions_serial()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 473, in _build_extensions_serial\r\n    self.build_extension(ext)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 533, in build_extension\r\n    depends=ext.depends)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 574, in compile\r\n    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 120, in _compile\r\n    raise CompileError(msg)\r\ndistutils.errors.CompileError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"build.py\", line 49, in <module>\r\n    ffi.build()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 184, in build\r\n    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 108, in _build_extension\r\n    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/api.py\", line 697, in compile\r\n    compiler_verbose=verbose, debug=debug, **kwds)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/recompiler.py\", line 1520, in recompile\r\n    compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 22, in compile\r\n    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 58, in _build\r\n    raise VerificationError('%s: %s' % (e.__class__.__name__, e))\r\ncffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1\r\nCompiling roi pooling kernels by nvcc...\r\n/home/kalyanb/Desktop/faster-rcnn/lib/model/roi_pooling\r\nIncluding CUDA code.\r\n['/home/kalyanb/Desktop/faster-rcnn/lib/model/roi_pooling/src/roi_pooling.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/ATen.lib', '/usr/local/cuda-8.0/lib/x64/cudart.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/_C.lib']\r\ngenerating /tmp/tmpfqbf6tlj/_roi_pooling.c\r\nsetting the current directory to '/tmp/tmpfqbf6tlj'\r\nrunning build_ext\r\nbuilding '_roi_pooling' extension\r\ncreating home\r\ncreating home/kalyanb\r\ncreating home/kalyanb/Desktop\r\ncreating home/kalyanb/Desktop/faster-rcnn\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/roi_pooling\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/roi_pooling/src\r\ngcc -pthread -B /home/kalyanb/anaconda3/envs/pytorch/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda-8.0/include -I/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/include -I/home/kalyanb/anaconda3/envs/pytorch/include/python3.5m -c _roi_pooling.c -o ./_roi_pooling.o\r\nIn file included from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,\r\n                 from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,\r\n                 from _roi_pooling.c:492:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevl\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: note: use option -std=c99 or -std=gnu99 to compile your code\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevlf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:142:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigamma\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:260:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigammaf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:278:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 118, in _compile\r\n    extra_postargs)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 909, in spawn\r\n    spawn(cmd, dry_run=self.dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 36, in spawn\r\n    _spawn_posix(cmd, search_path, dry_run=dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 159, in _spawn_posix\r\n    % (cmd, exit_status))\r\ndistutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 51, in _build\r\n    dist.run_command('build_ext')\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/dist.py\", line 974, in run_command\r\n    cmd_obj.run()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 339, in run\r\n    self.build_extensions()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 448, in build_extensions\r\n    self._build_extensions_serial()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 473, in _build_extensions_serial\r\n    self.build_extension(ext)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 533, in build_extension\r\n    depends=ext.depends)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 574, in compile\r\n    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 120, in _compile\r\n    raise CompileError(msg)\r\ndistutils.errors.CompileError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"build.py\", line 49, in <module>\r\n    ffi.build()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 184, in build\r\n    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 108, in _build_extension\r\n    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/api.py\", line 697, in compile\r\n    compiler_verbose=verbose, debug=debug, **kwds)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/recompiler.py\", line 1520, in recompile\r\n    compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 22, in compile\r\n    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 58, in _build\r\n    raise VerificationError('%s: %s' % (e.__class__.__name__, e))\r\ncffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1\r\nCompiling roi align kernels by nvcc...\r\n/home/kalyanb/Desktop/faster-rcnn/lib/model/roi_align\r\nIncluding CUDA code.\r\n['/home/kalyanb/Desktop/faster-rcnn/lib/model/roi_align/src/roi_align_kernel.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/ATen.lib', '/usr/local/cuda-8.0/lib/x64/cudart.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/_C.lib']\r\ngenerating /tmp/tmp9zecd3ms/_roi_align.c\r\nsetting the current directory to '/tmp/tmp9zecd3ms'\r\nrunning build_ext\r\nbuilding '_roi_align' extension\r\ncreating home\r\ncreating home/kalyanb\r\ncreating home/kalyanb/Desktop\r\ncreating home/kalyanb/Desktop/faster-rcnn\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/roi_align\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/roi_align/src\r\ngcc -pthread -B /home/kalyanb/anaconda3/envs/pytorch/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda-8.0/include -I/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/include -I/home/kalyanb/anaconda3/envs/pytorch/include/python3.5m -c _roi_align.c -o ./_roi_align.o\r\nIn file included from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,\r\n                 from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,\r\n                 from _roi_align.c:492:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevl\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: note: use option -std=c99 or -std=gnu99 to compile your code\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevlf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:142:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigamma\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:260:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigammaf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:278:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 118, in _compile\r\n    extra_postargs)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 909, in spawn\r\n    spawn(cmd, dry_run=self.dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 36, in spawn\r\n    _spawn_posix(cmd, search_path, dry_run=dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 159, in _spawn_posix\r\n    % (cmd, exit_status))\r\ndistutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 51, in _build\r\n    dist.run_command('build_ext')\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/dist.py\", line 974, in run_command\r\n    cmd_obj.run()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 339, in run\r\n    self.build_extensions()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 448, in build_extensions\r\n    self._build_extensions_serial()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 473, in _build_extensions_serial\r\n    self.build_extension(ext)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 533, in build_extension\r\n    depends=ext.depends)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 574, in compile\r\n    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 120, in _compile\r\n    raise CompileError(msg)\r\ndistutils.errors.CompileError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"build.py\", line 48, in <module>\r\n    ffi.build()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 184, in build\r\n    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 108, in _build_extension\r\n    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/api.py\", line 697, in compile\r\n    compiler_verbose=verbose, debug=debug, **kwds)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/recompiler.py\", line 1520, in recompile\r\n    compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 22, in compile\r\n    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 58, in _build\r\n    raise VerificationError('%s: %s' % (e.__class__.__name__, e))\r\ncffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1\r\nCompiling roi crop kernels by nvcc...\r\n/home/kalyanb/Desktop/faster-rcnn/lib/model/roi_crop\r\nIncluding CUDA code.\r\n['/home/kalyanb/Desktop/faster-rcnn/lib/model/roi_crop/src/roi_crop_cuda_kernel.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/ATen.lib', '/usr/local/cuda-8.0/lib/x64/cudart.lib', '/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/_C.lib']\r\ngenerating /tmp/tmp4uv8u0la/_roi_crop.c\r\nsetting the current directory to '/tmp/tmp4uv8u0la'\r\nrunning build_ext\r\nbuilding '_roi_crop' extension\r\ncreating home\r\ncreating home/kalyanb\r\ncreating home/kalyanb/Desktop\r\ncreating home/kalyanb/Desktop/faster-rcnn\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/roi_crop\r\ncreating home/kalyanb/Desktop/faster-rcnn/lib/model/roi_crop/src\r\ngcc -pthread -B /home/kalyanb/anaconda3/envs/pytorch/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda-8.0/include -I/home/kalyanb/anaconda3/envs/pytorch/bin/Lib/site-packages/torch/lib/include -I/home/kalyanb/anaconda3/envs/pytorch/include/python3.5m -c _roi_crop.c -o ./_roi_crop.o\r\nIn file included from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THVector.h:5:0,\r\n                 from /home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/TH.h:12,\r\n                 from _roi_crop.c:492:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevl\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:134:3: note: use option -std=c99 or -std=gnu99 to compile your code\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_polevlf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:142:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (size_t i = 0; i <= len; i++) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigamma\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:260:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h: In function \\u2018TH_trigammaf\\u2019:\r\n/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/../../lib/include/TH/THMath.h:278:3: error: \\u2018for\\u2019 loop initial declarations are only allowed in C99 mode\r\n   for (int i = 0; i < 6; ++i) {\r\n   ^\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 118, in _compile\r\n    extra_postargs)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 909, in spawn\r\n    spawn(cmd, dry_run=self.dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 36, in spawn\r\n    _spawn_posix(cmd, search_path, dry_run=dry_run)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/spawn.py\", line 159, in _spawn_posix\r\n    % (cmd, exit_status))\r\ndistutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 51, in _build\r\n    dist.run_command('build_ext')\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/dist.py\", line 974, in run_command\r\n    cmd_obj.run()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 339, in run\r\n    self.build_extensions()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 448, in build_extensions\r\n    self._build_extensions_serial()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 473, in _build_extensions_serial\r\n    self.build_extension(ext)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/command/build_ext.py\", line 533, in build_extension\r\n    depends=ext.depends)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/ccompiler.py\", line 574, in compile\r\n    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/distutils/unixccompiler.py\", line 120, in _compile\r\n    raise CompileError(msg)\r\ndistutils.errors.CompileError: command 'gcc' failed with exit status 1\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"build.py\", line 49, in <module>\r\n    ffi.build()\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 184, in build\r\n    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/torch/utils/ffi/__init__.py\", line 108, in _build_extension\r\n    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/api.py\", line 697, in compile\r\n    compiler_verbose=verbose, debug=debug, **kwds)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/recompiler.py\", line 1520, in recompile\r\n    compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 22, in compile\r\n    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)\r\n  File \"/home/kalyanb/anaconda3/envs/pytorch/lib/python3.5/site-packages/cffi/ffiplatform.py\", line 58, in _build\r\n    raise VerificationError('%s: %s' % (e.__class__.__name__, e))\r\ncffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1\r\n"},"comment":{"url":"https://api.github.com/repos/jwyang/faster-rcnn.pytorch/issues/comments/405457824","html_url":"https://github.com/jwyang/faster-rcnn.pytorch/issues/246#issuecomment-405457824","issue_url":"https://api.github.com/repos/jwyang/faster-rcnn.pytorch/issues/246","id":405457824,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTQ1NzgyNA==","user":{"login":"kalyanb29","id":10346518,"node_id":"MDQ6VXNlcjEwMzQ2NTE4","avatar_url":"https://avatars0.githubusercontent.com/u/10346518?v=4","gravatar_id":"","url":"https://api.github.com/users/kalyanb29","html_url":"https://github.com/kalyanb29","followers_url":"https://api.github.com/users/kalyanb29/followers","following_url":"https://api.github.com/users/kalyanb29/following{/other_user}","gists_url":"https://api.github.com/users/kalyanb29/gists{/gist_id}","starred_url":"https://api.github.com/users/kalyanb29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalyanb29/subscriptions","organizations_url":"https://api.github.com/users/kalyanb29/orgs","repos_url":"https://api.github.com/users/kalyanb29/repos","events_url":"https://api.github.com/users/kalyanb29/events{/privacy}","received_events_url":"https://api.github.com/users/kalyanb29/received_events","type":"User","site_admin":false},"created_at":"2018-07-17T04:44:23Z","updated_at":"2018-07-17T04:44:23Z","author_association":"NONE","body":"Solved it by adding these lines to make.sh\r\n\r\nexport CXXFLAGS=\"-std=c++11\"\r\nexport CFLAGS=\"-std=c99\"\r\nexport PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}\r\nexport CPATH=/usr/local/cuda-8.0/include${CPATH:+:${CPATH}}\r\nexport LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"}}
{"actor":{"display_login":"kalyanb29"}}