plasma-desktop 5.9.3 : "no return value" compile failure in boost functions

René J.V. Bertin rjvbertin at gmail.com
Sat Mar 4 13:30:21 UTC 2017


Hello,

I'm building plasma-desktop 5.9.3 on Linux and am seeing compiler failures because of -Werror=return-type, in boost functions. See below for an example. I'm using boost 1.59.0, gcc 6.3 and Qt 5.8.0 (all installed in /opt/local). I've included one of the warnings I also see, in case they're related.

Is there anything obvious I should look for in my set-up before reporting this as a bug?

R.

%> cd .../work/build/kcms/keyboard && /usr/bin/c++   -DKCOREADDONS_LIB -DKGUIADDONS_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"kcmkeyboard\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkcm_keyboard_EXPORTS -I.../work/build/kcms/keyboard -I.../work/plasma-desktop-5.9.3/kcms/keyboard -I.../work/build -I.../work/plasma-desktop-5.9.3/kcms/keyboard/preview -isystem /opt/local/include/qt5 -isystem /opt/local/include/qt5/QtConcurrent -isystem /opt/local/include/qt5/QtCore -isystem /opt/local/share/qt5/mkspecs/linux-g++-64 -isystem /opt/local/include/qt5/QtWidgets -isystem /opt/local/include/qt5/QtGui -isystem /opt/local/include/qt5/QtX11Extras -isystem /opt/local/include/qt5/QtXml -isystem /opt/local/include/KF5/KCMUtils -isystem /opt/local/include/KF5 -isystem /opt/local/include/KF5/KConfigWidgets -isystem /opt/local/include/KF5/KCodecs -isystem /opt/local/include/KF5/KWidgetsAddons -isystem /opt/local/include/KF5/KConfigGui -isystem /opt/local/include/KF5/KConfigCore -isystem /opt/local/include/KF5/KAuth -isystem /opt/local/include/KF5/KCoreAddons -isystem /opt/local/include/KF5/KService -isystem /opt/local/include/KF5/KGlobalAccel -isystem /opt/local/include/qt5/QtDBus -isystem /opt/local/include/KF5/KI18n -isystem /opt/local/include/KF5/KIOCore -isystem /opt/local/include/KF5/KIOWidgets -isystem /opt/local/include/KF5/KJobWidgets -isystem /opt/local/include/qt5/QtNetwork -isystem /opt/local/include/KF5/KCompletion -isystem /opt/local/include/KF5/KWindowSystem -isystem /opt/local/include/KF5/Plasma -isystem /opt/local/include/KF5/KPackage -isystem /opt/local/include/KF5/KXmlGui -isystem /opt/local/include/KF5/KGuiAddons -isystem /opt/local/include/KF5/KIconThemes  -O3 -g -DNDEBUG -m64 -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -fPIC -std=gnu++11 -o CMakeFiles/kcm_keyboard.dir/preview/kbpreviewframe.cpp.o -c .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.cpp
In file included from /opt/local/include/boost/proto/proto_fwd.hpp:15:0,
                 from /opt/local/include/boost/phoenix/core/limits.hpp:26,
                 from /opt/local/include/boost/spirit/include/phoenix_limits.hpp:11,
                 from /opt/local/include/boost/spirit/home/support/meta_compiler.hpp:16,
                 from /opt/local/include/boost/spirit/home/qi/meta_compiler.hpp:14,
                 from /opt/local/include/boost/spirit/home/qi/action/action.hpp:14,
                 from /opt/local/include/boost/spirit/home/qi/action.hpp:14,
                 from /opt/local/include/boost/spirit/home/qi.hpp:14,
                 from /opt/local/include/boost/spirit/include/qi.hpp:16,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/geometry_parser.h:24,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.cpp:22:
/opt/local/include/boost/fusion/support/config.hpp:93:22: warning: "BOOST_GCC_WORKAROUND_GUARD" is not defined [-Wundef]
 #if BOOST_WORKAROUND(BOOST_GCC, < 40700)
                      ^
