Skip to contentSkip to conversation

build broken with --enable-gcrypt

PATCH Richard Henderson 2 participants 2 messages Aug 27, 2020 – Aug 28, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

The meson conversion seems to have not been properly accomplished for the gcrypt option: we fail to link against -lgcrypt.

I tried aping the nettle bits, like the following, but it has no effect. I don't understand how the "nettle" token works, honestly, since it doesn't appear to be used at all.

r~

configure +2 -0
index b1e11397a8..4fd50c0275 100755
@@ -6972,6 +6972,8 @@ if test "$gcrypt" = "yes" ; then
   if test "$gcrypt_hmac" = "yes" ; then
     echo "CONFIG_GCRYPT_HMAC=y" >> $config_host_mak
   fi
+  echo "GCRYPT_CFLAGS=$gcrypt_cflags" >> $config_host_mak
+  echo "GCRYPT_LIBS=$gcrypt_libs" >> $config_host_mak
 fi
 if test "$nettle" = "yes" ; then
   echo "CONFIG_NETTLE=y" >> $config_host_mak
meson.build +5 -0
index f0fe5f8799..d45c548191 100644
@@ -108,6 +108,11 @@ if 'CONFIG_NETTLE' in config_host
   nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(),
                               link_args: config_host['NETTLE_LIBS'].split())
 endif
+gcrypt = not_found
+if 'CONFIG_GCRYPT' in config_host
+  gcrypt = declare_dependency(compile_args: config_host['GCRYPT_CFLAGS'].split(),
+                              link_args: config_host['GCRYPT_LIBS'].split())
+endif
 gnutls = not_found
 if 'CONFIG_GNUTLS' in config_host
   gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),
#1 lore raw
Quoted 6 lines · Richard Henderson

The meson conversion seems to have not been properly accomplished for the gcrypt option: we fail to link against -lgcrypt.

I tried aping the nettle bits, like the following, but it has no effect. I don't understand how the "nettle" token works, honestly, since it doesn't appear to be used at all.

Hmm, a red flag that we're missing CI coverage of the different crypto backends. I'll look into fixing this and the meson issue.

Quoted 19 lines
configure +2 -0
index b1e11397a8..4fd50c0275 100755
@@ -6972,6 +6972,8 @@ if test "$gcrypt" = "yes" ; then
   if test "$gcrypt_hmac" = "yes" ; then
     echo "CONFIG_GCRYPT_HMAC=y" >> $config_host_mak
   fi
+  echo "GCRYPT_CFLAGS=$gcrypt_cflags" >> $config_host_mak
+  echo "GCRYPT_LIBS=$gcrypt_libs" >> $config_host_mak
 fi
 if test "$nettle" = "yes" ; then
   echo "CONFIG_NETTLE=y" >> $config_host_mak
meson.build +0 -0
index f0fe5f8799..d45c548191 100644
@@ -108,6 +108,11 @@ if 'CONFIG_NETTLE' in config_host
   nettle = declare_dependency(compile_args: config_host['NETTLE_CFLAGS'].split(),

meson.build if 'CONFIG_NETTLE' in config_host · line 118

Quoted 10 lines
meson.build +5 -0
                               link_args: config_host['NETTLE_LIBS'].split())
 endif
+gcrypt = not_found
+if 'CONFIG_GCRYPT' in config_host
+  gcrypt = declare_dependency(compile_args: config_host['GCRYPT_CFLAGS'].split(),
+                              link_args: config_host['GCRYPT_LIBS'].split())
+endif
 gnutls = not_found
 if 'CONFIG_GNUTLS' in config_host
   gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(),

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|