Skip to content
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

build error on Ubuntu 18.04 with Boost v1.65.1 #36

Closed
zweistein opened this issue May 6, 2020 · 3 comments
Closed

build error on Ubuntu 18.04 with Boost v1.65.1 #36

zweistein opened this issue May 6, 2020 · 3 comments

Comments

@zweistein
Copy link

Hi, I try to build the package on Ubuntu 18:04 with ROS Melodic and Boost 1.65.1.
I ran into a problem with cv_mat.cpp due to a change in the boos library as boost::python::numeric is depricated in boost >1.63

[ 89%] Building CXX object cells/cv_bp/opencv/CMakeFiles/opencv_boost_python.dir/cv_mat.cpp.o
[ 93%] Built target opencv_test_ectomodule
cd /home/elod/work/ws_robfun/build/ecto_opencv/cells/cv_bp/opencv && /usr/bin/c++  -DROS_BUILD_SHARED_LIBS=1 -Dopencv_boost_python_EXPORTS -I/home/elod/work/ws_robfun/devel/.private/ecto/include -isystem /usr/local/include -isystem /usr/local/include/opencv -isystem /home/elod/work/ws_robfun/src/ecto/include -isystem /home/elod/work/ws_robfun/src/opencv_candidate/include -isystem /home/elod/anaconda3/envs/ros/include/python2.7 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include  -fPIC   -o CMakeFiles/opencv_boost_python.dir/cv_mat.cpp.o -c /home/elod/work/ws_robfun/src/ecto_opencv/cells/cv_bp/opencv/cv_mat.cpp
In file included from /usr/include/python2.7/numpy/ndarraytypes.h:1809:0,
                 from /usr/include/python2.7/numpy/ndarrayobject.h:18,
                 from /usr/include/python2.7/numpy/arrayobject.h:4,
                 from /home/elod/work/ws_robfun/src/ecto_opencv/cells/cv_bp/opencv/cv_mat.cpp:3:
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
/home/elod/work/ws_robfun/src/ecto_opencv/cells/cv_bp/opencv/cv_mat.cpp:13:31: error: ‘numpy’ is not a namespace-name
 namespace np = boost::python::numpy;

Based on similar issues I tried to change the namespace from namespace bp::numeric:: to namespace bp::numpy:: but this fails too:

[ 78%] Building CXX object cells/cv_bp/opencv/CMakeFiles/opencv_boost_python.dir/cv_mat.cpp.o
cd /home/elod/work/ws_robfun/build/ecto_opencv/cells/cv_bp/opencv && /usr/bin/c++  -DROS_BUILD_SHARED_LIBS=1 -Dopencv_boost_python_EXPORTS -I/home/elod/work/ws_robfun/devel/.private/ecto/include -isystem /usr/local/include -isystem /usr/local/include/opencv -isystem /home/elod/work/ws_robfun/src/ecto/include -isystem /home/elod/work/ws_robfun/src/opencv_candidate/include -isystem /home/elod/anaconda3/envs/ros/include/python2.7 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include  -fPIC   -o CMakeFiles/opencv_boost_python.dir/cv_mat.cpp.o -c /home/elod/work/ws_robfun/src/ecto_opencv/cells/cv_bp/opencv/cv_mat.cpp
make[2]: Entering directory '/home/elod/work/ws_robfun/build/ecto_opencv'
make[2]: Nothing to be done for 'cells/opencv/rgbd/CMakeFiles/rgbd_ectomodule.dir/build'.
make[2]: Leaving directory '/home/elod/work/ws_robfun/build/ecto_opencv'
[ 82%] Built target opencv_test_ectomodule
[ 93%] Built target rgbd_ectomodule
In file included from /usr/include/python2.7/numpy/ndarraytypes.h:1809:0,
                 from /usr/include/python2.7/numpy/ndarrayobject.h:18,
                 from /usr/include/python2.7/numpy/arrayobject.h:4,
                 from /home/elod/work/ws_robfun/src/ecto_opencv/cells/cv_bp/opencv/cv_mat.cpp:3:
/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
/home/elod/work/ws_robfun/src/ecto_opencv/cells/cv_bp/opencv/cv_mat.cpp:87:16: error: ‘array’ in namespace ‘boost::python::numpy’ does not name a type
     bp::numpy::array
                ^~~~~

Any ideas on how to fix this issue?

@tripulse
Copy link

tripulse commented Aug 5, 2020

bro what's Ubnut

@zweistein zweistein changed the title build error on Ubnut 18.04 with Boost v1.65.1 build error on Ubuntu 18.04 with Boost v1.65.1 Aug 6, 2020
@HassanHariri
Copy link

Having same issue. Did you manage to find a solution?

@zweistein
Copy link
Author

Yes, my pull request solves it: #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants