GNU bug report logs - #36477
Add Guix System cross-compilation support

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Tue, 2 Jul 2019 15:19:02 UTC

Severity: normal

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #596 received at 36477 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: mbakke <at> fastmail.com, 36477 <at> debbugs.gnu.org
Subject: Re: [bug#36477] [PATCH v3 06/48] gnu: groff: Fix cross compilation.
Date: Wed, 04 Sep 2019 15:23:59 +0200
Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:

> * gnu/packages/groff.scm (groff)[arguments]: Replace build phase to pass
> GROFF_BIN_PATH and GROFFBIN variables when cross-compiling.
>
> Also add native groff as a native-input when cross-compiling.

Please mention changes to ‘groff-minimal’.


[...]

> +	,@(if (%current-target-system)
> +              '((replace 'build
> +		  (lambda* (#:key
> +			    make-flags parallel-build?
> +			    native-inputs target #:allow-other-keys)
> +		    ;; When cross-compiling, native groff is needed, see:
> +		    ;; http://www.mail-archive.com/bug-groff <at> gnu.org/msg01335.html
> +		    (let ((parallel
> +			   (if parallel-build?
> +			       `("-j" ,(number->string (parallel-job-count)))
> +			       '()))
> +			  (flags
> +			   (if target
> +			       (let ((groff (or
> +					     (assoc-ref native-inputs "groff")
> +					     (assoc-ref native-inputs "self"))))
> +				 (append
> +				  make-flags
> +				  (list
> +				   (string-append "GROFF_BIN_PATH=" groff)
> +				   (string-append "GROFFBIN=" groff
> +						  "/bin/groff"))))
> +			       make-flags)))

Wouldn’t it be easier to have:

  (arguments
    `(,@(if (%current-target-system)
            `(#:make-flags (list (string-append "GROFF_BIN_PATH="
                                                (assoc-ref %build-native-inputs "self)
                                                …)))
             '()
      …))

?

>      (native-inputs `(("bison" ,bison)
> -                     ("perl" ,perl)))
> +                     ("perl" ,perl)
> +                     ("groff" ,groff)))

Should probably be:

  ("self" ,this-package)

for consistency.

Thanks,
Ludo’.




This bug report was last modified 5 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.