/opt/local/include/boost/detail/workaround.hpp:234:12: note: in definition of macro ‘BOOST_WORKAROUND’
          ((symbol ## _WORKAROUND_GUARD + 0 == 0) &&     \
            ^~~~~~
/opt/local/include/boost/mpl/aux_/config/operators.hpp:27:29: warning: "__NVCC___WORKAROUND_GUARD" is not defined [-Wundef]
         || BOOST_WORKAROUND(__NVCC__, BOOST_TESTED_AT(1)) \
                             ^
/opt/local/include/boost/detail/workaround.hpp:234:12: note: in definition of macro ‘BOOST_WORKAROUND’
          ((symbol ## _WORKAROUND_GUARD + 0 == 0) &&     \
            ^~~~~~
/opt/local/include/boost/mpl/aux_/config/operators.hpp:27:29: warning: "__NVCC__" is not defined [-Wundef]
         || BOOST_WORKAROUND(__NVCC__, BOOST_TESTED_AT(1)) \
                             ^
/opt/local/include/boost/detail/workaround.hpp:235:11: note: in definition of macro ‘BOOST_WORKAROUND’
          (symbol != 0) && (1 % (( (symbol test) ) + 1)))
           ^~~~~~
<<SNIP>>
In file included from /opt/local/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:23:0,
                 from /opt/local/include/boost/iostreams/stream_buffer.hpp:22,
                 from /opt/local/include/boost/iostreams/stream.hpp:21,
                 from /opt/local/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp:14,
                 from /opt/local/include/boost/spirit/home/qi/stream/stream.hpp:16,
                 from /opt/local/include/boost/spirit/home/qi/stream.hpp:15,
                 from /opt/local/include/boost/spirit/home/qi.hpp:30,
                 from /opt/local/include/boost/spirit/include/qi.hpp:16,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/geometry_parser.h:24,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.cpp:22:
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp: In static member function ‘static std::streampos boost::iostreams::detail::device_wrapper_impl<boost::iostreams::any_tag>::seek(Device&, boost::iostreams::stream_offset, std::ios_base::seekdir, std::ios_base::openmode, boost::iostreams::any_tag)’:
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp:145:5: error: no return statement in function returning non-void [-Werror=return-type]
     }
     ^
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp: In static member function ‘static std::streamsize boost::iostreams::detail::device_wrapper_impl<boost::iostreams::input>::write(Device&, Dummy*, const typename boost::iostreams::char_type_of<T>::type*, std::streamsize)’:
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp:179:45: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
                                             ^
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp: In static member function ‘static std::streamsize boost::iostreams::detail::device_wrapper_impl<boost::iostreams::output>::read(Device&, Dummy*, typename boost::iostreams::char_type_of<T>::type*, std::streamsize)’:
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp:188:45: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
                                             ^
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp: In static member function ‘static std::streampos boost::iostreams::detail::flt_wrapper_impl<boost::iostreams::any_tag>::seek(Filter&, Device*, boost::iostreams::stream_offset, std::ios_base::seekdir, std::ios_base::openmode, boost::iostreams::any_tag)’:
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp:215:45: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
                                             ^
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp: In static member function ‘static std::streamsize boost::iostreams::detail::flt_wrapper_impl<boost::iostreams::input>::write(Filter&, Sink*, const typename boost::iostreams::char_type_of<T>::type*, std::streamsize)’:
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp:263:45: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
                                             ^
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp: In static member function ‘static std::streamsize boost::iostreams::detail::flt_wrapper_impl<boost::iostreams::output>::read(Filter&, Source*, typename boost::iostreams::char_type_of<T>::type*, std::streamsize)’:
/opt/local/include/boost/iostreams/detail/adapter/concept_adapter.hpp:272:45: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
                                             ^
In file included from /opt/local/include/boost/iostreams/detail/buffer.hpp:22:0,
                 from /opt/local/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:24,
                 from /opt/local/include/boost/iostreams/stream_buffer.hpp:22,
                 from /opt/local/include/boost/iostreams/stream.hpp:21,
                 from /opt/local/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp:14,
                 from /opt/local/include/boost/spirit/home/qi/stream/stream.hpp:16,
                 from /opt/local/include/boost/spirit/home/qi/stream.hpp:15,
                 from /opt/local/include/boost/spirit/home/qi.hpp:30,
                 from /opt/local/include/boost/spirit/include/qi.hpp:16,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/geometry_parser.h:24,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.cpp:22:
/opt/local/include/boost/iostreams/checked_operations.hpp: In static member function ‘static bool boost::iostreams::detail::read_write_if_impl<boost::iostreams::input>::put(T&, typename boost::iostreams::char_type_of<T>::type)’:
/opt/local/include/boost/iostreams/checked_operations.hpp:99:49: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(false) }
                                                 ^
/opt/local/include/boost/iostreams/checked_operations.hpp: In static member function ‘static std::streamsize boost::iostreams::detail::read_write_if_impl<boost::iostreams::input>::write(T&, const typename boost::iostreams::char_type_of<T>::type*, std::streamsize)’:
/opt/local/include/boost/iostreams/checked_operations.hpp:105:45: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
                                             ^
/opt/local/include/boost/iostreams/checked_operations.hpp: In static member function ‘static std::streamsize boost::iostreams::detail::read_write_if_impl<boost::iostreams::output>::read(T&, typename boost::iostreams::char_type_of<T>::type*, std::streamsize)’:
/opt/local/include/boost/iostreams/checked_operations.hpp:119:45: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
                                             ^
/opt/local/include/boost/iostreams/checked_operations.hpp: In static member function ‘static std::streampos boost::iostreams::detail::seek_if_impl<boost::iostreams::any_tag>::seek(T&, boost::iostreams::stream_offset, std::ios_base::seekdir, std::ios_base::openmode)’:
/opt/local/include/boost/iostreams/checked_operations.hpp:149:60: error: no return statement in function returning non-void [-Werror=return-type]
       BOOST_IOSTREAMS_UNREACHABLE_RETURN(std::streampos()) }
                                                            ^
.../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.cpp: In member function ‘void KbPreviewFrame::drawKeySymbols(QPainter&, QPoint*, const GShape&, const QString&)’:
.../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.cpp:106:46: warning: ‘constexpr typename std::enable_if<std::is_same<typename std::remove_cv< <template-parameter-1-1> >::type, int>::value, bool>::type operator==(QChar, T) [with T = int; typename std::enable_if<std::is_same<typename std::remove_cv< <template-parameter-1-1> >::type, int>::value, bool>::type = bool]’ is deprecated: don't compare ints to QChars, compare them to QChar::unicode() instead [-Wdeprecated-declarations]
                 QColor txtColor = txt[0] == -1 ? unknownSymbolColor : color[level];
                                              ^
In file included from /opt/local/include/qt5/QtCore/qhashfunctions.h:44:0,
                 from /opt/local/include/qt5/QtCore/qlist.h:47,
                 from /opt/local/include/qt5/QtCore/qmap.h:44,
                 from /opt/local/include/qt5/QtCore/QMap:1,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/keyaliases.h:21,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/keyboardlayout.h:22,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.h:21,
                 from .../work/plasma-desktop-5.9.3/kcms/keyboard/preview/kbpreviewframe.cpp:20:
/opt/local/include/qt5/QtCore/qchar.h:586:1: note: declared here
 operator==(QChar lhs, T rhs) Q_DECL_NOEXCEPT { return lhs == QChar(rhs); }
 ^~~~~~~~
cc1plus: some warnings being treated as errors


More information about the Plasma-devel mailing list