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: no known conversion from ‘VectorWrapper<const double>’ to ‘const std::vector<double>&’ #532

Closed
morxa opened this issue Oct 6, 2017 · 2 comments

Comments

@morxa
Copy link
Contributor

morxa commented Oct 6, 2017

The current master (108a9d812b1a32fa657cf336b3f8dd298803c497) fails to build on Fedora 26 with the following error (subsequent run to only have relevant messages):

[  0%] Built target openrave-md5-native
[  2%] Built target cpp-gen-md5-native
[  3%] Built target interfacehashes_target
[  4%] Built target openrave-md5
[  5%] Built target ivcon
[ 10%] Built target qhull
[ 14%] Built target convexdecomposition
[ 15%] Built target check_libm_accuracy-native
[ 24%] Built target libopenrave
[ 29%] Built target libopenrave-core
[ 30%] Built target openrave
[ 31%] Built target libopenrave_c
[ 32%] Built target libopenrave-core_c
[ 32%] Built target orcreate_octave
[ 32%] Built target orread_octave
[ 33%] Built target orwrite_octave
[ 38%] Built target locale
[ 39%] Built target pyANN_int
[ 40%] Built target convexdecompositionpy
[ 49%] Built target openravepy_int
[ 51%] Built target basecontrollers
[ 53%] Built target baserobots
[ 54%] Built target basesamplers
[ 55%] Built target basesensors
[ 57%] Built target configurationcache
[ 58%] Built target openravepy_configurationcache
[ 59%] Built target dualmanipulation
[ 61%] Built target grasper
[ 67%] Built target ikfastsolvers
[ 68%] Built target logging
[ 70%] Built target PQP
[ 71%] Built target pqprave
[ 74%] Built target rmanipulation
[ 77%] Built target ParabolicPathSmooth
[ 79%] Built target rampoptimizer
[ 79%] Building CXX object plugins/rplanners/CMakeFiles/rplanners.dir/rplanners.cpp.o
In file included from /usr/include/c++/7/x86_64-redhat-linux/bits/c++allocator.h:33:0,
                 from /usr/include/c++/7/bits/allocator.h:46,
                 from /usr/include/c++/7/string:41,
                 from /home/thofmann/code/openrave/include/openrave/openrave.h:55,
                 from /home/thofmann/code/openrave/plugins/include/openraveplugindefs.h:20,
                 from /home/thofmann/code/openrave/plugins/rplanners/rplanners.cpp:17:
/usr/include/c++/7/ext/new_allocator.h: In instantiation of ‘class __gnu_cxx::new_allocator<const double>’:
/usr/include/c++/7/bits/allocator.h:108:11:   required from ‘class std::allocator<const double>’
/usr/include/c++/7/bits/stl_vector.h:81:14:   required from ‘struct std::_Vector_base<const double, std::allocator<const double> >::_Vector_impl’
/usr/include/c++/7/bits/stl_vector.h:166:20:   required from ‘struct std::_Vector_base<const double, std::allocator<const double> >’
/usr/include/c++/7/bits/stl_vector.h:216:11:   required from ‘class std::vector<const double, std::allocator<const double> >’
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h:37:7:   required from ‘class VectorWrapper<const double>’
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h:217:124:   required from here
/usr/include/c++/7/ext/new_allocator.h:93:7: error: ‘const _Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::const_reference) const [with _Tp = const double; __gnu_cxx::new_allocator<_Tp>::const_pointer = const double*; __gnu_cxx::new_allocator<_Tp>::const_reference = const double&]’ cannot be overloaded
       address(const_reference __x) const _GLIBCXX_NOEXCEPT
       ^~~~~~~
/usr/include/c++/7/ext/new_allocator.h:89:7: error: with ‘_Tp* __gnu_cxx::new_allocator<_Tp>::address(__gnu_cxx::new_allocator<_Tp>::reference) const [with _Tp = const double; __gnu_cxx::new_allocator<_Tp>::pointer = const double*; __gnu_cxx::new_allocator<_Tp>::reference = const double&]’
       address(reference __x) const _GLIBCXX_NOEXCEPT
       ^~~~~~~
