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: Thu, 07 Jun 2018 11:30:51 -0400 Message-ID: <87bmcmhavo.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> 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]:59803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQwsv-000204-EE for guix-devel@gnu.org; Thu, 07 Jun 2018 11:31:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQwsq-00050c-0d for guix-devel@gnu.org; Thu, 07 Jun 2018 11:31:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]:55202) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fQwsp-0004vI-J5 for guix-devel@gnu.org; Thu, 07 Jun 2018 11:31:27 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5B1CE212B3 for ; Thu, 7 Jun 2018 17:31:19 +0200 (CEST) In-Reply-To: <876033wvsz.fsf@posteo.net> (Kei Kebreau's message of "Thu, 31 May 2018 13:59:24 -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: > 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. --=-=-= 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=20f4fa63249bec73a385bba1b95bc53cac8f96420c 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. [inputs]: Replace swig with swig-git. =2D-- gnu/packages/machine-learning.scm | 9 +++++++- gnu/packages/swig.scm | 34 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learn= ing.scm index 15e4d4574..d992a2fe5 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))) @@ -488,7 +495,7 @@ sample proximities between pairs of cases.") ("numpy" ,python-numpy) ("r-minimal" ,r-minimal) ("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: text/plain; charset=utf-8 Content-Disposition: attachment; filename=shogun-build-failure.txt Content-Transfer-Encoding: quoted-printable [ 79%] Linking CXX shared module shogun.so cd /tmp/guix-build-shogun-6.1.3.drv-0/build/src/interfaces/r && /gnu/store/= 8mycww9vx11vidzka3g5gghwq11alk4w-cmake-3.7.2/bin/cmake -E cmake_link_script= CMakeFiles/interface_r.dir/link.txt --verbose=3D1 /gnu/store/cfdn69spjc44x4sd0acrwhxq6yay3rbc-gcc-5.5.0/bin/c++ -fPIC -O0 -g= -I/gnu/store/42j0p3x4v2gbwqyx6iv1j83qckndm799-r-minimal-3.5.0/lib/R/inclu= de -O2 -g -DNDEBUG -shared -o shogun.so CMakeFiles/interface_r.dir/shogun= R_wrap.cxx.o CMakeFiles/interface_r.dir/sg_print_functions.cpp.o -L/gnu/st= ore/42j0p3x4v2gbwqyx6iv1j83qckndm799-r-minimal-3.5.0/lib/R/lib -Wl,-rpath,/= gnu/store/km7w7j4f9qsmnrsag3g94nc6fb20vrxw-shogun-6.1.3/lib:/gnu/store/42j0= p3x4v2gbwqyx6iv1j83qckndm799-r-minimal-3.5.0/lib/R/lib ../../shogun/libshog= un.so.18.0 -lR -lxml2 -lhdf5 -lz -ldl -lm=20 Generating shogun.RData cd /tmp/guix-build-shogun-6.1.3.drv-0/build/src/interfaces/r && echo 'wd=3D= "/tmp/guix-build-shogun-6.1.3.drv-0/build/src/interfaces/r" ; setwd ( wd ) = ; f=3D"shogun.R" ; fdata=3D"shogun.RData" ; source ( f ) ; save ( list=3Dls= ( all=3DTRUE ) , file=3Dfdata , compress=3DTRUE ) ; q ( save=3D"no" ) ;' |= /gnu/store/42j0p3x4v2gbwqyx6iv1j83qckndm799-r-minimal-3.5.0/bin/R --silent= --no-save > wd=3D"/tmp/guix-build-shogun-6.1.3.drv-0/build/src/interfaces/r" ; setwd = ( wd ) ; f=3D"shogun.R" ; fdata=3D"shogun.RData" ; source ( f ) ; save ( li= st=3Dls ( all=3DTRUE ) , file=3Dfdata , compress=3DTRUE ) ; q ( save=3D"no"= ) ; in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :BmrmStatistics"=E2=80=99: no definition for class =E2=80=9C_p_shogun::Bmrm= Statistics=E2=80=9D in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :CResultSet"=E2=80=99: no definition for class =E2=80=9C_p_shogun::CResultS= et=E2=80=9D in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :CRealNumber"=E2=80=99: no definition for class =E2=80=9C_p_shogun::CRealNu= mber=E2=80=9D in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :GCEdge"=E2=80=99: no definition for class =E2=80=9C_p_shogun::GCEdge=E2=80= =9D in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :GCNode"=E2=80=99: no definition for class =E2=80=9C_p_shogun::GCNode=E2=80= =9D in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :GCNodePtr"=E2=80=99: no definition for class =E2=80=9C_p_shogun::GCNodePtr= =E2=80=9D in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :RelaxedTreeNodeData"=E2=80=99: no definition for class =E2=80=9C_p_shogun:= :RelaxedTreeNodeData=E2=80=9D in method for =E2=80=98copyToR=E2=80=99 with signature =E2=80=98"_p_shogun:= :ConditionalProbabilityTreeNodeData"=E2=80=99: no definition for class =E2= =80=9C_p_shogun::ConditionalProbabilityTreeNodeData=E2=80=9D Error in assign(defName, .values, envir =3D where) :=20 object 'KSM_MAXIMIZE_POWER' not found Calls: source ... withVisible -> eval -> eval -> defineEnumeration -> ass= ign Execution halted make[2]: *** [src/interfaces/r/CMakeFiles/interface_r.dir/build.make:141:= src/interfaces/r/shogun.so] Error 1 make[2]: *** Deleting file 'src/interfaces/r/shogun.so' make[2]: Leaving directory '/tmp/guix-build-shogun-6.1.3.drv-0/build' make[1]: *** [CMakeFiles/Makefile2:462: src/interfaces/r/CMakeFiles/inter= face_r.dir/all] Error 2 make[1]: Leaving directory '/tmp/guix-build-shogun-6.1.3.drv-0/build' make: *** [Makefile:153: all] Error 2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlsZT6sACgkQ5qXuPBlG eg0YLQ//dx7OILXzyWV6tTSTBiXX8Bz2bb8yOCosaOzHLbmZ8/TroAQYkJ3Er+9p 6bHdziFFSomui39I/Om6HTx1dFZWH0q3vkAsE+2ivUEioHxJ+mHwwGy8Sjq2cEbP Vg75gJOD71q0BqBJRCjsGEP/XeCK2LTHUfdzj4MkKO8qa01S+c8b7oOZtMX5kN0l 4Ei800/In2v7sTQ2jHyAvJMSs7VeUqUcLkSitYpCWTdjsOXVtdEkWMZ5jbVgmb+R zsWXfeG1dPpnbEKR3nG2JmVaBJ9YoYqBPUtWfhtmMBZipwVlbcoEq/zSB1N1yAG3 aRB81jcnXve9CABgTA4gAWMq8vqqQ2QG56hND5TjaVDtbkUiWmig2LJQTABX+mXv GThWHu4GJwia/eYWjGUen+RES7j6DXdzVU1IZB1ArYGlnmD5CAfw39vc5BzHBnMF P7VhV33jX3IFOpP8A29ZNP631N0oB28JvXKmkc4xxfV6o8XaFkrBJzX7Fh1X3ZKK VXOIG37rqVUEVgRURV4iilUCzRd4WdDM1kesAOmVsBau+/rESquc9BdAag2ID98x GBtPR+neqdrScsI1objWqxUWD/TuzUhPGcNJfYNhmwtxzFnMnd8rdDSoqTwUZ/St 3l4AOiIJlOmmwlcVNP7S6514LEnatzDFVeSRP1pAeM+nrTBSUZk= =Tta8 -----END PGP SIGNATURE----- --==-=-=--