Nheko-Reborn / mtxclient

Client API library for Matrix, built on top of libcurl
MIT License
40 stars 25 forks source link

Build failure - Hunter/OpenSSL #99

Closed adventurist closed 1 year ago

adventurist commented 1 year ago

Hello again, I have been running into an issue with OpenSSL where rm -rfing ~/.hunter still doesn't appear to resolve the issue

Description

CMake fails

Branch / Commit

master / f4425af712afc6ad704a39b93c912432bd3c1914

OS

Arch with Kernel version 5.18.16-arch1-1

Compiler

GCC / G++ gcc (GCC) 13.1.1

Procedure

cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DHUNTER_ENABLED=ON -DUSE_BUNDLED_OPENSSL=OFF -DBUILD_LIB_TESTS=OFF -DBUILD_LIB_EXAMPLES=OFF

Result


CMake Warning (dev) at /usr/share/cmake/Modules/ExternalProject.cmake:3091 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/ExternalProject.cmake:4208 (_ep_add_download_command)
  CMakeLists.txt:4 (ExternalProject_Add)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- [hunter] Initializing Hunter workspace (ca7838dded9a1811b04ffd56175f629e0af82d3d)
-- [hunter]   https://github.com/cpp-pm/hunter/archive/v0.24.8.tar.gz
-- [hunter]   -> /home/logicp/.hunter/_Base/Download/Hunter/0.24.8/ca7838d
CMake Error at /home/logicp/.hunter/_Base/Download/Hunter/0.24.8/ca7838d/Unpacked/cmake/find/FindOpenSSL.cmake:309 (message):
  Incorrect OPENSSL_VERSION_NUMBER define in header:
  /usr/include/openssl/opensslv.h
Call Stack (most recent call first):
  CMakeLists.txt:97 (find_package)

OpenSSL issues had come up in the past, but I'd always been able to get around them. In this case, even with examples/tests off and a clean ~/.hunter

adventurist commented 1 year ago

This was solved by reverting to the bundled OPENSSL. (I had to previously disable it and use the system's library due to a dependency conflict, but I have de-coupled that dependency, thus I can use the bundled one successfully). Maybe something to keep an eye on, however, in the case of builds where decoupling is not feasible