From patchwork Wed Oct 2 09:58:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15566 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 55959174A1; Wed, 2 Oct 2019 11:01:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id B281B1749D for ; Wed, 2 Oct 2019 11:01:28 +0100 (BST) Received: from localhost ([::1]:53156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbRn-0004ae-IX for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 06:01:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51182) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQf-0003r2-Ht for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQd-0000D1-Ll for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:17 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54926) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQd-0000CJ-8u for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:15 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQd-0000ap-6l for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:15 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v4 14/23] gnu: guile-sqlite3: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Oct 2019 10:00:15 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36477@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.15700104002003 (code B ref 36477); Wed, 02 Oct 2019 10:00:15 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Oct 2019 10:00:00 +0000 Received: from localhost ([127.0.0.1]:35482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbQH-0000Vy-Ha for submit@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:59 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:37846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbQ8-0000TW-SS for 36477@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:48 -0400 Received: by mail-wm1-f41.google.com with SMTP id f22so6285409wmc.2 for <36477@debbugs.gnu.org>; Wed, 02 Oct 2019 02:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e3634+YG7dB2lcyKcYhye/xrCCn82c4D6aPHgiYWc+8=; b=j722RnB2soxEUHGQd1lzcz1LePqY/0WNEqKxNBLonEXpmr9bgzIxSj7+o9WJKs7WVI H4+Zy3VSzf16i8U0n7QDhAXHRyUwfbrEdTkx4b8yfB1V+YvM0PBiKEaqB0PpMOFGGgDa xNhksHBXdRwoaarBc3NnKVLu3w2hW93jigR7NYtOUU8zSe5Q5yq1FcUw5SXS/fhHXmKK mNiyTkAqSwDqd2gAje6TlY5eKqinNU03BkfBHwJuDSDBEWXF/vi6J84PLPd/D9OEvKil 7+wQsHawsinAxxsjQjt/BgdcSgtOd1z/gbID/eiLRIP2GppTSQq0Xy/1o1btbL1b/fKW pDkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e3634+YG7dB2lcyKcYhye/xrCCn82c4D6aPHgiYWc+8=; b=emHqFuw5+rW27shjMd0CeHgKPRhORPob1xMc90QFB60HSM7vRr95Vgk5gwEv1T7GXD s1t2LrIS7eIaNJiHMRx4q2rqKezoOq+0YrYlhB1ZC2qJr2iv0B8hsUES/lzFMAKWPKEe 3e+VwLFghhaPzLT9A0VIPvm7dSBqVK76NCVKf+vCQHyhoQtw0Fn62eVK9aKrMX6drW4s 7ry01Mp7+O5Sn/q5bvS1VirUmVFpeOQFiBLcE0eYDnNjpXGOJU9cnkG4XPF9+yWmByq1 0xeEAsmpu85dfxigAgt8PEiZAWRRm1URhx7DP2TDBwiCWfS+itP2hNB8mAS9hiWbBgem fmYw== X-Gm-Message-State: APjAAAXO6bB1fLhiC3KMaVcsvN1kRyq+uVT7E6AQe0mST/dgIQweEfJO RzayYMqy9o2sgNWzFnRRzsVq1c9X X-Google-Smtp-Source: APXvYqyonGKmcKtMZPvKartZCvYfB261X1pm+21UUO6XwLf2zfizZVbpPt7q0bDuzSUpuoKdc/GmUQ== X-Received: by 2002:a1c:4846:: with SMTP id v67mr2160149wma.120.1570010378796; Wed, 02 Oct 2019 02:59:38 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:fa:a50:21e:67ff:fe5b:4283]) by smtp.gmail.com with ESMTPSA id w12sm29621318wrg.47.2019.10.02.02.59.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:59:37 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:58:55 +0200 Message-Id: <20191002095904.6325-15-m.othacehe@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191002095904.6325-1-m.othacehe@gmail.com> References: <20191002095904.6325-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/guile.scm (guile-sqlite3)[source]: Apply previous patch, [native-inputs]: add guile. --- gnu/local.mk | 1 + gnu/packages/guile.scm | 7 ++- .../guile-sqlite3-fix-cross-compilation.patch | 55 +++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2ec5ffe29e..42bc29783b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -935,6 +935,7 @@ dist_patch_DATA = \ %D%/packages/patches/guile-relocatable.patch \ %D%/packages/patches/guile-rsvg-pkgconfig.patch \ %D%/packages/patches/guile-emacs-fix-configure.patch \ + %D%/packages/patches/guile-sqlite3-fix-cross-compilation.patch \ %D%/packages/patches/gstreamer-buffer-reset-offset.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 478b8faebe..bc57a55052 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016, 2019 Ricardo Wurmus ;;; Copyright © 2017 Andy Wingo ;;; Copyright © 2017 Marius Bakke -;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2017, 2019 Mathieu Othacehe ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2017, 2018 Amirouche ;;; Copyright © 2018 Danny Milosavljevic @@ -521,11 +521,14 @@ Guile's foreign function interface.") (sha256 (base32 "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp")) - (file-name (string-append name "-" version "-checkout")))) + (file-name (string-append name "-" version "-checkout")) + (patches + (search-patches "guile-sqlite3-fix-cross-compilation.patch")))) (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) + ("guile" ,guile-2.2) ("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-2.2) diff --git a/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch new file mode 100644 index 0000000000..9ea9a47677 --- /dev/null +++ b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch @@ -0,0 +1,55 @@ +From a6e9e62a77ecc5012929613e20da23b2636450a5 Mon Sep 17 00:00:00 2001 +From: Mathieu Othacehe +Date: Mon, 25 Mar 2019 11:00:38 +0100 +Subject: [PATCH] cross compile + +--- + build-aux/guile.am | 2 +- + configure.ac | 19 ++++++++++++------- + 2 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/build-aux/guile.am b/build-aux/guile.am +index dc1e63f..3126372 100644 +--- a/build-aux/guile.am ++++ b/build-aux/guile.am +@@ -16,4 +16,4 @@ EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES) + GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat + SUFFIXES = .scm .go + .scm.go: +- $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<" ++ $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<" +diff --git a/configure.ac b/configure.ac +index f648fcb..2d34d0a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,15 +21,20 @@ PKG_CHECK_MODULES([SQLITE], [sqlite3]) + SQLITE_LIBDIR="`"$PKG_CONFIG" sqlite3 --variable libdir`" + AC_SUBST([SQLITE_LIBDIR]) + +-AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable]) +-GUILE_CHECK([retval], +- [(dynamic-func \"sqlite3_open_v2\" ++if test "$cross_compiling" = "no"; then ++ AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable]) ++ GUILE_CHECK([retval], ++ [(dynamic-func \"sqlite3_open_v2\" + (dynamic-link \"$SQLITE_LIBDIR/libsqlite3\"))]) +-if test "$retval" != 0; then +- AC_MSG_RESULT([no]) +- AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3']) ++ if test "$retval" != 0; then ++ AC_MSG_RESULT([no]) ++ AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3']) ++ else ++ AC_MSG_RESULT([yes]) ++ fi + else +- AC_MSG_RESULT([yes]) ++ GUILE_TARGET="--target=$host_alias" ++ AC_SUBST([GUILE_TARGET]) + fi + + AC_CONFIG_FILES([Makefile sqlite3.scm]) +-- +2.17.1 +