Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link problem for openssl 1.1.1.k #26

Open
bigriver73 opened this issue Apr 26, 2024 · 1 comment
Open

Link problem for openssl 1.1.1.k #26

bigriver73 opened this issue Apr 26, 2024 · 1 comment

Comments

@bigriver73
Copy link

Firstly, for openssl 1.1.1, the SSLv23_method should be changed to TLS_method. But there is still link problem even when building the test suites in the release package:
[100%] Linking CXX executable module-tests ../src/liboatpp-openssl.a(Connection.cpp.o): In function oatpp::openssl::Connection::ConnectionContext::init()': Connection.cpp:(.text+0xc8): undefined reference to SSL_state' ../src/liboatpp-openssl.a(Connection.cpp.o): In function oatpp::openssl::Connection::ConnectionContext::initAsync()::HandshakeCoroutine::act()': Connection.cpp:(.text+0x32f): undefined reference to SSL_state' collect2: error: ld returned 1 exit status make[2]: *** [test/CMakeFiles/module-tests.dir/build.make:152: test/module-tests] Error 1 make[1]: *** [CMakeFiles/Makefile2:142: test/CMakeFiles/module-tests.dir/all] Error 2 make: *** [Makefile:146: all] Error 2
It is very strange that there is no definition of SSL_state in the openssl.

@bigriver73
Copy link
Author

I find the root cause of this problem. In my building environment, there is another version of openssl in the directory /usr/local/include. Though the cmake detects the proper version, the /usr/local/include may be set before the /usr/include in the make file. I am not quite familiar with cmake, but I am wondering if there is any problem in the cmake file which may cause this problem.

oatpp-openssl module. Resolving dependencies...

OPENSSL_INCLUDE_DIR=/usr/include
OPENSSL_LIBRARIES=/usr/lib64/libssl.so;/usr/lib64/libcrypto.so
OPENSSL_VERSION=1.1.1k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant