engine: Could not load engine on macOS
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:
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
Also OPENSSL_CONF
variable points to openssl.conf from example.
gcc --version:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
When I try to load engine with sh openssl engine -vvv
:
4402085376:error:2506406A:DSO support routines:dlfcn_bind_func:could not bind to the requested symbol name:crypto/dso/dso_dlfcn.c:188:symname(bind_engine): dlsym(0x7fd91c61a1c0, bind_engine): symbol not found
4402085376:error:2506C06A:DSO support routines:DSO_bind_func:could not bind to the requested symbol name:crypto/dso/dso_lib.c:186:
4402085376:error:260B6068:engine routines:dynamic_load:DSO failure:crypto/engine/eng_dyn.c:427:
4402085376:error:2606A074:engine routines:ENGINE_by_id:no such engine:crypto/engine/eng_list.c:334:id=gost
4402085376:error:260BC066:engine routines:int_engine_configure:engine configuration error:crypto/engine/eng_cnf.c:141:section=gost_section, name=default_algorithms, value=ALL
4402085376:error:0E07606D:configuration file routines:module_run:module initialization error:crypto/conf/conf_mod.c:177:module=engines, value=engine_section, retcode=-1
There is no bind_engine symbol:
nm /usr/local/opt/openssl@1.1/lib/engines-1.1/gost.dylib | grep bind_engine
How to fix it?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 18 (11 by maintainers)
(this reminds me: I actually have access to a Mac since recently!)
This was solved on the master branch with #27. @beldmit, should I backport that? The above is exactly the sort of issue you get into when you treat what’s to be a dynamically loadable module as a shared library with cmake.