cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/yubw/miniconda3/envs/action_detect/include/python3.8/pyport.h:212:0,
from /home/yubw/miniconda3/envs/action_detect/include/python3.8/Python.h:63,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/python_headers.h:10,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/Device.h:3,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/python.h:8,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/extension.h:6,
from ./csrc/nms_cpu.cpp:3:
/usr/local/include/c++/7.1.0/math.h:65:12: error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration
using std::isinf;
^~~~~
In file included from /usr/include/features.h:375:0,
from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/c++config.h:533,
from /usr/local/include/c++/7.1.0/bits/stl_algobase.h:59,
from /usr/local/include/c++/7.1.0/memory:62,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/c10/core/Allocator.h:4,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/ATen/ATen.h:7,
from ./csrc/nms_cpu.cpp:1:
/usr/include/bits/mathcalls.h:202:1: note: previous declaration ‘int isinf(double)’
MATHDECL_1 (int,isinf,, (Mdoublevalue)) attribute ((const__));
^
In file included from /home/yubw/miniconda3/envs/action_detect/include/python3.8/pyport.h:212:0,
from /home/yubw/miniconda3/envs/action_detect/include/python3.8/Python.h:63,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/python_headers.h:10,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/Device.h:3,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/python.h:8,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/extension.h:6,
from ./csrc/nms_cpu.cpp:3:
/usr/local/include/c++/7.1.0/math.h:66:12: error: ‘constexpr bool std::isnan(double)’ conflicts with a previous declaration
using std::isnan;
^~~~~
In file included from /usr/include/features.h:375:0,
from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39,
from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/c++config.h:533,
from /usr/local/include/c++/7.1.0/bits/stl_algobase.h:59,
from /usr/local/include/c++/7.1.0/memory:62,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/c10/core/Allocator.h:4,
from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/ATen/ATen.h:7,
from ./csrc/nms_cpu.cpp:1:
/usr/include/bits/mathcalls.h:235:1: note: previous declaration ‘int isnan(double)’
MATHDECL_1 (int,isnan,, (Mdoublevalue)) attribute ((const__));
^
error: command '/usr/local/bin/gcc' failed with exit code 1
作者你好,感谢你们的开源工作,我在安装nms的时候,出现如下问题?请问是gcc的问题吗? 我重新装了pytorch的1.11版本,也出现这个问题了。
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from /home/yubw/miniconda3/envs/action_detect/include/python3.8/pyport.h:212:0, from /home/yubw/miniconda3/envs/action_detect/include/python3.8/Python.h:63, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/python_headers.h:10, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/Device.h:3, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/python.h:8, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/extension.h:6, from ./csrc/nms_cpu.cpp:3: /usr/local/include/c++/7.1.0/math.h:65:12: error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration using std::isinf; ^~~~~ In file included from /usr/include/features.h:375:0, from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39, from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/c++config.h:533, from /usr/local/include/c++/7.1.0/bits/stl_algobase.h:59, from /usr/local/include/c++/7.1.0/memory:62, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/c10/core/Allocator.h:4, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/ATen/ATen.h:7, from ./csrc/nms_cpu.cpp:1: /usr/include/bits/mathcalls.h:202:1: note: previous declaration ‘int isinf(double)’ MATHDECL_1 (int,isinf,, (Mdouble value)) attribute ((const__)); ^ In file included from /home/yubw/miniconda3/envs/action_detect/include/python3.8/pyport.h:212:0, from /home/yubw/miniconda3/envs/action_detect/include/python3.8/Python.h:63, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/python_headers.h:10, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/Device.h:3, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/python.h:8, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/torch/extension.h:6, from ./csrc/nms_cpu.cpp:3: /usr/local/include/c++/7.1.0/math.h:66:12: error: ‘constexpr bool std::isnan(double)’ conflicts with a previous declaration using std::isnan; ^~~~~ In file included from /usr/include/features.h:375:0, from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/os_defines.h:39, from /usr/local/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/c++config.h:533, from /usr/local/include/c++/7.1.0/bits/stl_algobase.h:59, from /usr/local/include/c++/7.1.0/memory:62, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/c10/core/Allocator.h:4, from /home/yubw/miniconda3/envs/action_detect/lib/python3.8/site-packages/torch/include/ATen/ATen.h:7, from ./csrc/nms_cpu.cpp:1: /usr/include/bits/mathcalls.h:235:1: note: previous declaration ‘int isnan(double)’ MATHDECL_1 (int,isnan,, (Mdouble value)) attribute ((const__)); ^ error: command '/usr/local/bin/gcc' failed with exit code 1