From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] gnu: r: Apply patch to fix linking against R. Date: Tue, 19 May 2015 11:57:54 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YueHl-0002de-LI for guix-devel@gnu.org; Tue, 19 May 2015 05:58:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YueHi-0004uM-DE for guix-devel@gnu.org; Tue, 19 May 2015 05:58:05 -0400 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:56490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YueHi-0004ts-0t for guix-devel@gnu.org; Tue, 19 May 2015 05:58:02 -0400 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 46FBB3809F2 for ; Tue, 19 May 2015 11:58:00 +0200 (CEST) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CUpZSs4e08DR for ; Tue, 19 May 2015 11:57:54 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Tue, 19 May 2015 11:57:54 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/plain Hi Guix, the attached upstream patch is required to fix linking problems when linking external applications or libraries (such as Shogun) against R. The problem was introduced with the upgrade to version 3.2.0 of R and should be released with 3.2.1. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-r-Apply-patch-to-fix-linking-against-R.patch" >From 0bb28820d47d9e02f4580253f11666e254841019 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 19 May 2015 11:53:47 +0200 Subject: [PATCH] gnu: r: Apply patch to fix linking against R. * gnu/packages/patches/r-fix-15899.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/statistics.scm (r)[source]: Use it. --- gnu-system.am | 1 + gnu/packages/patches/r-fix-15899.patch | 17 +++++++++++++++++ gnu/packages/statistics.scm | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/r-fix-15899.patch diff --git a/gnu-system.am b/gnu-system.am index 5ba48d1..6480a02 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -541,6 +541,7 @@ dist_patch_DATA = \ gnu/packages/patches/qt4-tests.patch \ gnu/packages/patches/qt5-conflicting-typedefs.patch \ gnu/packages/patches/qt5-runpath.patch \ + gnu/packages/patches/r-fix-15899.patch \ gnu/packages/patches/ratpoison-shell.patch \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/ripperx-libm.patch \ diff --git a/gnu/packages/patches/r-fix-15899.patch b/gnu/packages/patches/r-fix-15899.patch new file mode 100644 index 0000000..40593d3 --- /dev/null +++ b/gnu/packages/patches/r-fix-15899.patch @@ -0,0 +1,17 @@ +Without the "extern" keyword external applications linking against R (such as +Shogun, for example) might not be linkable. + +See https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15899 for details +about this bug. + +--- a/src/include/Rinterface.h (revision 66251) ++++ b/src/include/Rinterface.h (working copy) +@@ -84,7 +84,7 @@ + void fpu_setup(Rboolean); + + /* in unix/system.c */ +-int R_running_as_main_program; ++extern int R_running_as_main_program; + + #ifdef CSTACK_DEFNS + /* duplicating Defn.h */ diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 722e0df..9408705 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -50,7 +50,8 @@ version ".tar.gz")) (sha256 (base32 - "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")))) + "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")) + (patches (list (search-patch "r-fix-15899.patch"))))) (build-system gnu-build-system) (arguments `(#:make-flags -- 2.1.0 --=-=-=--