In file included from /home/thofmann/code/openrave/plugins/rplanners/rrt.h:19:0,
                 from /home/thofmann/code/openrave/plugins/rplanners/rplanners.cpp:18:
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h: In instantiation of ‘class VectorWrapper<const double>’:
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h:217:124:   required from here
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h:51:5: error: ‘VectorWrapper<T>::VectorWrapper(const T*, const T*) [with T = const double]’ cannot be overloaded
     VectorWrapper(const T* sourceArray, const T* sourceArrayEnd)
     ^~~~~~~~~~~~~
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h:44:5: error: with ‘VectorWrapper<T>::VectorWrapper(T*, T*) [with T = const double]’
     VectorWrapper(T* sourceArray, T* sourceArrayEnd)
     ^~~~~~~~~~~~~
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h: In member function ‘OpenRAVE::dReal SpatialTree<Node>::_ComputeDistance(const dReal*, const dReal*) const’:
/home/thofmann/code/openrave/plugins/rplanners/rplanners.h:217:124: error: no match for call to ‘(const boost::function<double(const std::vector<double>&, const std::vector<double>&)>) (VectorWrapper<const double>, VectorWrapper<double>)’
         return _distmetricfn(VectorWrapper<const dReal>(config0, config0+_dof), VectorWrapper<dReal>(config1, config1+_dof));
                                                                                                                            ^
In file included from /usr/include/boost/function/detail/maybe_include.hpp:23:0,
                 from /usr/include/boost/function/detail/function_iterate.hpp:14,
                 from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:57,
                 from /usr/include/boost/function.hpp:64,
                 from /home/thofmann/code/openrave/include/openrave/openrave.h:71,
                 from /home/thofmann/code/openrave/plugins/include/openraveplugindefs.h:20,
                 from /home/thofmann/code/openrave/plugins/rplanners/rplanners.cpp:17:
/usr/include/boost/function/function_template.hpp:765:17: note: candidate: boost::function2<R, T1, T2>::result_type boost::function2<R, T1, T2>::operator()(T0, T1) const [with R = double; T0 = const std::vector<double>&; T1 = const std::vector<double>&; boost::function2<R, T1, T2>::result_type = double]
     result_type operator()(BOOST_FUNCTION_PARMS) const
                 ^~~~~~~~
/usr/include/boost/function/function_template.hpp:765:17: note:   no known conversion for argument 1 from ‘VectorWrapper<const double>’ to ‘const std::vector<double>&’
In file included from /home/thofmann/code/openrave/plugins/rplanners/rplanners.cpp:18:0:
/home/thofmann/code/openrave/plugins/rplanners/rrt.h: In member function ‘virtual bool BirrtPlanner::InitPlan(OpenRAVE::RobotBasePtr, OpenRAVE::PlannerBase::PlannerParametersConstPtr)’:
/home/thofmann/code/openrave/plugins/rplanners/rrt.h:333:25: warning: unused variable ‘ret’ [-Wunused-variable]
                     int ret = _parameters->CheckPathAllConstraints(vgoal,vgoal,std::vector<dReal>(), std::vector<dReal>(), 0, IT_OpenStart);
                         ^~~
