From: Kei Kebreau <kkebreau@posteo.net>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: 04/05: gnu: swig: Patch for Octave 4.4.
Date: Mon, 11 Jun 2018 12:54:18 -0400 [thread overview]
Message-ID: <871sdd462t.fsf@posteo.net> (raw)
In-Reply-To: <87bmcmhavo.fsf@posteo.net> (Kei Kebreau's message of "Thu, 07 Jun 2018 11:30:51 -0400")
[-- Attachment #1.1: Type: text/plain, Size: 655 bytes --]
Kei Kebreau <kkebreau@posteo.net> writes:
> Kei Kebreau <kkebreau@posteo.net> writes:
>
>> Other than Shogun's Python/SWIG-related build failure (attached), this
>> patch seems to work fairly well. There appears to be an upstream issue
>> related to the invalid conversion mentioned in the build failure. I'm
>> keeping an eye on it for any new developments.
>
> FYI, this is an updated patch that bypasses the Python interface issue
> and runs into an issue with R.
I haven't been able to crack the issue with Shogun and R. The attached
patch explicitly disables the R interface which allows shogun to build
properly while the R problem is resolved.
[-- Attachment #1.2: 0001-gnu-shogun-Use-a-patched-swig-for-Octave-4.4.patch --]
[-- Type: text/plain, Size: 4259 bytes --]
From a364bc3122ac9d3903a0d84a579d477334a59ac8 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kkebreau@posteo.net>
Date: Wed, 30 May 2018 08:34:42 -0400
Subject: [PATCH] gnu: shogun: Use a patched swig for Octave 4.4.
* gnu/packages/swig.scm (swig-git): New variable
* gnu/packages/machine-learning.scm (shogun)[arguments]: Add
'fix-python-compiler-flags' phase. Disable R interface.
[inputs]: Replace swig with swig-git. Remove r-minimal.
---
gnu/packages/machine-learning.scm | 13 +++++++++---
gnu/packages/swig.scm | 34 +++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 15e4d4574..65dd9d31b 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -469,6 +469,13 @@ sample proximities between pairs of cases.")
(mkdir-p rxcpp-dir)
(install-file (assoc-ref inputs "rxcpp") rxcpp-dir)
#t)))
+ (add-after 'unpack 'fix-python-compiler-flags
+ (lambda _
+ ;; This prevents a set of function conversions from stopping the
+ ;; build with an error.
+ (substitute* "src/interfaces/python/CMakeLists.txt"
+ (("Wno-c\\+\\+11-narrowing") "fpermissive"))
+ #t))
(add-before 'build 'set-HOME
;; $HOME needs to be set at some point during the build phase
(lambda _ (setenv "HOME" "/tmp") #t)))
@@ -482,13 +489,13 @@ sample proximities between pairs of cases.")
;;"-DINTERFACE_LUA=ON" ;fails because lua doesn't build pkgconfig file
"-DINTERFACE_OCTAVE=ON"
"-DINTERFACE_PYTHON=ON"
- "-DINTERFACE_R=ON")))
+ "-DINTERFACE_R=OFF"))) ;temporarily off due to unknown issues.
(inputs
`(("python" ,python)
("numpy" ,python-numpy)
- ("r-minimal" ,r-minimal)
+ ;;("r-minimal" ,r-minimal) ;re-enable when interface issues are resolved
("octave" ,octave)
- ("swig" ,swig)
+ ("swig" ,swig-git)
("eigen" ,eigen)
("hdf5" ,hdf5)
("atlas" ,atlas)
diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm
index b931db412..3a1139dbb 100644
--- a/gnu/packages/swig.scm
+++ b/gnu/packages/swig.scm
@@ -20,8 +20,12 @@
(define-module (gnu packages swig)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix licenses)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bison)
#:use-module (gnu packages pcre)
#:use-module (gnu packages guile)
#:use-module (gnu packages boost)
@@ -74,3 +78,33 @@ you tailor the wrapping process to suit your application.")
;; See http://www.swig.org/Release/LICENSE for details.
(license gpl3+)))
+
+;; This package contains upstream fixes that haven't been released as part of a
+;; stable version of SWIG. This is necessary for software that uses SWIG to
+;; compile the correct and up-to-date programming language interfaces.
+(define-public swig-git
+ (let ((commit "12c66f9b7d884020e896ce92b9783bc3bac95d2d")
+ (revision "1"))
+ (package/inherit swig
+ (name "swig-git")
+ (version (git-version "4.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/swig/swig.git")
+ (commit commit)))
+ (sha256 (base32 "1367y47kdkly9cwyp4d60cm5d660am83g4p52k1hmzvimghwgvlp"))
+ (file-name (git-file-name name version))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments swig)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'autogen
+ (lambda _
+ (invoke "sh" "autogen.sh")))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bison" ,bison)
+ ,@(package-native-inputs swig))))))
--
2.17.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-06-11 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180529222049.16826.20591@vcs0.savannah.gnu.org>
[not found] ` <20180529222052.5A8DA20537@vcs0.savannah.gnu.org>
2018-05-30 6:25 ` 04/05: gnu: swig: Patch for Octave 4.4 Mark H Weaver
2018-05-30 14:49 ` Kei Kebreau
2018-05-30 18:53 ` Mark H Weaver
2018-05-31 17:59 ` Kei Kebreau
2018-06-07 15:30 ` Kei Kebreau
2018-06-11 16:54 ` Kei Kebreau [this message]
2018-05-30 14:49 ` Kei Kebreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871sdd462t.fsf@posteo.net \
--to=kkebreau@posteo.net \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).