From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kei Kebreau Subject: Re: 04/05: gnu: swig: Patch for Octave 4.4. Date: Mon, 11 Jun 2018 12:54:18 -0400 Message-ID: <871sdd462t.fsf@posteo.net> References: <20180529222049.16826.20591@vcs0.savannah.gnu.org> <20180529222052.5A8DA20537@vcs0.savannah.gnu.org> <87bmcxbqy4.fsf@netris.org> <87d0xdw645.fsf@posteo.net> <877enl0ycc.fsf@netris.org> <876033wvsz.fsf@posteo.net> <87bmcmhavo.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSQ5R-0001sI-Om for guix-devel@gnu.org; Mon, 11 Jun 2018 12:54:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSQ5N-0007wf-FT for guix-devel@gnu.org; Mon, 11 Jun 2018 12:54:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]:35085) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSQ5N-0007tB-0M for guix-devel@gnu.org; Mon, 11 Jun 2018 12:54:29 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7966321233 for ; Mon, 11 Jun 2018 18:54:22 +0200 (CEST) In-Reply-To: <87bmcmhavo.fsf@posteo.net> (Kei Kebreau's message of "Thu, 07 Jun 2018 11:30:51 -0400") 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" To: Mark H Weaver Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Kei Kebreau writes: > Kei Kebreau 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. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-gnu-shogun-Use-a-patched-swig-for-Octave-4.4.patch Content-Transfer-Encoding: quoted-printable From=20a364bc3122ac9d3903a0d84a579d477334a59ac8 Mon Sep 17 00:00:00 2001 From: Kei Kebreau 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. =2D-- 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-learn= ing.scm index 15e4d4574..65dd9d31b 100644 =2D-- 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=3DON" ;fails because lua doesn't build pk= gconfig file "-DINTERFACE_OCTAVE=3DON" "-DINTERFACE_PYTHON=3DON" =2D "-DINTERFACE_R=3DON"))) + "-DINTERFACE_R=3DOFF"))) ;temporarily off due to unknown iss= ues. (inputs `(("python" ,python) ("numpy" ,python-numpy) =2D ("r-minimal" ,r-minimal) + ;;("r-minimal" ,r-minimal) ;re-enable when interface issues are res= olved ("octave" ,octave) =2D ("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 =2D-- 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= .") =20 ;; 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 "1367y47kdkly9cwyp4d60cm5d660am83g4p52k1hmzvimghw= gvlp")) + (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)))))) =2D-=20 2.17.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlseqToACgkQ5qXuPBlG eg1mQg//ZVyyy01WBHq5vvzz+5NmgnQ6KldA/rb/kCcpZ9j4zlKniFMkL0a2TkmY ZbAalYh15u8clROXvAtDqr3Yj0KmwmI3CXTaKVDjQiaup3sTt/AK6IBad5Be6RBK 5zH2ipz1W12IvrdWAPCtrJoRB2RORjLcNEenukNsRZ/UAVP1FB2/RGe+8bJzhzso HBV6mU/hFg+4SJzxtPsn35mFOHDeMI94nctUe1GU+90WN49t+h4YZQpqO0aztgnC YTSArTpXvBYK7OpKuwvUWcqjtS34HDkdBRaW0pMhWe2vleTvUamf2cpoOp+k2cR9 uIRQjrm5+3COPl1MR3kttRGohuMdCWbchcsaoDgQv7vO4zjC0HJN24klORUxLHZK J+Vm0yKFVbFYRa5dwCPmHxG9+kt/ZX4k9h+dtHc2x0sQemlVtX30iQrQi1jcfQLl gZ4AKQ+fX2w2QNYekRPMNBIWu8sJkCKvKDWFCznV16wJwwiOoU6429CkINaGxIIs L/y4FHD+xbm/MV6HV8wDnryRgz9tzKK2dB5LMGSyIExMoF17wkK5JNX95Eqsz4nN EAUBMoPJh5lLT21lauwYREDS/ZFpu6OY53sSQbcjL0khjwUAnBX2cpS4S5ClfHV6 Qk3etNjkcEaMm5R/UvkIquhV1Jo09bcsYsyr1+EsT8YCTa08lyQ= =69Se -----END PGP SIGNATURE----- --==-=-=--