I am currently attempting to update the softethervpn5 package, since the existing version stopped working on newer kernels (from the 22.x series, as far as I can tell). The fix involves updating the underlying SoftetherVPN libraries to a newer build. While I can cobble a working build together with some manual intervention, I am unfortunately stumped how to achieve a reliable build system build.
The issue:
The softethervpn5/host library compilation fails in a check for two OpenSSL functions. Specifically, those library builds include the following in a CMakeLists:
find_package(OpenSSL REQUIRED)
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
set(CMAKE_REQUIRED_LIBRARIES OpenSSL::SSL)
check_symbol_exists(EVP_PKEY_get_raw_public_key "openssl/evp.h" HAVE_EVP_PKEY_GET_RAW_PUBLIC_KEY)
check_symbol_exists(SSL_CTX_set_num_tickets "openssl/ssl.h" HAVE_SSL_CTX_SET_NUM_TICKETS)
But, those aren't included in the LibreSSL (?) that it locates:
-- Found OpenSSL: /home/tew/openwrt-sdk/staging_dir/host/lib/libcrypto.a (found version "2.0.0")
-- Looking for EVP_PKEY_get_raw_public_key
-- Looking for EVP_PKEY_get_raw_public_key - not found
-- Looking for SSL_CTX_set_num_tickets
-- Looking for SSL_CTX_set_num_tickets - not found
CMake Error at src/Mayaqua/CMakeLists.txt:34 (message):
Required EVP_PKEY_get_raw_public_key() not found in OpenSSL library!
Now, the package Makefile does specify DEPENDS:= +libopenssl
, and the proper OpenSSL libraries are in fact being compiled -- only they are under /staging_dir/target-mips_24kc_musl/usr/
where they are either not found or overridden by those in /staging_dir/host/
.
The question then: How to force-include the "correct" OpenSSL version?
Any help is much appreciated!
Attempted Solution:
I did try adding openssl
to HOST_BUILD_DEPENDS
and/or PKG_BUILD_DEPENDS
, but that did not change anything at all as far as I could ascertain.
I also tried openssl/host
for HOST_BUILD_DEPENDS
, but that yields the Warning: build dependency on 'openssl/host', which does not exist
How I was able to force the build:
I eliminated the offending symbol checks for the host library build. But that doesn't seem like the smartest solution.