youtubevos / MaskTrackRCNN

MaskTrackRCNN for video instance segmentation based on mmdetection
Apache License 2.0
431 stars 75 forks source link

[Compile Error] mmdetection compile fails #3

Closed shwoo93 closed 5 years ago

shwoo93 commented 5 years ago

building 'nms_cuda' extension gcc -pthread -B /home/miruware/anaconda3/envs/py36_2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/TH -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/miruware/anaconda3/envs/py36_2/include/python3.7m -c src/nms_cuda.cpp -o build/temp.linux-x86_64-3.7/src/nms_cuda.o -DTORCH_EXTENSION_NAME=nms_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/nms_cuda.cpp:2:29: fatal error: torch/extension.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1 Building dcn... running build_ext building 'deform_conv_cuda' extension creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/src gcc -pthread -B /home/miruware/anaconda3/envs/py36_2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/TH -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/miruware/anaconda3/envs/py36_2/include/python3.7m -c src/deform_conv_cuda.cpp -o build/temp.linux-x86_64-3.7/src/deform_conv_cuda.o -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/deform_conv_cuda.cpp:4:29: fatal error: torch/extension.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1 Building sigmoid focal loss op... running build_ext building 'sigmoid_focal_loss_cuda' extension creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/src gcc -pthread -B /home/miruware/anaconda3/envs/py36_2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/TH -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/miruware/anaconda3/envs/py36_2/include/python3.7m -c src/sigmoid_focal_loss.cpp -o build/temp.linux-x86_64-3.7/src/sigmoid_focal_loss.o -DTORCH_EXTENSION_NAME=sigmoid_focal_loss_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/sigmoid_focal_loss.cpp:3:29: fatal error: torch/extension.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1 Building masked conv op... running build_ext building 'masked_conv2d_cuda' extension creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/src gcc -pthread -B /home/miruware/anaconda3/envs/py36_2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/TH -I/home/miruware/anaconda3/envs/py36_2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/miruware/anaconda3/envs/py36_2/include/python3.7m -c src/masked_conv2d_cuda.cpp -o build/temp.linux-x86_64-3.7/src/masked_conv2d_cuda.o -DTORCH_EXTENSION_NAME=masked_conv2d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ src/masked_conv2d_cuda.cpp:1:29: fatal error: torch/extension.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1

I got the compile error when installing the mmdetection library. The above is a short snippet of the error.

I use python 3.7.3 pytorch 0.4.1

Could you please give me any suggestion?

shwoo93 commented 5 years ago

The problem is resolved by upgrading the pytorch version to 1.1.