summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRomain GARBAGE <romain.garbage@inria.fr>2025-11-20 10:58:06 +0100
committerAndreas Enge <andreas@enge.fr>2025-11-23 12:09:18 +0100
commit96f3df23b7f8f133268d3dc698cd0c2ed1f72e58 (patch)
tree80dfbcb571d62345bc83679b7563e1b79dd23c4c /gnu
parent12197aa0091c042602f07072b775e20ea3fbef3b (diff)
gnu: dlib: Fix broken package.
This is a follow-of of commit 830562e5cdb6c244f39c3168b4649c1144099450. * gnu/packages/machine-learning.scm (dlib)[arguments]: Replace unquote with ungexp. Improve style. Fix failing tests with GCC 14. Change-Id: Ida95405b026893bae26af39cbfc4a0457e2d232c Signed-off-by: Andreas Enge <andreas@enge.fr>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/machine-learning.scm19
1 files changed, 15 insertions, 4 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index b53b6c1bd98..35196bf00a5 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -32,6 +32,7 @@
;;; Copyright © 2025 Lapearldot <lapearldot@disroot.org>
;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.org>
;;; Copyright © 2025 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2025 Romain Garbage <romain.garbage@inria.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2031,14 +2032,13 @@ than 8 bits, and at the end only some significant 8 bits are kept.")
;; config.h recommends explicitly enabling or disabling asserts
;; when building as a shared library. By default neither is set.
(substitute* "dlib/config.h"
- (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS"))
- #t))
+ (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS"))))
(add-after 'disable-asserts 'disable-failing-tests
(lambda _
;; One test times out on MIPS, so we need to disable it.
;; Others are flaky on some platforms.
- (let* ((system ,(or (%current-target-system)
- (%current-system)))
+ (let* ((system #$(or (%current-target-system)
+ (%current-system)))
(disabled-tests (cond
((string-prefix? "mips64" system)
'("object_detector" ; timeout
@@ -2053,6 +2053,17 @@ than 8 bits, and at the end only some significant 8 bits are kept.")
(substitute* "dlib/test/makefile"
(((string-append "SRC \\+= " test "\\.cpp")) "")))
disabled-tests))))
+ (add-before 'configure 'fix-test-build-error-with-gcc-14.3
+ (lambda _
+ (substitute* "dlib/test/CMakeLists.txt"
+ ;; Some flags are activated specifically for GCC 14.0 but they
+ ;; are needed for current GCC version (14.3.0). Let's assume
+ ;; they are needed for the 14.x branch.
+ (("14\\.0\\.1")
+ "14.99")
+ ;; Tests use deprecated functions from ffmpeg.
+ (("-Werror\\)")
+ "-Werror -Wno-error=deprecated-declarations)"))))
(replace 'check
(lambda _
;; XXX: This causes a rebuild--however, trying to run the tests