[
https://issues.apache.org/jira/browse/THRIFT-6378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylwester Lachiewicz updated THRIFT-6378:
-----------------------------------------
Description:
[lib/cpp/test/Makefile.am|https://github.com/apache/thrift/blob/master/lib/cpp/test/Makefile.am]
builds the SSL and non-blocking server tests against OpenSSL and libevent, but
its {{AM_CPPFLAGS}} carries neither {{$(OPENSSL_INCLUDES)}} nor
{{$(LIBEVENT_CPPFLAGS)}}, and its {{AM_LDFLAGS}} lacks {{$(LIBEVENT_LDFLAGS)}}.
[test/cpp/Makefile.am|https://github.com/apache/thrift/blob/master/test/cpp/Makefile.am]
lacks {{$(OPENSSL_INCLUDES)}}. Where OpenSSL or libevent is not on the
compiler's default search path, as with Homebrew
({{--with-openssl=/opt/homebrew/opt/openssl@3
--with-libevent=/opt/homebrew/opt/libevent}}), these do not build:
{noformat}
../../../lib/cpp/src/thrift/transport/TWebSocketServer.h:27:10: fatal error:
'openssl/sha.h' file not found
OpenSSLManualInitTest.cpp:28:10: fatal error: 'openssl/evp.h' file not found
../../../lib/cpp/src/thrift/transport/TSSLSocket.h:27:10: fatal error:
'openssl/ssl.h' file not found
../../../lib/cpp/src/thrift/server/TNonblockingServer.h:44:10: fatal error:
'event.h' file not found
ld: library 'event' not found
{noformat}
OpenSSLManualInitTest and TSSLSocketMatchNameTest were affected in 0.24.0
already; TWebSocketServerTest joined UnitTests in 0.25.0 (THRIFT-6177).
[lib/cpp/Makefile.am|https://github.com/apache/thrift/blob/master/lib/cpp/Makefile.am]
already adds these paths for the library itself. The CMake build is not
affected.
was:
[lib/cpp/test/Makefile.am|https://github.com/apache/thrift/blob/master/lib/cpp/test/Makefile.am]
links the SSL tests against OpenSSL ({{$(OPENSSL_LDFLAGS) $(OPENSSL_LIBS)}})
but its {{AM_CPPFLAGS}} does not carry {{$(OPENSSL_INCLUDES)}}. Where OpenSSL
is not on the compiler's default search path, as with Homebrew
({{--with-openssl=/opt/homebrew/opt/openssl@3}}), the tests that include
OpenSSL headers do not compile:
{noformat}
../../../lib/cpp/src/thrift/transport/TWebSocketServer.h:27:10: fatal error:
'openssl/sha.h' file not found
OpenSSLManualInitTest.cpp:28:10: fatal error: 'openssl/evp.h' file not found
../../../lib/cpp/src/thrift/transport/TSSLSocket.h:27:10: fatal error:
'openssl/ssl.h' file not found
{noformat}
OpenSSLManualInitTest and TSSLSocketMatchNameTest were affected in 0.24.0
already; TWebSocketServerTest joined UnitTests in 0.25.0 (THRIFT-6177).
[lib/cpp/Makefile.am|https://github.com/apache/thrift/blob/master/lib/cpp/Makefile.am]
already adds {{$(OPENSSL_INCLUDES)}}. The CMake build is not affected.
Summary: lib/cpp and test/cpp tests do not build when OpenSSL or
libevent is outside the default search path (was: lib/cpp tests do not compile
when OpenSSL is outside the default include path)
> lib/cpp and test/cpp tests do not build when OpenSSL or libevent is outside
> the default search path
> ---------------------------------------------------------------------------------------------------
>
> Key: THRIFT-6378
> URL: https://issues.apache.org/jira/browse/THRIFT-6378
> Project: Thrift
> Issue Type: Bug
> Components: Build Process, C++ - Library
> Affects Versions: 0.24.0, 0.25.0
> Reporter: Sylwester Lachiewicz
> Priority: Minor
> Fix For: 0.26.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> [lib/cpp/test/Makefile.am|https://github.com/apache/thrift/blob/master/lib/cpp/test/Makefile.am]
> builds the SSL and non-blocking server tests against OpenSSL and libevent,
> but its {{AM_CPPFLAGS}} carries neither {{$(OPENSSL_INCLUDES)}} nor
> {{$(LIBEVENT_CPPFLAGS)}}, and its {{AM_LDFLAGS}} lacks
> {{$(LIBEVENT_LDFLAGS)}}.
> [test/cpp/Makefile.am|https://github.com/apache/thrift/blob/master/test/cpp/Makefile.am]
> lacks {{$(OPENSSL_INCLUDES)}}. Where OpenSSL or libevent is not on the
> compiler's default search path, as with Homebrew
> ({{--with-openssl=/opt/homebrew/opt/openssl@3
> --with-libevent=/opt/homebrew/opt/libevent}}), these do not build:
> {noformat}
> ../../../lib/cpp/src/thrift/transport/TWebSocketServer.h:27:10: fatal error:
> 'openssl/sha.h' file not found
> OpenSSLManualInitTest.cpp:28:10: fatal error: 'openssl/evp.h' file not found
> ../../../lib/cpp/src/thrift/transport/TSSLSocket.h:27:10: fatal error:
> 'openssl/ssl.h' file not found
> ../../../lib/cpp/src/thrift/server/TNonblockingServer.h:44:10: fatal error:
> 'event.h' file not found
> ld: library 'event' not found
> {noformat}
> OpenSSLManualInitTest and TSSLSocketMatchNameTest were affected in 0.24.0
> already; TWebSocketServerTest joined UnitTests in 0.25.0 (THRIFT-6177).
> [lib/cpp/Makefile.am|https://github.com/apache/thrift/blob/master/lib/cpp/Makefile.am]
> already adds these paths for the library itself. The CMake build is not
> affected.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)