Gorilla-Lab-SCUT/frustum-convnet

Error while compiling extension

manashpratim opened this issue · 1 comments

Hi,
I am trying to compile the C++ extensions. I have installed pybind11. I get the following error while executing the following command:
cd ops
bash clean.sh
bash make.sh

  • set -e
  • cd pybind11
  • python setup.py clean --all
    running clean
    'build/lib.linux-x86_64-3.7' does not exist -- can't clean it
    'build/bdist.linux-x86_64' does not exist -- can't clean it
    'build/scripts-3.7' does not exist -- can't clean it
  • rm -f '*.so'
  • set -e
  • cd pybind11
  • python setup.py build_ext --inplace
    running build_ext
    gcc -pthread -B /data/manash_b/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign- compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/data/manash_b/anaconda3/include/p ython3.7m -c /tmp/tmprq5_ew67.cpp -o tmp/tmprq5_ew67.o -std=c++11
    gcc -pthread -B /data/manash_b/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign- compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/data/manash_b/anaconda3/include/p ython3.7m -c /tmp/tmpm9_rp6px.cpp -o tmp/tmpm9_rp6px.o -fvisibility=hidden
    building 'box_ops_cc' extension
    creating build
    creating build/temp.linux-x86_64-3.7
    gcc -pthread -B /data/manash_b/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign- compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/data/manash_b/anaconda3/lib/pytho n3.7/site-packages/pybind11/include -I/data/manash_b/anaconda3/include/python3.7 m -c box_ops.cc -o build/temp.linux-x86_64-3.7/box_ops.o -DVERSION_INFO="0.0.1" -std=c++11 -fvisibility=hidden
    In file included from box_ops.cc:1:
    box_ops.h: In function ‘pybind11::array_t rbbox_iou(pybind11::array_t, pybind11::array_t, pybind11::array_t, DType)’:
    box_ops.h:30:22: error: ‘polygon’ in namespace ‘boost::geometry::model’ does not name a template type
    typedef bg::model::polygon<point_t> polygon_t;
    ^~~~~~~
    box_ops.h:31:3: error: ‘polygon_t’ was not declared in this scope
    polygon_t poly, qpoly;
    ^~~~~~~~~
    box_ops.h:32:24: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
    std::vector<polygon_t> poly_inter, poly_union;
    ^
    box_ops.h:32:24: note: expected a type, got ‘polygon_t’
    box_ops.h:32:24: error: template argument 2 is invalid
    box_ops.h:48:18: error: ‘poly’ was not declared in this scope
    bg::append(poly, point_t(box_corners_r(n, 0, 0), box_corners_r(n, 0, 1))) ;
    ^~~~
    box_ops.h:48:18: note: suggested alternative: ‘py’
    bg::append(poly, point_t(box_corners_r(n, 0, 0), box_corners_r(n, 0, 1))) ;
    ^~~~
    py
    box_ops.h:53:18: error: ‘qpoly’ was not declared in this scope
    bg::append(qpoly,
    ^~~~~
    box_ops.h:66:23: error: request for member ‘empty’ in ‘poly_inter’, which is of non-class type ‘int’
    if (!poly_inter.empty()) {
    ^~~~~
    box_ops.h:67:42: error: request for member ‘front’ in ‘poly_inter’, which is of non-class type ‘int’
    inter_area = bg::area(poly_inter.front());
    ^~~~~
    box_ops.h:69:25: error: request for member ‘empty’ in ‘poly_union’, which is of non-class type ‘int’
    if (!poly_union.empty()) {
    ^~~~~
    box_ops.h:70:44: error: request for member ‘front’ in ‘poly_union’, which is of non-class type ‘int’
    union_area = bg::area(poly_union.front());
    ^~~~~
    box_ops.h:73:20: error: request for member ‘clear’ in ‘poly_union’, which is of non-class type ‘int’
    poly_union.clear();
    ^~~~~
    box_ops.h:77:18: error: request for member ‘clear’ in ‘poly_inter’, which is of non-class type ‘int’
    poly_inter.clear();
    ^~~~~
    box_ops.h: In function ‘pybind11::array_t rbbox_iou_3d(pybind11::array_t< DType>, pybind11::array_t, pybind11::array_t, DType)’:
    box_ops.h:100:22: error: ‘polygon’ in namespace ‘boost::geometry::model’ does no t name a template type
    typedef bg::model::polygon<point_t> polygon_t;
    ^~~~~~~
    box_ops.h:101:3: error: ‘polygon_t’ was not declared in this scope
    polygon_t poly, qpoly;
    ^~~~~~~~~
    box_ops.h:102:24: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
    std::vector<polygon_t> poly_inter, poly_union;
    ^
    box_ops.h:102:24: note: expected a type, got ‘polygon_t’
    box_ops.h:102:24: error: template argument 2 is invalid
    box_ops.h:123:18: error: ‘poly’ was not declared in this scope
    bg::append(poly, point_t(box_corners_r(n, 6, 0), box_corners_r(n, 6, 2))) ;
    ^~~~
    box_ops.h:123:18: note: suggested alternative: ‘vol’
    bg::append(poly, point_t(box_corners_r(n, 6, 0), box_corners_r(n, 6, 2))) ;
    ^~~~
    vol
    box_ops.h:128:18: error: ‘qpoly’ was not declared in this scope
    bg::append(qpoly,
    ^~~~~
    box_ops.h:128:18: note: suggested alternative: ‘qvol’
    bg::append(qpoly,
    ^~~~~
    qvol
    box_ops.h:141:23: error: request for member ‘empty’ in ‘poly_inter’, which is of non-class type ‘int’
    if (!poly_inter.empty()) {
    ^~~~~
    box_ops.h:142:42: error: request for member ‘front’ in ‘poly_inter’, which is of non-class type ‘int’
    inter_area = bg::area(poly_inter.front());
    ^~~~~
    box_ops.h:144:25: error: request for member ‘empty’ in ‘poly_union’, which is of non-class type ‘int’
    if (!poly_union.empty()) {
    ^~~~~
    box_ops.h:163:20: error: request for member ‘clear’ in ‘poly_union’, which is of non-class type ‘int’
    poly_union.clear();
    ^~~~~
    box_ops.h:167:18: error: request for member ‘clear’ in ‘poly_inter’, which is of non-class type ‘int’
    poly_inter.clear();
    ^~~~~
    box_ops.h: In function ‘pybind11::array_t rbbox_iou_3d_pair(pybind11::arr ay_t, pybind11::array_t)’:
    box_ops.h:189:22: error: ‘polygon’ in namespace ‘boost::geometry::model’ does no t name a template type
    typedef bg::model::polygon<point_t> polygon_t;
    ^~~~~~~
    box_ops.h:190:3: error: ‘polygon_t’ was not declared in this scope
    polygon_t poly, qpoly;
    ^~~~~~~~~
    box_ops.h:191:24: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
    std::vector<polygon_t> poly_inter, poly_union;
    ^
    box_ops.h:191:24: note: expected a type, got ‘polygon_t’
    box_ops.h:191:24: error: template argument 2 is invalid
    box_ops.h:210:16: error: ‘poly’ was not declared in this scope
    bg::append(poly, point_t(box_corners_r(n, 6, 0), box_corners_r(n, 6, 2)));
    ^~~~
    box_ops.h:210:16: note: suggested alternative: ‘vol’
    bg::append(poly, point_t(box_corners_r(n, 6, 0), box_corners_r(n, 6, 2)));
    ^~~~
    vol
    box_ops.h:215:16: error: ‘qpoly’ was not declared in this scope
    bg::append(qpoly,
    ^~~~~
    box_ops.h:215:16: note: suggested alternative: ‘qvol’
    bg::append(qpoly,
    ^~~~~
    qvol
    box_ops.h:228:21: error: request for member ‘empty’ in ‘poly_inter’, which is of non-class type ‘int’
    if (!poly_inter.empty()) {
    ^~~~~
    box_ops.h:229:40: error: request for member ‘front’ in ‘poly_inter’, which is of non-class type ‘int’
    inter_area = bg::area(poly_inter.front());
    ^~~~~
    box_ops.h:231:23: error: request for member ‘empty’ in ‘poly_union’, which is of non-class type ‘int’
    if (!poly_union.empty()) {
    ^~~~~
    box_ops.h:232:42: error: request for member ‘front’ in ‘poly_union’, which is of non-class type ‘int’
    union_area = bg::area(poly_union.front());
    ^~~~~
    box_ops.h:252:18: error: request for member ‘clear’ in ‘poly_union’, which is of non-class type ‘int’
    poly_union.clear();
    ^~~~~
    box_ops.h:256:16: error: request for member ‘clear’ in ‘poly_inter’, which is of non-class type ‘int’
    poly_inter.clear();
    ^~~~~
    error: command 'gcc' failed with exit status 1

I am using Python 3.7, Pytorch 1.5 and CUDA 10.1.

Refer to #16 and #22.