guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38546] [PATCH 2/3] gnu: julia-build-system: Enable tests.


From: Ludovic Courtès
Subject: [bug#38546] [PATCH 2/3] gnu: julia-build-system: Enable tests.
Date: Sun, 15 Dec 2019 22:45:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Nicolò Balzarotti <address@hidden> skribis:

> ---
>  guix/build-system/julia.scm       |  4 +++-
>  guix/build/julia-build-system.scm | 28 +++++++++++++++++++---------
>  2 files changed, 22 insertions(+), 10 deletions(-)

With a commit log, please.  :-)

> --- a/guix/build/julia-build-system.scm
> +++ b/guix/build/julia-build-system.scm
> @@ -32,7 +32,13 @@
>  ;; Code:
>  
>  (define (invoke-julia code)
> -  (invoke "julia" "-e" code))
> +  ;; Julia stores the result of the time() call
> +  ;; inside the precompiled file. When trying to load it, its precompilation
> +  ;; it fails at comparing the file mtime with the precompilation time,
> +  ;; always triggering a recompile. This fixes the stored value.
> +  ;; Also, libc.jl rand() uses time() as its seed. This might introduce 
> indeterminism while building
> +  ;; Default guix mtime is 1, so I'm setting the same here (if they differ, 
> precompilation is invalid)
> +  (invoke "faketime" "-f" "1970-01-01 00:00:01" "julia" "-e" code))

Do you think it would be feasible to modify Julia to emit this fixed
timestamp, or to honor SOURCE_DATE_EPOCH, instead of using ‘faketime’?

The reason I’m asking is that (1) ‘faketime’ relies on LD_PRELOAD and so
it could introduce its own set of issues, and (2) I wouldn’t be
surprised to find ready-to-use SOURCE_DATE_EPOCH patches from fellow
Reproducible Builders floating around.  :-)

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]