-
Notifications
You must be signed in to change notification settings - Fork 173
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
Could not load engine on macOS #353
Comments
Could you please check that you didn't build openssl with -DOPENSSL_NO_DYNAMIC_ENGINE ? |
Seems like there is no such option here: |
Could you please add explicit |
I've tried to build openssl with shared argument:
Then installed it and rebuilt gost engine. But it didn't fix the issue. |
Speaking frankly, I have no ideas. The MacOS tests run on regular basis during the CI, and the engine initialization code is here for ages. Could you check that you built the engine against the OpenSSL you built, not against the system one? |
otool -L /usr/local/Cellar/[email protected]/1.1.1l/lib/engines-1.1/gost.1.1.dylib
/usr/local/Cellar/[email protected]/1.1.1l/lib/engines-1.1/gost.1.1.dylib:
@rpath/gost.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
/usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5) |
Maybe the issue related to compiler version? Is clang fully supported? |
I didn't come across any clang-related issues before. |
I had to modify this line https://github.com/gost-engine/engine/blob/openssl_1_1_1/CMakeLists.txt#L88 |
If you do it, it would be great. I don't understand the MacOs model here at all and we didn't get this issue with the commercial implementation... |
Well, the Linux model is really not better, you just happen to cheat a lot 😉 |
Essentially, a plugin is not a shared library and vice versa, conceptually speaking. But, on some platforms, this is just a naming difference, while on others, the difference is more tangible. |
@x87-va, this is a quick hack that should probably produce what you want. Beware, though, that the tests will fail miserably, they aren't prepared for this... diff --git a/CMakeLists.txt b/CMakeLists.txt
index d86737a..74af03d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -265,9 +265,9 @@ add_library(gost_core STATIC ${GOST_LIB_SOURCE_FILES})
set_target_properties(gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(gost_core PRIVATE OpenSSL::Crypto)
-add_library(gost_engine SHARED ${GOST_ENGINE_SOURCE_FILES})
+add_library(gost_engine MODULE ${GOST_ENGINE_SOURCE_FILES})
set_target_properties(gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "gost")
-set_target_properties(gost_engine PROPERTIES VERSION ${GOST_SOVERSION} SOVERSION ${GOST_SOVERSION})
+#set_target_properties(gost_engine PROPERTIES VERSION ${GOST_SOVERSION} SOVERSION ${GOST_SOVERSION})
target_link_libraries(gost_engine PRIVATE gost_core)
add_library(gost_engine_static STATIC ${GOST_ENGINE_SOURCE_FILES}) |
Now I have build error:
|
Yeah, I'll look through that, it didn't get right on Linux even, for reasons that currently escape me. Be back in a day or two |
(this reminds me: I actually have access to a Mac since recently!) |
Are there any updates? |
Hello.
I have issues when trying to use engine on macOS 11.5 with OpenSSL 1.1.1l installed from Homebrew.
I've built engine from branch openssl_1_1_1 with variables:
Also
OPENSSL_CONF
variable points to openssl.conf from example.gcc --version:
When I try to load engine with
sh openssl engine -vvv
:There is no bind_engine symbol:
How to fix it?
The text was updated successfully, but these errors were encountered: