-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
error while compling ROI Align #127
Comments
Hi, @guyan277 I guess it is because your gcc version does not support the compile. |
Thx @jwyang i will check it |
I met the same problem,could you tell me what is your gcc version?Mine is 4.84.Thanks! @jwyang |
Hi, @WBinke it is gcc 5.4.0 |
Thx! I have the same problem like it. The reason is: Ubuntu 14 gcc version = 4.8, need to update to 5.4.
Then can be complier sucessfully |
I have alse meet the error: so I also upgrade the pytorch version to 0.2.0_post3 and |
Hi, I meet a similar error when compiling roi align. I updated the version of gcc, but the error was not solved. How can I fix it ? Thanks in advance. File "build.py", line 38, in |
@ksaito-ut Hi, I meet a similar error when compiling roi align. I updated the version of gcc, but the error was not solved. How can I fix it ? Thanks in advance. |
@guyan277 I have solved this by |
Check your x86_64-linux-gnu-gcc version,maybe its verion is still 4.8,beacause it is a softlink.Just check it. @ksaito-ut @chj1933 |
@WBinke Thank you for your advice! I checked my x86_64-linux-gnu-gcc version and found it was still 4.8. So, I changed the link to x86_64-linux-gnu-gcc-5. It worked! |
export CXXFLAGS="-std=c++11" |
cheers you solved the problem, closing this issue. |
creating home/guyan/tmp/frrcnn/lib/model/roi_align
creating home/guyan/tmp/frrcnn/lib/model/roi_align/src
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/guyan/anaconda3/envs/Maxwell2/include/python2.7 -c _roi_align.c -o ./_roi_align.o
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/guyan/anaconda3/envs/Maxwell2/include/python2.7 -c /home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c -o ./home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.o
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c: In function ‘roi_align_backward’:
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c:65:9: warning: unused variable ‘batch_size’ [-Wunused-variable]
int batch_size = THFloatTensor_size(bottom_grad, 0);
^
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c: In function ‘ROIAlignForwardCpu’:
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c:87:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for
^
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c:88:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int idx = 0; idx < output_size; ++idx)
^
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c:88:5: note: use option -std=c99 or -std=gnu99 to compile your code
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c: In function ‘ROIAlignBackwardCpu’:
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c:145:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel for
^
/home/guyan/tmp/frrcnn/lib/model/roi_align/src/roi_align.c:146:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int idx = 0; idx < output_size; ++idx)
^
Traceback (most recent call last):
File "build.py", line 38, in
ffi.build()
File "/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 164, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 100, in _build_extension
ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/cffi/api.py", line 684, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/cffi/recompiler.py", line 1484, in recompile
compiler_verbose, debug)
File "/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 20, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/guyan/anaconda3/envs/Maxwell2/lib/python2.7/site-packages/cffi/ffiplatform.py", line 56, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
The text was updated successfully, but these errors were encountered: