Created attachment 242257 [details] Patch to correct ssl includes. Modification to bug #258345. The include files seem to have moved to ${OPENSSLINC}/openssl (at least here with libressl) and cmake builds looking for the libwebsockets includes will fail since the directory does not exist. For example: CMake Error in src/CMakeLists.txt: Imported target "websockets_shared" includes non-existent path "/usr/local/include/ssl" in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: * The path was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and references files it does not provide.
Created attachment 242268 [details] Disable pkg-config to find OpenSSL This whole workaround for LibreSSL specifically is not quite correct. Instead, better fix the root cause leading to linking two different SSL implementations at the same time (see commit message)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=986cbcf341d665b3c0ca454f76fb98e6c5a690cb commit 986cbcf341d665b3c0ca454f76fb98e6c5a690cb Author: Felix Palmen <zirias@FreeBSD.org> AuthorDate: 2023-05-19 07:06:06 +0000 Commit: Felix Palmen <zirias@FreeBSD.org> CommitDate: 2023-05-19 21:19:02 +0000 net/libwebsockets: Fix build with LibreSSL The build system uses both cmake and pkg-config to find OpenSSL and just combines the results. Our base OpenSSL didn't provide a pkg-config file until recently, but the LibreSSL port does. From the cmake detection, we get absolute library paths, from pkg-config just library names (-lssl). The latter are found in base during linking. The result is linking both OpenSSL and LibreSSL. Therefore add a patch that just skips pkg-config for OpenSSL and remove the broken workaround from the port Makefile. PR: 271495 Approved by: tcberner (mentor, implicit) net/libwebsockets/Makefile | 8 +------- .../files/patch-lib_tls_CMakeLists.txt (new) | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-)