greenbone / openvas-scanner

This repository contains the scanner component for Greenbone Community Edition.
https://greenbone.github.io/docs/
GNU General Public License v2.0
3.25k stars 605 forks source link

libgcrypt Error During cmake ..; #1681

Closed limitedAtonement closed 1 month ago

limitedAtonement commented 2 months ago

What I did

  1. git clone https://github.com/greenbone/openvas-scanner
  2. cd openvas-scanner
  3. mkdir build
  4. cd build
  5. cmake ..

Expected behavior

cmake creates Makefile and necessary build infrastructure.

Actual behavior

I got the following error:

...
-- Checking for module 'gnutls>=3.2.15'
--   Found gnutls, version 3.8.6
-- Checking for module 'libopenvas_wmiclient>=1.0.5'
--   Package 'libopenvas_wmiclient', required by 'virtual:world', not found
-- Looking for pcap...
-- Looking for netsnmp...
-- Looking for netsnmp... /usr/lib/libnetsnmp.so
-- Looking for libgcrypt...
-- Looking for libgcrypt... /usr/lib/libgcrypt.so
--   found libgcrypt, version 
CMake Error at nasl/CMakeLists.txt:103 (message):
  libgcrypt 1.6 or greater is required

-- Looking for bison...
-- Looking for libgcrypt...
-- Looking for libgcrypt... /usr/lib/libgcrypt.so
--   found libgcrypt, version 
CMake Error at src/CMakeLists.txt:38 (message):
  libgcrypt 1.6 or greater is required

-- Looking for pcap...
-- Looking for pcap... /usr/lib/libpcap.so
-- Looking for pcap-config...
-- Looking for pcap-config... /usr/bin/pcap-config
-- WARNING: pandoc is required to build the HTML user manual.
-- Configuring incomplete, errors occurred!

Environment

Operating system:

Arch Linux

uname -a shows:

Linux ryle 6.9.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 12 Jul 2024 00:06:53 +0000 x86_64 GNU/Linux

cat /etc/lsb-release shows

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"

pacman -Q | \grep libgcrypt shows

lib32-libgcrypt 1.11.0-1
libgcrypt 1.11.0-2

pacman -Ql libgcrypt shows:

libgcrypt /usr/
libgcrypt /usr/bin/
libgcrypt /usr/bin/dumpsexp
libgcrypt /usr/bin/hmac256
libgcrypt /usr/bin/mpicalc
libgcrypt /usr/include/
libgcrypt /usr/include/gcrypt.h
libgcrypt /usr/lib/
libgcrypt /usr/lib/libgcrypt.so
libgcrypt /usr/lib/libgcrypt.so.20
libgcrypt /usr/lib/libgcrypt.so.20.5.0
libgcrypt /usr/lib/pkgconfig/
libgcrypt /usr/lib/pkgconfig/libgcrypt.pc
libgcrypt /usr/share/
libgcrypt /usr/share/aclocal/
libgcrypt /usr/share/aclocal/libgcrypt.m4
libgcrypt /usr/share/info/
libgcrypt /usr/share/info/gcrypt.info-1.gz
libgcrypt /usr/share/info/gcrypt.info-2.gz
libgcrypt /usr/share/info/gcrypt.info.gz
libgcrypt /usr/share/licenses/
libgcrypt /usr/share/licenses/libgcrypt/
libgcrypt /usr/share/licenses/libgcrypt/COPYING.LIB
libgcrypt /usr/share/licenses/libgcrypt/LICENSES
libgcrypt /usr/share/man/
libgcrypt /usr/share/man/man1/
libgcrypt /usr/share/man/man1/hmac256.1.gz

Installation method / source: (packages, source installation)

main branch as of right now: 1ffc0c83.

Logfiles

None

Narrat commented 2 months ago

Noticed that too. And it's odd that it cannot get the version from libgcrypt. Although libgcrypt-config seems to be a bit unreliable?

$  pkg-config libgcrypt-config --version
2.1.1
$  pkg-config libgcrypt-config --cflags 
Package libgcrypt-config was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgcrypt-config.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libgcrypt-config', required by 'virtual:world', not found
$  pkg-config libgcrypt-config --libs   
Package libgcrypt-config was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgcrypt-config.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libgcrypt-config', required by 'virtual:world', not found
$  pkg-config libgcrypt --libs   
-lgcrypt
$  pkg-config libgcrypt --cflags

$  pkg-config libgcrypt --version
2.1.1

Building worked with libgcrypt 1.10.x that I'm sure. Is there a problem with 1.11.x?