Re: building dar port with libgcrypt enabled

From: Yasuhiro Kimura <>
Date: Mon, 24 Oct 2022 18:39:38 UTC
From: Graham Menhennitt <>
Subject: building dar port with libgcrypt enabled
Date: Tue, 25 Oct 2022 04:12:16 +1100

> Hello,
> I'm trying to build the sysutils/dar port with the GCRYPT option enabled. During he configure stage, I see:
> checking for gpg_err_init in -lgpg-error... no
> checking for gcry_check_version in -lgcrypt... no
> checking gcrypt.h usability... yes
> checking gcrypt.h presence... yes
> checking for gcrypt.h... yes
> checking for libgcrypt usability... failed: need libgcypt >= 1.4.0, disabling strong encryption support
> And yet:
> # pkg info|grep gcrypt
> libgcrypt-1.9.4_1              General purpose cryptographic library based on the code from GnuPG
> This is on 13.1-stable as of a week ago.
> Does anybody have any clues, please?
> Thanks,
>     Graham

According to config.log, configure script fails to detect libgcrypt as

configure:24418: checking for gcry_check_version in -lgcrypt
configure:24443: c++ -o conftest -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -I/usr/local/include  -fstack-protector-strong  conftest.cpp -lgcrypt  -llzma -lbz2 -lz -ldl  >&5
ld: error: unable to find library -lgcrypt
c++: error: linker command failed with exit code 1 (use -v to see invocation)

The link error happens because '-L/usr/local/lib' is lacked from
options to compile conftest. And it is fixed by adding 'localbase' to

I'll submit patch to Bugzilla.

Yasuhiro Kimura