From a7f6072f14f7280846a9408e6c8dcb3a705fc8db Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Fri, 3 Jan 2025 14:39:21 +0100 Subject: [PATCH] gnu: r-rcppparallel: Fix build with gcc-14. * gnu/packages/cran.scm (r-rcppparallel)[arguments]: Use G-Expressions. Add phase "relax-gcc-14-strictness". Change-Id: I3d6c0d0986405dcc327bddb1eccaf95c298aec1d --- gnu/packages/cran.scm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index aa18931d92..b171903458 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -39,6 +39,7 @@ ;;; Copyright © 2022 Greg Hogan ;;; Copyright © 2024 Marco Baggio ;;; Copyright © 2024 Spencer King +;;; Copyright © 2024 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -21664,10 +21665,22 @@ (define-public r-rcppparallel (arguments (list #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'use-system-tbb - (lambda* (#:key inputs #:allow-other-keys) - (setenv "TBB_ROOT" (assoc-ref inputs "tbb"))))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'use-system-tbb + (lambda* (#:key inputs #:allow-other-keys) + (setenv "TBB_ROOT" (assoc-ref inputs "tbb")))) + (add-before 'install 'relax-gcc-14-strictness + (lambda _ + ;; XXX FIXME: $HOME/.R/Makevars seems to be the only way to + ;; set custom CFLAGS for R? + (setenv "HOME" (getcwd)) + (mkdir-p ".R") + (with-directory-excursion ".R" + (with-output-to-file "Makevars" + (lambda _ + (display (string-append + "CXXFLAGS=-g -O2" + " -Wno-error=changes-meaning\n")))))))))) (inputs (list tbb-2020)) (native-inputs (list r-rcpp r-runit)) (home-page "https://rcppcore.github.io/RcppParallel/")