/home/thofmann/code/openrave/plugins/rplanners/rrt.h: In member function ‘virtual OpenRAVE::PlannerStatus BasicRrtPlanner::PlanPath(OpenRAVE::TrajectoryBasePtr)’:
/home/thofmann/code/openrave/plugins/rplanners/rrt.h:832:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                         if( numfoundgoals >= _parameters->_minimumgoalpaths ) {
                             ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [plugins/rplanners/CMakeFiles/rplanners.dir/build.make:303: plugins/rplanners/CMakeFiles/rplanners.dir/rplanners.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1967: plugins/rplanners/CMakeFiles/rplanners.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

cmake output:

-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 7.2.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiling OpenRAVE Version 0.9.0, soversion=0.9
-- Using cmake version 3.9.1
-- Using double precision
-- detected system processor: x86_64
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.3.9") 
-- Found PythonInterp: /usr/bin/python (found version "2.7.13") 
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found suitable version "2.7.13", minimum required is "2") 
-- installing to /usr/local, python exe /usr/bin/python, python subdir is lib64/python2.7/site-packages, program suffix is '0.9'
-- Performing Test LINKER_HAS_RDYNAMIC
-- Performing Test LINKER_HAS_RDYNAMIC - Success
-- Performing Test LINKER_HAS_BSYMBOLIC
-- Performing Test LINKER_HAS_BSYMBOLIC - Success
-- Performing Test LINKER_HAS_BSYMBOLIC_FUNCTIONS
-- Performing Test LINKER_HAS_BSYMBOLIC_FUNCTIONS - Success
-- Performing Test LINKER_HAS_VISIBILITY
-- Performing Test LINKER_HAS_VISIBILITY - Success
-- Performing Test LINKER_HAS_VISIBILITY_INLINES_HIDDEN
-- Performing Test LINKER_HAS_VISIBILITY_INLINES_HIDDEN - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   regex
--   filesystem
--   system
--   python
--   thread
--   iostreams
--   date_time
--   chrono
--   atomic
-- found boost version: 106300
-- Targetting Unix Makefiles
-- Using /usr/lib64/ccache/c++ compiler.
-- Found GMP: /usr/lib64/libgmp.so
-- Found GMPXX: /usr/lib64/libgmpxx.so
-- Found MPFR: /usr/lib64/libmpfr.so
-- Looking for mpfr_div_d in /usr/lib64/libmpfr.so
-- Looking for mpfr_div_d in /usr/lib64/libmpfr.so - found
-- Found MPFI: /usr/lib64/libmpfi.so
-- Looking for crlibm_init in crlibm
-- Looking for crlibm_init in crlibm - found
-- Looking for crlibm.h
-- Looking for crlibm.h - found
-- assimp version 3.3.1, , /usr/include
-- Performing Test IS_ASSIMP_PRE_R896
-- Performing Test IS_ASSIMP_PRE_R896 - Failed
-- Performing Test IS_X86_64
-- Performing Test IS_X86_64 - Success
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- Found LibXml2: /usr/lib64/libxml2.so
-- libxml2 found
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake-qt4 (found version "4.8.7") 
-- Checking for module 'libpcrecpp'
--   Found libpcrecpp, version 8.41
-- Looking for C++ include pcrecpp.h
-- Looking for C++ include pcrecpp.h - found
-- collada version 2.4.4 does not support write to memory
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
-- Checking for module 'minizip'
--   Found minizip, version 1.2.11
-- Looking for qh_new_qhull in qhull
-- Looking for qh_new_qhull in qhull - found
-- Looking for qhull/qhull_a.h
-- Looking for qhull/qhull_a.h - not found
-- compiling local qhull library
-- Looking for C++ include ANN/ANN.h
-- Looking for C++ include ANN/ANN.h - found
-- Looking for _Z8annClosev in ANN
-- Looking for _Z8annClosev in ANN - found
-- Checking for one of the modules 'fparser'
-- using fparser from pkg-config, cflags: , link flags: -lfparser
-- Checking for module 'liblog4cxx'
--   Found liblog4cxx, version 0.10.0
-- compiling local convexdecomposition library
-- Looking for C++ include ext/hash_map
-- Looking for C++ include ext/hash_map - found
-- Looking for asinh
-- Looking for asinh - not found
-- Looking for acosh
-- Looking for acosh - not found
-- Looking for atanh
-- Looking for atanh - not found
-- Looking for exp2
-- Looking for exp2 - not found
-- Looking for log2
-- Looking for log2 - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Geometry Parsing: Collada DOM 2.4.4
-- Geometry Parsing: Using Open Asset Import Library 3.3.1
-- Geometry Parsing: Using ivcon
-- extracting models to /home/thofmann/code/openrave/src
-- Looking for _init in lapack
-- Looking for _init in lapack - found
-- MATLAB installation not found, is mex in the system path?
-- Found sympy version '1.1.1'
-- Assuming sympy version 0.7.x or greater
-- Performing Test HAVE_ALL_PYTHON_HEADERS
-- Performing Test HAVE_ALL_PYTHON_HEADERS - Success
-- python and boost-python found
-- Looking for cgesdd_ in lapack
-- Looking for cgesdd_ in lapack - found
-- Checking for module 'bullet'
--   Found bullet, version 2.83
-- unsupported bullet version 2.83
-- FindMoby: Could not find EventDrivenSimulator.h
-- Could not find Moby Physics engine. Please install from https://github.com/PositronicsLab/Moby 
-- Checking for modules 'libavformat;libavcodec'
--   Found libavformat, version 57.71.100
--   Found libavcodec, version 57.89.100
-- enabling FFMPEG support
-- Checking for module 'libswscale'
--   Found libswscale, version 4.6.100
-- Looking for libswscale/swscale.h
-- Looking for libswscale/swscale.h - found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for libavcodec/avcodec.h
-- Looking for libavcodec/avcodec.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- Looking for ffmpeg/avcodec.h
-- Looking for ffmpeg/avcodec.h - not found
-- Performing Test HAS_AVMEDIA_TYPE_VIDEO
-- Performing Test HAS_AVMEDIA_TYPE_VIDEO - Success
-- boost regex found
-- Found OpenGL: /usr/lib64/libGL.so  
-- Found osgDB: /usr/lib64/libosgDB.so  
-- Found osgQt: /usr/lib64/libosgQt.so  
-- Found osgGA: /usr/lib64/libosgGA.so  
-- Found osgFX: /usr/lib64/libosgFX.so  
-- Found osgText: /usr/lib64/libosgText.so  
-- Found osgViewer: /usr/lib64/libosgViewer.so  
-- Found osgManipulator: /usr/lib64/libosgManipulator.so  
-- Found osg: /usr/lib64/libosg.so  
-- Found OpenThreads: /usr/lib64/libOpenThreads.so  
-- Found OpenSceneGraph: /usr/lib64/libosgDB.so;/usr/lib64/libosgQt.so;/usr/lib64/libosgGA.so;/usr/lib64/libosgFX.so;/usr/lib64/libosgText.so;/usr/lib64/libosgViewer.so;/usr/lib64/libosgManipulator.so;/usr/lib64/libosg.so;/usr/lib64/libOpenThreads.so (found suitable version "3.4.0", minimum required is "3.4") 
-- Detected Qt/OSG GUI, making plugin
-- QT dirs: /usr/include OPENGL: /usr/include/QtOpenGL
-- Looking for X11/Xlib.h
-- Looking for X11/Xlib.h - found
-- Link libraries: /usr/lib64/libQtDeclarative.so;/usr/lib64/libQtGui.so;/usr/lib64/libQtCore.so;/usr/lib64/libxml2.so;/usr/lib64/libQtOpenGL.so;/usr/lib64/libGLU.so;/usr/lib64/libGL.so;/usr/lib64/libosgDB.so;/usr/lib64/libosgQt.so;/usr/lib64/libosgGA.so;/usr/lib64/libosgFX.so;/usr/lib64/libosgText.so;/usr/lib64/libosgViewer.so;/usr/lib64/libosgManipulator.so;/usr/lib64/libosg.so;/usr/lib64/libOpenThreads.so
-- Detected SoQt/Coin3D GUI, making plugin
-- Looking for dAllocateODEDataForThread
-- Looking for dAllocateODEDataForThread - found
-- Detected ODE multi-threading extensions, but not sure if should enable them... define ODE_USE_MULTITHREAD variable to use them
-- Performing Test NEED_TRIINDEX
-- Performing Test NEED_TRIINDEX - Failed
-- ODE found, building oderave plugin, precision=SINGLE
-- Checking for module 'fcl'
--   Found fcl, version 0.5.0
-- Performing Test FCL_HAS_REPLACEOBJECT
-- Performing Test FCL_HAS_REPLACEOBJECT - Failed
-- Performing Test FCL_SUPPORT_BULK_UPDATE
-- Performing Test FCL_SUPPORT_BULK_UPDATE - Failed
-- Configuring done
CMake Warning (dev) at python/bindings/CMakeLists.txt:66 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "ANN" of target "pyANN_int" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/thofmann/code/openrave/build

This is on Fedora 26 with GCC 7.2.1 20170915 (Red Hat 7.2.1-2) without any patches or custom build flags.

@morxa
Copy link
Contributor Author

morxa commented Oct 6, 2017

The same error occurs with the 0.9.0 release. See the attached cmake.log and
build.log.

I have the following relevant packages installed:

Installed Packages
OpenSceneGraph-devel.x86_64 3.4.0-9.fc26
OpenSceneGraph-qt-devel.x86_64 3.4.0-9.fc26
SoQt-devel.x86_64 1.5.0-21.fc26
ann-devel.x86_64 1.1.2-9.fc26
assimp-devel.x86_64 3.3.1-8.fc26
boost-devel.x86_64 1.63.0-9.fc26
boost-python.x86_64 1.63.0-9.fc26
bullet-devel.x86_64 2.83-3.fc26
cmake.x86_64 3.9.1-1.fc26
collada-dom-devel.x86_64 2.4.4-6.fc26
crlibm-devel.x86_64 1.0-0.14.beta4.fc26
dos2unix.x86_64 7.3.4-2.fc26
doxygen.x86_64 1:1.8.13-9.fc26
fparser-devel.x86_64 4.5.2-5.fc26
gettext.x86_64 0.19.8.1-9.fc26
gmp-devel.x86_64 1:6.1.2-4.fc26
graphviz.x86_64 2.40.1-4.fc26
lapack-devel.x86_64 3.6.1-4.fc26
libxml2-devel.x86_64 2.9.4-2.fc26
minizip-devel.x86_64 1.2.11-2.fc26
mpfi-devel.x86_64 1.5.1-10.fc26
mpfr-devel.x86_64 3.1.5-3.fc26
octave-devel.x86_64 6:4.2.1-3.fc26
ode-devel.x86_64 0.14-4.fc26
pcre-devel.x86_64 8.41-1.fc26
python2-devel.x86_64 2.7.13-12.fc26
qhull-devel.x86_64 2015.2-2.fc26
sympy.noarch 1.1.1-1.fc26

@rdiankov
Copy link
Owner

rdiankov commented Oct 7, 2017

thanks for the heads up. just pushed a fixed to master.

@rdiankov rdiankov closed this as completed Oct 7, 2017
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

2 participants