-Wdeprecated_declarations: where to put it?

Asked by Luc OGER

during the make process of a dialy yade compilation, I got a huge number of lines saying that some declarations are deprecated.
the compiler suggets to include the option -Wdeprecated_declarations, but where to put it in order to avoid all these warnings?

exemple :
/usr/include/eigen3/Eigen/src/Core/Functors.h:977:28: warning: 'template<class _Operation> class std::binder1st' is deprecated [-Wdeprecated-declarations]
 struct functor_traits<std::binder1st<T> >
or
usr/include/boost/type_traits/detail/ice_eq.hpp:17:70: note: #pragma message: NOTE: Use of this header (ice_eq.hpp) is deprecated
 # pragma message("NOTE: Use of this header (ice_eq.hpp) is deprecated")

PS I am using Opensuse 42 tumbleweed with gcc version 6 and python 3

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Hi,

as far as I see, those warnings are originated from
Eigen and boost. Please provide versions of both.
Also it would be good to see the full compilation
log.

Regards,

Anton

--

Anton

Revision history for this message
Luc OGER (luc-oger) said :
#2

I am using minieigen0.5.3 and boost 1.60.0-4.9
and the full log of errors has 14964 lines so I will no tput it here.
here the beginning:
[ 0%] Automatic moc for target boot
Generating moc compilation boot_automoc.cpp
[ 0%] Built target boot_automoc
[ 1%] Automatic moc for target yade
Generating moc compilation yade_automoc.cpp
[ 1%] Built target yade_automoc
[ 1%] Automatic moc for target _GLViewer
Generating moc source _GLViewer_automoc.dir/qt5/moc_GLViewer.cpp
Generating moc source _GLViewer_automoc.dir/qt5/moc_OpenGLManager.cpp
Generating moc compilation _GLViewer_automoc.cpp
[ 1%] Built target _GLViewer_automoc
Scanning dependencies of target _GLViewer
[ 2%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt5/GLViewer.cpp.o
In file included from /usr/include/boost/type_traits/ice.hpp:15:0,
                 from /usr/include/boost/python/detail/def_helper.hpp:9,
                 from /usr/include/boost/python/class.hpp:29,
                 from /usr/include/boost/python.hpp:18,
                 from /home/oger/Yade/trunk/lib/base/Math.hpp:54,
                 from /home/oger/Yade/trunk/core/Omega.hpp:20,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.hpp:6,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.cpp:11:
/usr/include/boost/type_traits/detail/ice_or.hpp:17:70: note: #pragma message: NOTE: Use of this header (ice_or.hpp) is deprecated
 # pragma message("NOTE: Use of this header (ice_or.hpp) is deprecated")
                                                                      ^
In file included from /usr/include/boost/type_traits/ice.hpp:16:0,
                 from /usr/include/boost/python/detail/def_helper.hpp:9,
                 from /usr/include/boost/python/class.hpp:29,
                 from /usr/include/boost/python.hpp:18,
                 from /home/oger/Yade/trunk/lib/base/Math.hpp:54,
                 from /home/oger/Yade/trunk/core/Omega.hpp:20,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.hpp:6,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.cpp:11:
/usr/include/boost/type_traits/detail/ice_and.hpp:18:71: note: #pragma message: NOTE: Use of this header (ice_and.hpp) is deprecated
 # pragma message("NOTE: Use of this header (ice_and.hpp) is deprecated")
                                                                       ^
In file included from /usr/include/boost/type_traits/ice.hpp:17:0,
                 from /usr/include/boost/python/detail/def_helper.hpp:9,
                 from /usr/include/boost/python/class.hpp:29,
                 from /usr/include/boost/python.hpp:18,
                 from /home/oger/Yade/trunk/lib/base/Math.hpp:54,
                 from /home/oger/Yade/trunk/core/Omega.hpp:20,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.hpp:6,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.cpp:11:
/usr/include/boost/type_traits/detail/ice_not.hpp:17:71: note: #pragma message: NOTE: Use of this header (ice_not.hpp) is deprecated
 # pragma message("NOTE: Use of this header (ice_not.hpp) is deprecated")
                                                                       ^
In file included from /usr/include/boost/type_traits/ice.hpp:18:0,
                 from /usr/include/boost/python/detail/def_helper.hpp:9,
                 from /usr/include/boost/python/class.hpp:29,
                 from /usr/include/boost/python.hpp:18,
                 from /home/oger/Yade/trunk/lib/base/Math.hpp:54,
                 from /home/oger/Yade/trunk/core/Omega.hpp:20,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.hpp:6,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.cpp:11:
/usr/include/boost/type_traits/detail/ice_eq.hpp:17:70: note: #pragma message: NOTE: Use of this header (ice_eq.hpp) is deprecated
 # pragma message("NOTE: Use of this header (ice_eq.hpp) is deprecated")
                                                                      ^
In file included from /usr/include/eigen3/Eigen/Core:276:0,
                 from /home/oger/Yade/trunk/lib/base/Math.hpp:89,
                 from /home/oger/Yade/trunk/core/Omega.hpp:20,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.hpp:6,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.cpp:11:
/usr/include/eigen3/Eigen/src/Core/Functors.h:973:28: warning: ‘template<class _Operation> class std::binder2nd’ is deprecated [-Wdeprecated-declarations]
 struct functor_traits<std::binder2nd<T> >
                            ^~~~~~~~~
In file included from /usr/include/c++/6/bits/stl_function.h:1128:0,
                 from /usr/include/c++/6/string:48,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iterator:64,
                 from /usr/include/boost/operators.hpp:86,
                 from /usr/include/boost/date_time/time_duration.hpp:13,
                 from /usr/include/boost/date_time/posix_time/posix_time_config.hpp:16,
                 from /usr/include/boost/date_time/posix_time/posix_time_system.hpp:13,
                 from /usr/include/boost/date_time/posix_time/ptime.hpp:12,
                 from /usr/include/boost/date_time/posix_time/posix_time.hpp:15,
                 from /home/oger/Yade/trunk/core/Omega.hpp:14,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.hpp:6,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.cpp:11:
/usr/include/c++/6/backward/binders.h:143:11: note: declared here
     class binder2nd
           ^~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:276:0,
                 from /home/oger/Yade/trunk/lib/base/Math.hpp:89,
                 from /home/oger/Yade/trunk/core/Omega.hpp:20,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.hpp:6,
                 from /home/oger/Yade/trunk/gui/qt5/GLViewer.cpp:11:
/usr/include/eigen3/Eigen/src/Core/Functors.h:977:28: warning: ‘template<class _Operation> class std::binder1st’ is deprecated [-Wdeprecated-declarations]
 struct functor_traits<std::binder1st<T> >

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

I assume you are misinterpreting the output.

You are getting warnings like

/usr/include/eigen3/Eigen/src/Core/Functors.h:977:28: warning: ‘template<class _Operation> class std::binder1st’ is deprecated [-Wdeprecated-declarations]

because the compilation command is including the option "-Wdeprecated-declarations"

Ina any case these messages are only warnings and should not have any negative effect.

Revision history for this message
Anton Gladky (gladky-anton) said :
#4

One need to have a closer look, but it seems that the most of warnings are coming from eigen or (and) boost.

If you want to investigate it further, please create a small c++-program and include:
#include <boost/python.hpp>

Check whether you get the same warning.

Regards

Anton

Revision history for this message
Anton Gladky (gladky-anton) said :
#5

One need to have a closer look, but it seems that the most of warnings are coming from eigen or (and) boost.

If you want to investigate it further, please create a small c++-program and include:
#include <boost/python.hpp>

Check whether you get the same warning.

Regards

Anton

Can you help with this problem?

Provide an answer of your own, or ask Luc OGER for more information if necessary.

To post a message you must log in.