Patchwork gvfs: Select and depend on libgcrypt

login
register
mail settings
Submitter Markos Chandras
Date June 21, 2013, 10:20 a.m.
Message ID <1371810011-13339-1-git-send-email-markos.chandras@gmail.com>
Download mbox | patch
Permalink /patch/253171/
State Changes Requested
Headers show

Comments

Markos Chandras - June 21, 2013, 10:20 a.m.
From: Markos Chandras <markos.chandras@imgtec.com>

Fixes the following build problem when building gvfs
without having libgcrypt installed.

gvfsbackendafpbrowse.c:31:20: fatal error: gcrypt.h: No such file or directory

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/gvfs/Config.in | 1 +
 package/gvfs/gvfs.mk   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Thomas Petazzoni - June 21, 2013, 10:31 a.m.
Dear Markos Chandras,

On Fri, 21 Jun 2013 11:20:11 +0100, Markos Chandras wrote:

> Fixes the following build problem when building gvfs
> without having libgcrypt installed.
> 
> gvfsbackendafpbrowse.c:31:20: fatal error: gcrypt.h: No such file or directory

This seems strange because:

#ifdef HAVE_GCRYPT
#include <gcrypt.h>
#endif

in gvfsbackendafpbrowse.c.

Maybe there's a mis-detection of the gcrypt on your host and we need to
make sure gvfs doesn't try to detect gcrypt when it is not part of the
enabled packages. I am quite sure I did a build of gvfs 1.16.2 without
gcrypt support, but the machine didn't had the gcrypt development files
installed in the distribution.

Thanks,

Thomas
Markos Chandras - June 21, 2013, 10:33 a.m.
On 21 June 2013 11:31, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Markos Chandras,
>
> On Fri, 21 Jun 2013 11:20:11 +0100, Markos Chandras wrote:
>
>> Fixes the following build problem when building gvfs
>> without having libgcrypt installed.
>>
>> gvfsbackendafpbrowse.c:31:20: fatal error: gcrypt.h: No such file or directory
>
> This seems strange because:
>
> #ifdef HAVE_GCRYPT
> #include <gcrypt.h>
> #endif
>
> in gvfsbackendafpbrowse.c.
>
> Maybe there's a mis-detection of the gcrypt on your host and we need to
> make sure gvfs doesn't try to detect gcrypt when it is not part of the
> enabled packages. I am quite sure I did a build of gvfs 1.16.2 without
> gcrypt support, but the machine didn't had the gcrypt development files
> installed in the distribution.

Hi Thomas,

I will have a look in the build files. I have libgcrypt installed on
the host so maybe it detects this one and fails.

--
Regards,
Markos Chandras
Markos Chandras - June 21, 2013, 12:49 p.m.
On 21 June 2013 11:33, Markos Chandras <markos.chandras@gmail.com> wrote:
> On 21 June 2013 11:31, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Dear Markos Chandras,
>>
>> On Fri, 21 Jun 2013 11:20:11 +0100, Markos Chandras wrote:
>>
>>> Fixes the following build problem when building gvfs
>>> without having libgcrypt installed.
>>>
>>> gvfsbackendafpbrowse.c:31:20: fatal error: gcrypt.h: No such file or directory
>>
>> This seems strange because:
>>
>> #ifdef HAVE_GCRYPT
>> #include <gcrypt.h>
>> #endif
>>
>> in gvfsbackendafpbrowse.c.
>>
>> Maybe there's a mis-detection of the gcrypt on your host and we need to
>> make sure gvfs doesn't try to detect gcrypt when it is not part of the
>> enabled packages. I am quite sure I did a build of gvfs 1.16.2 without
>> gcrypt support, but the machine didn't had the gcrypt development files
>> installed in the distribution.
>
> Hi Thomas,
>
> I will have a look in the build files. I have libgcrypt installed on
> the host so maybe it detects this one and fails.
>
> --
> Regards,
> Markos Chandras

Indeed, it seems the host libgcrypt is picked if there is not one for the target

configure:18751: checking for mips-buildroot-linux-uclibc-libgcrypt-config
configure:18784: result: no
configure:18794: checking for libgcrypt-config
configure:18812: found /usr/bin/libgcrypt-config
configure:18824: result: /usr/bin/libgcrypt-config
configure:18836: WARNING: using cross tools not prefixed with host triplet

I will have a look on how to fix this

--
Regards,
Markos Chandras

Patch

diff --git a/package/gvfs/Config.in b/package/gvfs/Config.in
index e0a945e..3791830 100644
--- a/package/gvfs/Config.in
+++ b/package/gvfs/Config.in
@@ -4,6 +4,7 @@  config BR2_PACKAGE_GVFS
 	depends on BR2_USE_WCHAR # glib2
 	depends on BR2_USE_MMU # dbus
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
+	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_SHARED_MIME_INFO
diff --git a/package/gvfs/gvfs.mk b/package/gvfs/gvfs.mk
index d99c784..0a2eece 100644
--- a/package/gvfs/gvfs.mk
+++ b/package/gvfs/gvfs.mk
@@ -10,7 +10,7 @@  GVFS_VERSION = $(GVFS_VERSION_MAJOR).$(GVFS_VERSION_MINOR)
 GVFS_SOURCE = gvfs-$(GVFS_VERSION).tar.xz
 GVFS_SITE = http://ftp.gnome.org/pub/GNOME/sources/gvfs/$(GVFS_VERSION_MAJOR)
 GVFS_INSTALL_STAGING = YES
-GVFS_DEPENDENCIES = host-pkgconf host-libglib2 libglib2 dbus shared-mime-info
+GVFS_DEPENDENCIES = host-pkgconf host-libglib2 libgcrypt libglib2 dbus shared-mime-info
 
 GVFS_CONF_OPT = \
 	--disable-gconf			\