libevent
libevent copied to clipboard
Missing OpenSSL Documentation
I believe that libevent has a dependency on OpenSSL (found this here). However, this isn't documented anywhere on the README and the lack of specifics here created a problem with my install on Windows 10. Steps to repro:
git clone https://github.com/libevent/libevent.git
mkdir libevent/.build
cd libevent/.build
cmake -G "NMake Makefiles" ..
These are the exact steps documented in the README, but gives the error:
CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
There are two steps you should take to resolve this issue:
(1) Install openssl on Windows You can simply download the installation package from here and double click it. Or you can download source code from official website and build/install by yourself, but it is a troublesome case.
(2) set the OPENSSL_ROOT_DIR
system variable
set "OPENSSL_ROOT_DIR=D:\tools\OpenSSL-Win64"
Then build following the README.
It is really a frequently asked question, and it is missing in the documentation.
Or you can simply disable openssl support with cmake -DEVENT__DISABLE_OPENSSL=ON
@isaaczinda did you resolve your problem?
FWIW @ygj6 added few notes about this in #842
This certainly resolves my issue! #842 is exactly the kind of documentation that would have been helpful to me when building. Once that PR is merged, feel free to close this.
I would also like to know which OpenSSL versions are official supported
For now upstream libevent supports:
- openssl <1.1
- openssl >=1.1 (lots of deprecated API and new helpers)
- libressl
- and other compatible libs
But libevent 2.0 supports only openssl <1.1 and compatible to it libraries
Does it support openssl3.0?
Does it support openssl3.0?
@tiantianaixuexi just tried and yes openssl 3.0 is compatible with openssl 1.1 (but note that you need to compile libevent with openssl 3.0, since I'm not sure that they are ABI compatible).
P.S. although there will be few deprecated API usages, feel free to send PR
Since this PR (https://github.com/libevent/libevent/pull/1028) got merged you might want to add the flag -DEVENT__DISABLE_MBEDTLS=ON
or install mbedtls