Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5785

TTransportException.h includes 'boost/numeric/conversion/cast.hpp' without target depending on Boost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.20.0
    • None
    • None
    • None

    Description

      Hello, ever since upgrading from version 0.19 to 0.20, I am seeing a new error when compiling my Thrift-based software:

      In file included from /redacted/RemoteControl.cpp:7:
      In file included from /redacted/RemoteControl.h:10:
      In file included from /opt/local/lib/../include/thrift/TDispatchProcessor.h:22:
      In file included from /opt/local/lib/../include/thrift/TProcessor.h:24:
      In file included from /opt/local/lib/../include/thrift/protocol/TProtocol.h:46:
      In file included from /opt/local/lib/../include/thrift/transport/TTransport.h:25:
      /opt/local/lib/../include/thrift/transport/TTransportException.h:23:10: fatal error: 'boost/numeric/conversion/cast.hpp' file not found
      #include <boost/numeric/conversion/cast.hpp> 

      I have confirmed that 'cast.hpp' is correctly installed in my system, but for some reason CMake does not add its include path to compiler invocation, so the file is not seen during compilation. Furthermore, based on synthesized compiler flags it seems that Thrift's CMake package does not declare public dependency on boost::numeric, but nonetheless includes it in public headers. This may be related to THRIFT-5660.

      For now I mitigate this issue by making my CMake target explicitly depend on Apache Thrift as well as boost::numeric. However, since I do not directly use Boost whereas Thrift does, I should not have to do that. Instead, it seems much more cleaner to me if Thrift publicly depended on boost::numeric or removed the offending #include directive from its public headers.

      Attachments

        Activity

          People

            Unassigned Unassigned
            petrmanek Petr Mánek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: