Skip to content

error: cannot use 'typeid' with '-fno-rtti' when building on Debian 11 #977

@pboguslawski

Description

@pboguslawski

After recent Debian 11 updates manticoresearch 5.0.3 compilation failed with error...

-- Generate globalaliases.h from [...]/manticoresearch/manticoresearch/src/charsets/*.txt
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:141 (find_package):
  Could not find a package configuration file provided by "boost_filesystem"
  (requested version 1.74.0) with any of the following names:

    boost_filesystemConfig.cmake
    boost_filesystem-config.cmake
 
  Add the installation prefix of "boost_filesystem" to CMAKE_PREFIX_PATH or
  set "boost_filesystem_DIR" to a directory containing one of the above
  files.  If "boost_filesystem" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:258 (boost_find_component)
  /usr/share/cmake-3.21/Modules/FindBoost.cmake:594 (find_package)
  src/CMakeLists.txt:122 (find_package)

after installing libboost-filesystem-dev 5.0.3 compilation now fails with

[...]/manticoresearch/manticoresearch/src/std/thread_annotations.h:92:32: warning: backslash-newline at end of file
   92 | #define UNLOCK_FUNCTION( ... ) \
      |                                 
In file included from /usr/include/boost/asio/execution.hpp:19,
                 from /usr/include/boost/asio/system_executor.hpp:20,
                 from /usr/include/boost/asio/associated_executor.hpp:22,
                 from /usr/include/boost/asio/detail/bind_handler.hpp:20,
                 from /usr/include/boost/asio/detail/wrapped_handler.hpp:18,
                 from /usr/include/boost/asio/io_context.hpp:23,
                 from /usr/include/boost/asio/io_service.hpp:18,
                 from [...]/manticoresearch/manticoresearch/src/searchdbuddy.cpp:16:
/usr/include/boost/asio/execution/any_executor.hpp: In static member function 'static const std::type_info& boost::asio::execution::detail::any_executor_base::target_type_void()':
/usr/include/boost/asio/execution/any_executor.hpp:811:23: error: cannot use 'typeid' with '-fno-rtti'
  811 |     return typeid(void);
      |                       ^
/usr/include/boost/asio/execution/any_executor.hpp: In static member function 'static const std::type_info& boost::asio::execution::detail::any_executor_base::target_type_ex()':
/usr/include/boost/asio/execution/any_executor.hpp:851:21: error: cannot use 'typeid' with '-fno-rtti'
  851 |     return typeid(Ex);
      |                     ^
In file included from [...]/manticoresearch/manticoresearch/src/std/bitvec.h:68,
                 from [...]/manticoresearch/manticoresearch/src/sphinxstd.h:61,
                 from [...]/manticoresearch/manticoresearch/src/sphinxutils.h:22,
                 from [...]/manticoresearch/manticoresearch/src/searchdtask.h:18,
                 from [...]/manticoresearch/manticoresearch/src/searchdbuddy.cpp:13:
[...]/manticoresearch/manticoresearch/src/std/bitvec_impl.h: In instantiation of 'void BitVec_T<T, STATICBITS>::Swap(BitVec_T<T, STATICBITS>&) [with T = unsigned int; int STATICBITS = 128]':
[...]/manticoresearch/manticoresearch/src/std/bitvec_impl.h:85:2:   required from 'BitVec_T<T, STATICBITS>& BitVec_T<T, STATICBITS>::operator=(BitVec_T<T, STATICBITS>) [with T = unsigned int; int STATICBITS = 128]'
[...]/manticoresearch/manticoresearch/src/sphinxrt.h:370:78:   required from here
[...]/manticoresearch/manticoresearch/src/std/bitvec_impl.h:45:23: warning: comparison of integer expressions of different signedness: 'int' and 'const unsigned int' [-Wsign-compare]
   45 |   for ( auto i = 0; i < STATICSIZE; ++i )
      |                     ~~^~~~~~~~~~~~
[...]/manticoresearch/manticoresearch/src/std/bitvec_impl.h:51:23: warning: comparison of integer expressions of different signedness: 'int' and 'const unsigned int' [-Wsign-compare]
   51 |   for ( auto i = 0; i < STATICSIZE; ++i )
      |                     ~~^~~~~~~~~~~~
[...]/manticoresearch/manticoresearch/src/std/bitvec_impl.h:60:23: warning: comparison of integer expressions of different signedness: 'int' and 'const unsigned int' [-Wsign-compare]
   60 |   for ( auto i = 0; i < STATICSIZE; ++i )
      |                     ~~^~~~~~~~~~~~
gmake[2]: *** [src/CMakeFiles/lsearchd.dir/build.make:563: src/CMakeFiles/lsearchd.dir/searchdbuddy.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:474: src/CMakeFiles/lsearchd.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

Probably related with chriskohlhoff/asio#533

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions