[ 
https://issues.apache.org/jira/browse/THRIFT-5785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849996#comment-17849996
 ] 

Petr Mánek commented on THRIFT-5785:
------------------------------------

Can I please get anybody to comment on this? My initial report is nearly 2 
weeks old, and this is preventing us from running clean downstream builds under 
macOS.

To raise a bit of awareness, I will try tagging Thrift-adjacent users that I 
saw in recent threads. Apologies in advance. [~jensg] [~jking3] [~janosvitok] 

> TTransportException.h includes 'boost/numeric/conversion/cast.hpp' without 
> target depending on Boost
> ----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-5785
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5785
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>         Environment: * macOS 14 (Sonoma)
>  * Host is x86_64, cross-compiling universal binaries for x86_64+aarch64
>  * CMake 3.29, dependencies managed through conventional use of find_package()
>  * AppleClang 15.0.0.15000100
>  * Compiling with -std=gnu++20
>  * Boost 1.81 (from MacPorts)
>  * Apache Thrift 0.20 (from MacPorts, recently upgraded)
>            Reporter: Petr Mánek
>            Priority: Major
>
> Hello, ever since upgrading from version 0.19 to 0.20, I am seeing a new 
> error when compiling my Thrift-based software:
> {code:java}
> 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> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to