From: Kei Kebreau <kkebreau@posteo.net>
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: 31479@debbugs.gnu.org
Subject: [bug#31479] [PATCH 3/3] gnu: Update shogun to 6.1.3.
Date: Tue, 29 May 2018 16:55:51 -0400 [thread overview]
Message-ID: <87h8mqkwq0.fsf@posteo.net> (raw)
In-Reply-To: <87po1hnba0.fsf@posteo.net> (Kei Kebreau's message of "Sat, 26 May 2018 21:21:43 -0400")
[-- Attachment #1.1: Type: text/plain, Size: 1192 bytes --]
Kei Kebreau <kkebreau@posteo.net> writes:
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> 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 “package” syntax to delay evaluation 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!
[-- Attachment #1.2: 0005-gnu-Update-shogun-to-6.1.3.patch --]
[-- Type: text/plain, Size: 8662 bytes --]
From 2c41c81ad77ee20c89c3056908c13635ee3f5e10 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kkebreau@posteo.net>
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.
---
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-learning.scm
index 6536d861e..e135ee0ee 100644
--- 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")
- (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
- "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?)))))))
- (for-each delete-ifdefs (find-files "src/shogun/kernel/"
- "^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"
- "examples/documented/data"
- "examples/documented/matlab_static"
- "examples/documented/octave_static"
- "examples/undocumented/data"
- "examples/undocumented/matlab_static"
- "examples/undocumented/octave_static"
- "tests/integration/data"
- "tests/integration/matlab_static"
- "tests/integration/octave_static"
- "tests/integration/python_modular/tests"))
+ "examples/meta/data"
+ "examples/undocumented/data"))
#t))
(add-after 'unpack 'change-R-target-path
(lambda* (#:key outputs #:allow-other-keys)
- (substitute* '("src/interfaces/r_modular/CMakeLists.txt"
- "src/interfaces/r_static/CMakeLists.txt"
- "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)
- (substitute* '("src/interfaces/octave_modular/CMakeLists.txt"
- "src/interfaces/octave_static/CMakeLists.txt")
+ (substitute* "src/interfaces/octave/CMakeLists.txt"
(("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}")
- "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_DIRS}/octave"))
-
- ;; change target directory
- (substitute* "src/interfaces/octave_modular/CMakeLists.txt"
+ "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_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 Octave.
+ (("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=TRUE"
"-DUSE_SVMLIGHT=OFF" ;disable proprietary SVMLIGHT
- ;;"-DJavaModular=ON" ;requires unpackaged jblas
- ;;"-DRubyModular=ON" ;requires unpackaged ruby-narray
- ;;"-DPerlModular=ON" ;"FindPerlLibs" does not exist
- ;;"-DLuaModular=ON" ;fails because lua doesn't build pkgconfig file
- "-DOctaveModular=ON"
- "-DOctaveStatic=ON"
- "-DPythonModular=ON"
- "-DPythonStatic=ON"
- "-DRModular=ON"
- "-DRStatic=ON"
- "-DCmdLineStatic=ON")))
+ "-DBUILD_META_EXAMPLES=OFF" ;requires unpackaged ctags
+ ;;"-DINTERFACE_JAVA=ON" ;requires unpackaged jblas
+ ;;"-DINTERFACE_RUBY=ON" ;requires unpackaged ruby-narray
+ ;;"-DINTERFACE_PERL=ON" ;"FindPerlLibs" does not exist
+ ;;"-DINTERFACE_LUA=ON" ;fails because lua doesn't build pkgconfig file
+ "-DINTERFACE_OCTAVE=ON"
+ "-DINTERFACE_PYTHON=ON"
+ "-DINTERFACE_R=ON")))
(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
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("rxcpp" ,rxcpp)))
;; Non-portable SSE instructions are used so building fails on platforms
;; other than x86_64.
(supported-systems '("x86_64-linux"))
--
2.17.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-05-29 20:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 23:10 [bug#31479] [PATCH 1/3] gnu: octave: Update to 4.4.0 Kei Kebreau
2018-05-16 23:19 ` [bug#31479] [PATCH 2/3] gnu: Add rxcpp Kei Kebreau
2018-05-16 23:19 ` [bug#31479] [PATCH 3/3] gnu: Update shogun to 6.1.3 Kei Kebreau
2018-05-16 23:24 ` Kei Kebreau
2018-05-17 11:39 ` Jonathan Brielmaier
2018-05-18 5:58 ` Jonathan Brielmaier
2018-05-18 17:08 ` Kei Kebreau
2018-05-19 20:18 ` Ludovic Courtès
2018-05-20 18:31 ` Kei Kebreau
2018-05-17 11:26 ` [bug#31479] [PATCH 2/3] gnu: Add rxcpp Ludovic Courtès
2018-05-17 11:24 ` [bug#31479] [PATCH 1/3] gnu: octave: Update to 4.4.0 Ludovic Courtès
2018-05-24 9:09 ` [bug#31479] [PATCH 3/3] gnu: Update shogun to 6.1.3 Ricardo Wurmus
2018-05-27 1:21 ` Kei Kebreau
2018-05-29 20:55 ` Kei Kebreau [this message]
2018-05-29 21:32 ` Ricardo Wurmus
2018-05-29 22:34 ` 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=87h8mqkwq0.fsf@posteo.net \
--to=kkebreau@posteo.net \
--cc=31479@debbugs.gnu.org \
--cc=ricardo.wurmus@mdc-berlin.de \
/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).