Trying to install gvm-libs from source on a CentOS 7 minimal install, I started with installing what I believe are the needed prerequisites for GVM libraries 10.0.2, OpenVAS Scanner 6.2.0, GVM 8.0.2 and GSA 8.0.2, per the install docs in those tarballs.
sudo yum install gcc cmake3 glib2-devel zlib-devel gpgme-devel gnutls-devel libuuid-devel libssh-devel openldap-devel hiredis-devel freeradius-devel doxygen xmltoman bison bison-devel flex flex-devel libgcrypt-devel libpcap-devel redis libksba-devel net-snmp-devel sqlite-devel libical-devel gnutls-utils libxslt-devel texinfo texlive libxml2-devel libmicrohttpd-devel python-polib rsync net-tools
Note: Before anyone asks, make and pkgconfig ARE on the system; as they’re part of the base install.
I expanded the source in my home, made a ‘build’ directory and inside that I ran what looked like a successful cmake … (to be precise, I ran a cmake3 … because the EL7 repo’s libssh-devel package has a dependency on regular cmake (which is 2.8) but cmake didn’t seem to mind being called as cmake3).
When I ran my make, though, while the gvm_base so built fine, I had problems building the object file gpgmeutils.c.o during the gvm_util so build. Here’s what I got from the make command:
Scanning dependencies of target gvm_base_shared
[ 2%] Building C object base/CMakeFiles/gvm_base_shared.dir/array.c.o
[ 5%] Building C object base/CMakeFiles/gvm_base_shared.dir/credentials.c.o
[ 8%] Building C object base/CMakeFiles/gvm_base_shared.dir/cvss.c.o
[ 11%] Building C object base/CMakeFiles/gvm_base_shared.dir/drop_privileges.c.o
[ 14%] Building C object base/CMakeFiles/gvm_base_shared.dir/hosts.c.o
[ 17%] Building C object base/CMakeFiles/gvm_base_shared.dir/logging.c.o
[ 20%] Building C object base/CMakeFiles/gvm_base_shared.dir/networking.c.o
[ 23%] Building C object base/CMakeFiles/gvm_base_shared.dir/nvti.c.o
[ 26%] Building C object base/CMakeFiles/gvm_base_shared.dir/pidfile.c.o
[ 29%] Building C object base/CMakeFiles/gvm_base_shared.dir/prefs.c.o
[ 32%] Building C object base/CMakeFiles/gvm_base_shared.dir/proctitle.c.o
[ 35%] Building C object base/CMakeFiles/gvm_base_shared.dir/pwpolicy.c.o
[ 38%] Building C object base/CMakeFiles/gvm_base_shared.dir/settings.c.o
[ 41%] Building C object base/CMakeFiles/gvm_base_shared.dir/strings.c.o
[ 44%] Linking C shared library libgvm_base.so
[ 44%] Built target gvm_base_shared
Scanning dependencies of target gvm_util_shared
[ 47%] Building C object util/CMakeFiles/gvm_util_shared.dir/authutils.c.o
[ 50%] Building C object util/CMakeFiles/gvm_util_shared.dir/compressutils.c.o
[ 52%] Building C object util/CMakeFiles/gvm_util_shared.dir/fileutils.c.o
[ 55%] Building C object util/CMakeFiles/gvm_util_shared.dir/gpgmeutils.c.o
In file included from /home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:25:0:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.h:47:29: error: unknown type name ‘gpgme_data_type_t’
gpgme_data_type_t);
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c: In function ‘gvm_gpg_import_many_types_from_string’:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:187:3: error: unknown type name ‘gpgme_data_type_t’
gpgme_data_type_t given_key_type;
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:195:3: error: implicit declaration of function ‘gpgme_data_identify’ [-Werror=implicit-function-declaration]
given_key_type = gpgme_data_identify (key_data, 0);
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:197:25: error: ‘GPGME_DATA_TYPE_INVALID’ undeclared (first use in this function)
if (given_key_type == GPGME_DATA_TYPE_INVALID)
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:197:25: note: each undeclared identifier is reported only once for each function it appears in
In file included from /usr/include/glib-2.0/glib.h:31:0,
from /home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.h:30,
from /home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:25:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:207:41: error: ‘gpgme_data_type_t’ undeclared (first use in this function)
if (g_array_index (key_types, gpgme_data_type_t, index)
^
/usr/include/glib-2.0/glib/garray.h:67:38: note: in definition of macro ‘g_array_index’
#define g_array_index(a,t,i) (((t*) (void ) (a)->data) [(i)])
^
/usr/include/glib-2.0/glib/garray.h:67:40: error: expected expression before ‘)’ token
#define g_array_index(a,t,i) (((t) (void ) (a)->data) [(i)])
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:207:15: note: in expansion of macro ‘g_array_index’
if (g_array_index (key_types, gpgme_data_type_t, index)
^
/usr/include/glib-2.0/glib/garray.h:67:40: error: expected expression before ‘)’ token
#define g_array_index(a,t,i) (((t) (void *) (a)->data) [(i)])
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:222:39: note: in expansion of macro ‘g_array_index’
g_array_index (key_types,
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c: At top level:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:283:46: error: unknown type name ‘gpgme_data_type_t’
ssize_t key_len, gpgme_data_type_t key_type)
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c: In function ‘create_all_certificates_trustlist’:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:425:3: error: implicit declaration of function ‘gpgme_set_pinentry_mode’ [-Werror=implicit-function-declaration]
gpgme_set_pinentry_mode (ctx, GPGME_PINENTRY_MODE_CANCEL);
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:425:33: error: ‘GPGME_PINENTRY_MODE_CANCEL’ undeclared (first use in this function)
gpgme_set_pinentry_mode (ctx, GPGME_PINENTRY_MODE_CANCEL);
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:437:63: error: ‘struct _gpgme_key’ has no member named ‘fpr’
g_string_append_printf (trustlist_content, “%s S\n”, key->fpr);
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c: In function ‘encrypt_stream_internal’:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:518:48: error: ‘GPGME_ENCRYPT_NO_COMPRESS’ undeclared (first use in this function)
encrypt_flags = GPGME_ENCRYPT_ALWAYS_TRUST | GPGME_ENCRYPT_NO_COMPRESS;
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c: In function ‘gvm_pgp_pubkey_encrypt_stream’:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:609:3: error: unknown type name ‘gpgme_data_type_t’
const gpgme_data_type_t types_ptr[1] = {GPGME_DATA_TYPE_PGP_KEY};
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:609:43: error: ‘GPGME_DATA_TYPE_PGP_KEY’ undeclared (first use in this function)
const gpgme_data_type_t types_ptr[1] = {GPGME_DATA_TYPE_PGP_KEY};
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:610:58: error: ‘gpgme_data_type_t’ undeclared (first use in this function)
GArray *key_types = g_array_new (FALSE, FALSE, sizeof (gpgme_data_type_t));
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c: In function ‘gvm_smime_encrypt_stream’:
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:640:3: error: unknown type name ‘gpgme_data_type_t’
const gpgme_data_type_t types_ptr[2] = {GPGME_DATA_TYPE_X509_CERT,
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:640:43: error: ‘GPGME_DATA_TYPE_X509_CERT’ undeclared (first use in this function)
const gpgme_data_type_t types_ptr[2] = {GPGME_DATA_TYPE_X509_CERT,
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:641:43: error: ‘GPGME_DATA_TYPE_CMS_OTHER’ undeclared (first use in this function)
GPGME_DATA_TYPE_CMS_OTHER};
^
/home/sawozny/gvm-libs-10.0.2/util/gpgmeutils.c:642:58: error: ‘gpgme_data_type_t’ undeclared (first use in this function)
GArray *key_types = g_array_new (FALSE, FALSE, sizeof (gpgme_data_type_t));
^
cc1: all warnings being treated as errors
make[2]: *** [util/CMakeFiles/gvm_util_shared.dir/gpgmeutils.c.o] Error 1
make[1]: *** [util/CMakeFiles/gvm_util_shared.dir/all] Error 2
make: *** [all] Error 2
Assuming the code is good, I went looking at whatever I could find referenced in the errors around my environment to see if I could find an issue, but I can’t. My gpgme-devel package is 1.3.2-5.el7 and my glib2-devel package is 2.56.1-5.el7 which both appear to meet the minimum requirements and nothing else seems to be referenced in the build output.
Has anyone run into this before and do you have any suggestions on how to fix it?
Thanks,
Scott