From patchwork Mon Sep 2 15:33:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15266 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 31C6C1734D; Mon, 2 Sep 2019 16:39:23 +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,URIBL_BLOCKED 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 BF1F517329 for ; Mon, 2 Sep 2019 16:39:22 +0100 (BST) Received: from localhost ([::1]:37704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oQM-0006RC-BH for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:39:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42779) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oMN-0002Np-EZ for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oMK-0004g3-M7 for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:14 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50041) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oMK-0004eg-AE for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:12 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oMK-0006eX-5Z for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:12 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 26/48] gnu: guile-sqlite3: Fix cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 15:35:12 +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 Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156743848925288 (code B ref 36477); Mon, 02 Sep 2019 15:35:12 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:34:49 +0000 Received: from localhost ([127.0.0.1]:58811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLp-0006ZW-S5 for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:49 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:47020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLP-0006Sx-78 for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:24 -0400 Received: by mail-wr1-f68.google.com with SMTP id h7so13115808wrt.13 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:34:15 -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=JfxmM9/3xpeOOvigmlE2zqbOCm4RWsvNg6lyp2tkml4=; b=TVKiFFoAte3jF3NNCfMhWEl6JW1t4SpFPOIfaZEKLteE7sQ9Mp01c0otV09Y/g5p+e hlgDWHcAXQujJMuu0SaF8xGXzWFIy7dNMFEr/CqjKn2wSSudvCxUINH3nYZb5xB6rvIV IxCjZcdFrYdbqG1SV+l4kM/JoA7MgTEK9oYxmlJ6dLncwmeR2a0u3SeF/Ms42dKwEAAJ pZIqVlTj2cMmRepgZWwPGl68M1FR30iSokSCK+cqGXGwGwFF8IPw9Hc1G6BdmZU05/mP tFV2cJNIwUPT6kg9nT8b5Q9yLPdE6x4ky4j4bi/8A1VdIyeH8a73E4jbqXNEFYZq/5Qm dBOg== 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=JfxmM9/3xpeOOvigmlE2zqbOCm4RWsvNg6lyp2tkml4=; b=Rgfo4fntJSoQSLe+uKms4ZwC6loXR3Rx+5BrDJtqHWuIufZo82LtmF/b2pQZfcWbys WXz4STuzc5oqQPo3rsKeoNVAYlKmGCDFVEZmSbCmJ7bBVnJqthOAHP0hnv0OnaCrYh99 SUZVaksge4dmnNPXOsqF8NSF50AeKbJZdFtQ5JoMZEsWBqYmA6HFKQ/mAWPknohECbGP 1TQTmmsjASDTH6LhhF2lW4THm/rQ/7dfemPS+BZxid38esnOAQ2Y5YHDP39GQeLMGL5F DYwKGbowomH4zpseSUFIxLHGjejTLrrYwz21X+fRqZbtMycsLZ86SVH1/jb054EC9gE0 ZgtQ== X-Gm-Message-State: APjAAAV+ef8DF/WRso5hnuJpLj4qVzPys0Dd4J6EpxTcPtLYJrOv1TxO cLSw+tzNeRuTgN3mo31K4zdy7bUG X-Google-Smtp-Source: APXvYqyhS2vn4RBvgQqvKO/eMalunlMsMyR0x8icYX35BO9Ix5/cYvSB0VomougUzGT2uEN5mZrRPQ== X-Received: by 2002:a5d:6911:: with SMTP id t17mr36645457wru.255.1567438449484; Mon, 02 Sep 2019 08:34:09 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:34:08 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:33:11 +0200 Message-Id: <20190902153333.11190-27-m.othacehe@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-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: , Cc: Mathieu Othacehe 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 ae53257a77..2cf92e4478 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -928,6 +928,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 b07a570654..713390ada1 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 +