From 121895b2d7915b1f1ef0430921418783019393d0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Aug 2016 17:23:58 +0100 Subject: [PATCH 2/2] gnu: dlib: Disable failing tests. * gnu/packages/machine-learning.scm (dlib)[arguments]: Add 'disable-failing-tests phase and prevent building dlib twice. [inputs]: Add lapack. --- gnu/packages/machine-learning.scm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 7669702..35f1514 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -499,14 +499,25 @@ single hidden layer, and for multinomial log-linear models.") (substitute* "dlib/config.h" (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS")) #t)) + (add-after 'disable-asserts 'disable-failing-tests + ;; A number of tests are known to fail on 32-bit platforms in 19.1. + ;; See https://github.com/davisking/dlib/issues/197 for details. + (lambda _ + (for-each + (lambda (test) + (substitute* "dlib/test/makefile" + (((string-append "SRC \\+= " test "\\.cpp")) "")) #t) + (list "learning_to_track" "max_cost_assignment" ; armhf + "optimization" "matrix2" "mpc" ; i686 + "empirical_map" ; may segfault with < openblas-0.2.18 + "object_detector")))) ; timeout on mips64el (replace 'check (lambda _ ;; No test target, so we build and run the unit tests here. - (let ((test-dir (string-append "../dlib-" ,version "/dlib/test/build"))) - (mkdir-p test-dir) + (let ((test-dir (string-append "../dlib-" ,version "/dlib/test"))) (with-directory-excursion test-dir - (and (zero? (system* "cmake" "..")) - (zero? (system* "cmake" "--build" "." "--config" "Release")) + (setenv "CXXFLAGS" "-std=gnu++11") + (and (zero? (system* "make" "-j" (number->string (parallel-job-count)))) (zero? (system* "./dtest" "--runall"))))))) (add-after 'install 'delete-static-library (lambda* (#:key outputs #:allow-other-keys) @@ -515,7 +526,7 @@ single hidden layer, and for multinomial log-linear models.") `(("pkg-config" ,pkg-config))) (inputs `(("giflib" ,giflib) - ;("lapack" ,lapack) XXX lapack here causes test failures in some setups. + ("lapack" ,lapack) ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libx11" ,libx11) -- 2.9.3