vitalif / grive2

Google Drive client with support for new Drive REST API and partial sync
http://yourcmc.ru/wiki/Grive2
GNU General Public License v2.0
1.52k stars 141 forks source link

Could not find libgcrypt libraries #399

Open TheCheddarCheese opened 2 months ago

TheCheddarCheese commented 2 months ago

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 commented 2 months ago

same problem here... snif snif

syahny commented 1 month ago

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

TheCheddarCheese commented 1 month ago

I didn't find one yet sadly. I think the devs might need to fix it (or i can try to but considering my current coding skills i probably won't manage it)

TheCheddarCheese commented 1 month ago

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 commented 1 month ago

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 commented 6 days ago

yeah, same problem here