Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find libgcrypt libraries #399

Open
TheCheddarCheese opened this issue Jul 1, 2024 · 6 comments
Open

Could not find libgcrypt libraries #399

TheCheddarCheese opened this issue Jul 1, 2024 · 6 comments

Comments

@TheCheddarCheese
Copy link

When trying to compile on EndeavourOS I get this error:


CMake Error at cmake/Modules/FindLibGcrypt.cmake:49 (message):
  Could not find libgcrypt libraries
Call Stack (most recent call first):
  libgrive/CMakeLists.txt:5 (find_package)

I also tried this on a clean chroot, same thing. libcrypt is installed and up to date.

@kaskaro490
Copy link

same problem here... snif snif

@syahny
Copy link

syahny commented Jul 19, 2024

same problem... me too...
You must be very busy, but sincerely, please tell me a solution to the problem.

@TheCheddarCheese
Copy link
Author

TheCheddarCheese commented Jul 19, 2024 via email

@TheCheddarCheese
Copy link
Author

Try editing cmake/Modules/FindLibGcrypt.cmake and replacing libgcrypt-config with pkg-config (in the line FIND_PROGRAM(LIBGCRYPTCONFIG_EXECUTABLE NAMES libgcrypt-config) ), then build. Dunno how well this will work though

@yate
Copy link

yate commented Jul 27, 2024

I've found that Arch no longer includes the libgcrypt-config executable in the libgcrypt package. I don't know whether or not that is by design, but that seems to be the cause of this breakage.

The solution here may be to look for libgcrypt using pkg-config in libgrive CMakeLists.txt instead of the custom Module, like

diff --git a/libgrive/CMakeLists.txt b/libgrive/CMakeLists.txt
index c56d70c..05ee9d4 100644
--- a/libgrive/CMakeLists.txt
+++ b/libgrive/CMakeLists.txt
@@ -2,7 +2,6 @@ project(libgrive)
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 
-find_package(LibGcrypt REQUIRED)
 find_package(CURL REQUIRED)
 find_package(Backtrace)
 find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex system REQUIRED)
@@ -11,6 +10,7 @@ find_package(CppUnit)
 find_package(Iberty)
 
 find_package(PkgConfig)
+pkg_check_modules(LIBGCRYPT REQUIRED libgcrypt)
 pkg_check_modules(YAJL REQUIRED yajl)
 
 add_definitions(-Wall)

@semeion
Copy link

semeion commented Sep 8, 2024

yeah, same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants