Bug 367481 - libktorrent fails to build against libgcrypt version 1.7.2-beta
Summary: libktorrent fails to build against libgcrypt version 1.7.2-beta
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian unstable Linux
: NOR major
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-18 08:04 UTC by jm.ouwerkerk
Modified: 2016-08-27 12:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jm.ouwerkerk 2016-08-18 08:04:45 UTC
FindLibGcrypt cmake rejects the version string 1.7.2-beta and wrong considers it to be less (older) than "1.4.5" apparently. At a guess, this is due to the "-beta" breaking version string parsing.

As a result building from source is broken on systems with libgcrypt 1.7.2-beta. Presumably the issue will reappear every time a beta version of libgcrypt is used.


Reproducible: Always

Steps to Reproduce:
1. apt-get install <dependencies>, including libgcrypt20-dev
2. Setup kdesrc-build
3. Execute kdesrc-build libktorrent

Actual Results:  
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find LibGcrypt: Found unsuitable version "#define GCRYPT_VERSION
  "1.7.2-beta".#define GCRYPT_VERSION "1.7.2-beta".#define GCRYPT_VERSION
  "1.7.2-beta"", but required is at least "1.4.5" (found /usr/include)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindLibGcrypt.cmake:108 (find_package_handle_standard_args)
  CMakeLists.txt:59 (find_package)5

Expected Results:  
I'd expect the cmake file to accept libgcrypt 1.7.2. beta as a valid instance of the libgcrypt dependency.

sudo apt-cache policy libgcrypt20-dev
libgcrypt20-dev:
  Installed: 1.7.2-2
  Candidate: 1.7.2-2
  Version table:
 *** 1.7.2-2 500
        500 http://ftp.nl.debian.org/debian sid/main amd64 Packages
        500 http://ftp.nl.debian.org/debian testing/main amd64 Packages
        100 /var/lib/dpkg/status
Comment 1 jm.ouwerkerk 2016-08-18 09:16:12 UTC
I've posted a possible fix to reviewboard; see also: https://git.reviewboard.kde.org/r/128706/
Comment 2 jm.ouwerkerk 2016-08-27 12:53:30 UTC
Pushed the fix to master just now.