From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNlg3-0008W1-DT for guix-patches@gnu.org; Tue, 29 May 2018 16:57:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNlfy-0004QL-Cs for guix-patches@gnu.org; Tue, 29 May 2018 16:57:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:46467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNlfy-0004QG-96 for guix-patches@gnu.org; Tue, 29 May 2018 16:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fNlfx-0000qw-SH for guix-patches@gnu.org; Tue, 29 May 2018 16:57:01 -0400 Subject: [bug#31479] [PATCH 3/3] gnu: Update shogun to 6.1.3. Resent-Message-ID: From: Kei Kebreau References: <20180516231033.1680-1-kkebreau@posteo.net> <87a7spcte2.fsf@mdc-berlin.de> <87po1hnba0.fsf@posteo.net> Date: Tue, 29 May 2018 16:55:51 -0400 In-Reply-To: <87po1hnba0.fsf@posteo.net> (Kei Kebreau's message of "Sat, 26 May 2018 21:21:43 -0400") Message-ID: <87h8mqkwq0.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ricardo Wurmus Cc: 31479@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Kei Kebreau writes: > Ricardo Wurmus writes: > >> Hi Kei, >> >> please also note that Shogun contains references to proprietary >> software. It has support for SVMLight, which is non-free software. It >> includes a script to remove all references to and adapters for SVMLight, >> but unfortunately we cannot run shell scripts in a snippet. Changing >> this requires changing the =E2=80=9Cpackage=E2=80=9D syntax to delay eva= luation more. >> >> Until then we need to remove the non-free bits in code, which is what >> the current snippet does, but the code would need to be adjusted for >> version 6.1.3. >> >> Thanks for taking this on! >> >> -- >> Ricardo > > Thank you for the tip! > > I've attached the four patches that make it possible to build Shogun > 6.1.3 successfully, and I'm just looking through the source code to > remove the proprietary bits. > > P.S. Ricardo, you'll notice the eigen patch is actually yours from > another patchset! I verified that it works as expected. The shogun patch below builds successfully for me! If no corrections need to be made, I'll push this patch series to master! --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0005-gnu-Update-shogun-to-6.1.3.patch Content-Transfer-Encoding: quoted-printable From=202c41c81ad77ee20c89c3056908c13635ee3f5e10 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Wed, 16 May 2018 11:56:18 -0400 Subject: [PATCH 5/5] gnu: Update shogun to 6.1.3. * gnu/packages/machine-learning.scm (shogun): Update to 6.1.3. [source]: Update snippet to remove proprietary software. [arguments]: Rewrite list of symlinks in 'delete-broken-symlinks' phase. Rewrite file lists given to substitute* in 'change-R-target-path' and 'fix-octave-modules' phases. Adjust 'fix-octave-modules' for the update. Add 'move-rxcpp' phase. Rewrite configure-flags for the update. [inputs]: Add eigen. [native-inputs]: Add rxcpp. =2D-- gnu/packages/machine-learning.scm | 81 ++++++++++++++++++------------- 1 file changed, 46 insertions(+), 35 deletions(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learn= ing.scm index 6536d861e..e135ee0ee 100644 =2D-- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -37,6 +37,7 @@ #:use-module (guix build-system r) #:use-module (guix git-download) #:use-module (gnu packages) + #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -367,7 +368,7 @@ sample proximities between pairs of cases.") (define-public shogun (package (name "shogun") =2D (version "4.0.0") + (version "6.1.3") (source (origin (method url-fetch) @@ -377,7 +378,7 @@ sample proximities between pairs of cases.") "/sources/shogun-" version ".tar.bz2")) (sha256 (base32 =2D "159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb")) + "1rn9skm3nw6hr7mr3lgp2gfqhi7ii0lyxck7qmqnf8avq349s5jp")) (modules '((guix build utils) (ice-9 rdelim))) (snippet @@ -409,8 +410,20 @@ sample proximities between pairs of cases.") (and skipping? (not skip-next?))) (display line out)) (loop (read-line in 'concat) skip-next?))))))) =2D (for-each delete-ifdefs (find-files "src/shogun/kernel/" =2D "^Kernel\\.(cpp|h)")))))) + (for-each delete-ifdefs + (append + (find-files "src/shogun/classifier/mkl" + "^MKLClassification\\.cpp") + (find-files "src/shogun/classifier/svm" + "^SVMLightOneClass\\.(cpp|h)") + (find-files "src/shogun/multiclass" + "^ScatterSVM\\.(cpp|h)") + (find-files "src/shogun/kernel/" + "^(Kernel|CombinedKernel|ProductKernel)\= \.(cpp|h)") + (find-files "src/shogun/regression/svr" + "^(MKLRegression|SVRLight)\\.(cpp|h)") + (find-files "src/shogun/transfer/domain_adaptation" + "^DomainAdaptationSVM\\.(cpp|h)"))))))) (build-system cmake-build-system) (arguments '(#:tests? #f ;no check target @@ -423,62 +436,59 @@ sample proximities between pairs of cases.") "applications/easysvm/data" "applications/msplicer/data" "applications/ocr/data" =2D "examples/documented/data" =2D "examples/documented/matlab_static" =2D "examples/documented/octave_static" =2D "examples/undocumented/data" =2D "examples/undocumented/matlab_stati= c" =2D "examples/undocumented/octave_stati= c" =2D "tests/integration/data" =2D "tests/integration/matlab_static" =2D "tests/integration/octave_static" =2D "tests/integration/python_modular/t= ests")) + "examples/meta/data" + "examples/undocumented/data")) #t)) (add-after 'unpack 'change-R-target-path (lambda* (#:key outputs #:allow-other-keys) =2D (substitute* '("src/interfaces/r_modular/CMakeLists.txt" =2D "src/interfaces/r_static/CMakeLists.txt" =2D "examples/undocumented/r_modular/CMakeLists.= txt") + (substitute* '("src/interfaces/r/CMakeLists.txt" + "examples/meta/r/CMakeLists.txt") (("\\$\\{R_COMPONENT_LIB_PATH\\}") (string-append (assoc-ref outputs "out") "/lib/R/library/"))) #t)) (add-after 'unpack 'fix-octave-modules (lambda* (#:key outputs #:allow-other-keys) =2D (substitute* '("src/interfaces/octave_modular/CMakeLists.tx= t" =2D "src/interfaces/octave_static/CMakeLists.txt= ") + (substitute* "src/interfaces/octave/CMakeLists.txt" (("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}") =2D "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INC= LUDE_DIRS}/octave")) =2D =2D ;; change target directory =2D (substitute* "src/interfaces/octave_modular/CMakeLists.txt" + "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLU= DE_DIRS}/octave") + ;; change target directory (("\\$\\{OCTAVE_OCT_LOCAL_API_FILE_DIR\\}") (string-append (assoc-ref outputs "out") "/share/octave/packages"))) + (substitute* '("src/interfaces/octave/swig_typemaps.i" + "src/interfaces/octave/sg_print_functions.cpp") + ;; "octave/config.h" and "octave/oct-obj.h" deprecated in O= ctave. + (("octave/config\\.h") "octave/octave-config.h") + (("octave/oct-obj.h") "octave/ovl.h")) #t)) + (add-after 'unpack 'move-rxcpp + (lambda* (#:key inputs #:allow-other-keys) + (let ((rxcpp-dir "shogun/third-party/rxcpp")) + (mkdir-p rxcpp-dir) + (install-file (assoc-ref inputs "rxcpp") rxcpp-dir) + #t))) (add-before 'build 'set-HOME ;; $HOME needs to be set at some point during the build phase (lambda _ (setenv "HOME" "/tmp") #t))) #:configure-flags (list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=3DTRUE" "-DUSE_SVMLIGHT=3DOFF" ;disable proprietary SVMLIGHT =2D ;;"-DJavaModular=3DON" ;requires unpackaged jblas =2D ;;"-DRubyModular=3DON" ;requires unpackaged ruby-narray =2D ;;"-DPerlModular=3DON" ;"FindPerlLibs" does not exist =2D ;;"-DLuaModular=3DON" ;fails because lua doesn't build pkg= config file =2D "-DOctaveModular=3DON" =2D "-DOctaveStatic=3DON" =2D "-DPythonModular=3DON" =2D "-DPythonStatic=3DON" =2D "-DRModular=3DON" =2D "-DRStatic=3DON" =2D "-DCmdLineStatic=3DON"))) + "-DBUILD_META_EXAMPLES=3DOFF" ;requires unpackaged ctags + ;;"-DINTERFACE_JAVA=3DON" ;requires unpackaged jblas + ;;"-DINTERFACE_RUBY=3DON" ;requires unpackaged ruby-narray + ;;"-DINTERFACE_PERL=3DON" ;"FindPerlLibs" does not exist + ;;"-DINTERFACE_LUA=3DON" ;fails because lua doesn't build pk= gconfig file + "-DINTERFACE_OCTAVE=3DON" + "-DINTERFACE_PYTHON=3DON" + "-DINTERFACE_R=3DON"))) (inputs `(("python" ,python) ("numpy" ,python-numpy) ("r-minimal" ,r-minimal) ("octave" ,octave) ("swig" ,swig) + ("eigen" ,eigen) ("hdf5" ,hdf5) ("atlas" ,atlas) ("arpack" ,arpack-ng) @@ -488,7 +498,8 @@ sample proximities between pairs of cases.") ("lzo" ,lzo) ("zlib" ,zlib))) (native-inputs =2D `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("rxcpp" ,rxcpp))) ;; Non-portable SSE instructions are used so building fails on platfor= ms ;; other than x86_64. (supported-systems '("x86_64-linux")) =2D-=20 2.17.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlsNvlcACgkQ5qXuPBlG eg1rZw//bm2jCNudExPJf4j72lym63blW+GCX7HapP/AyaNxqYjTi3JEtrHulYWv y45nTFFLJb9NtQ1BJTIrTxYTDn8/9GEqseSrrQ6ucqpdcCsxrACKOA95HNv/tSAd Kr4zOouBXsJtYt+VpCsdKl4vhKeTZREZIjpdvbTmuujY+v2GKgJ/UWYr0mwZK8Ly 70SrA5IRpzMbqb4Frx5ccpKGLERBakt7Cgjc2xLeDIpmRFJw82i6rv7+4NgWO6QT stEyCd5d30fZ+X4Ew/DxphBIHlgEtBO6IcFsN+eKQMYKLTVV1vo/QF0YCyUrr+Co U61Z9g4KRB4sarMGOMOg60lwPdLGl8MR6SFA3yPKuoTabaWgC5/y9nu0/vw66Ike gujm9dxftRMZ8jZzLUbICt0KS3NN5W3ZxwVxeZFGs4pGfGGALU06uB9aSmSSYCQR VeEy0/QNpi1dwbtPTOFcwEkuZ8sFGKznC3WqobEsTsSR/LpWavtpojE8zOd09Jly DCgaSWo1mVjQY62I4UTiGNaBLGddkwWpK0b55XAnlFY9Hs4fX5uzpGCTOUd/saaI f6XClyn96PybbO2INSm6ym6cpYKbokvZUErYzvA8FBhwG1+x4Vz6c+EgtBMA6lMy TBttoZZpjDf84ge3KZpNk5cdy8i++zNOfiQ5QpejRDRWe0G8/Zs= =gd9t -----END PGP SIGNATURE----- --==-=-=--