Sylwester Lachiewicz created THRIFT-6378:
--------------------------------------------

             Summary: lib/cpp tests do not compile when OpenSSL is outside the 
default include path
                 Key: THRIFT-6378
                 URL: https://issues.apache.org/jira/browse/THRIFT-6378
             Project: Thrift
          Issue Type: Bug
          Components: C++ - Library, Build Process
    Affects Versions: 0.25.0, 0.24.0
            Reporter: Sylwester Lachiewicz
             Fix For: 0.26.0


[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.



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

Reply via email to