unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Bilke <lars.bilke@ufz.de>
To: 57005@debbugs.gnu.org
Subject: bug#57005: [PATCH v1] gnu: petsc: scrub build machine specifics
Date: Thu, 29 Feb 2024 11:00:19 +0100	[thread overview]
Message-ID: <44D266D4-7B4A-4486-AA7E-24CC9E4622B0@ufz.de> (raw)
In-Reply-To: <de4e8fff610a489bb8c14b1d260a5bd542dfc7d6.1709200010.git.lars.bilke@ufz.de>


[-- Attachment #1.1: Type: text/plain, Size: 2691 bytes --]

This patch makes these files deterministic:

- petscmachineinfo.h
- petscvariables

Unfortunately libpetsc.so.3.16.1 still differs between builds, see e.g. this diffoscope output:

https://jsfiddle.net/dLx15obp/show (click on run)

Maybe someone has an idea how to also fix the library?

Sincerely,
Lars

On 29 Feb 2024, at 10:46, Lars Bilke wrote:

> 'Libraries compiled on' does not have to be removed since PETSc 3.9:
>
> https: //gitlab.com/petsc/petsc/-/commit/a970bd748978a4e12790be7c36b10e832ec0149f
>
> Change-Id: I41d82339e43187d7dc7e3fc189a338784c363c68
>
> ---
>  gnu/packages/maths.scm | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index 1f61ee0583..f09cbee48b 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -3455,18 +3455,21 @@ (define-public petsc
>                  (substitute* "config/example_template.py"
>                    (("#!/usr/bin/env bash")
>                     (string-append "#!" (which "bash")))))))
> -          (add-after 'configure 'clean-local-references
> +          (add-after 'install 'clean-local-references
>              (lambda* (#:key outputs #:allow-other-keys)
>                (let ((out (assoc-ref outputs "out")))
>                  (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
>                    ;; Prevent build directory from leaking into compiled code
>                    (((getcwd)) out)
> -                  ;; Scrub timestamp for reproducibility
> -                  ((".*Libraries compiled on.*") ""))
> +                  ;; Scrub build machine characteristic
> +                  (("Machine characteristics: Linux-[0-9]+\\.[0-9]+\\.[0-9]+")
> +                    "Machine characteristics: Linux-x.x.x"))
>                  (substitute* (find-files "." "petscvariables")
>                    ;; Do not expose build machine characteristics, set to defaults.
> -                  (("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
> -                  (("NPMAX = [:digit:]+") "NPMAX = 2")))))
> +                  (("MAKE_NP = [[:digit:]]+") "MAKE_NP = 2")
> +                  (("MAKE_TEST_NP = [[:digit:]]+") "MAKE_TEST_NP = 2")
> +                  (("MAKE_LOAD = [[:digit:]]+\\.[[:digit:]]+") "MAKE_LOAD = 2.0")
> +                  (("NPMAX = [[:digit:]]+") "NPMAX = 2")))))
>            (add-after 'install 'clean-install
>              ;; Try to keep installed files from leaking build directory names.
>              (lambda* (#:key inputs outputs #:allow-other-keys)
>
> base-commit: 75bad75367fcf2c289fae3b40dbcc850f92177be
> -- 
> 2.43.0

[-- Attachment #1.2: Type: text/html, Size: 3724 bytes --]

[-- Attachment #2: S/MIME digital signature --]
[-- Type: application/pkcs7-signature, Size: 5435 bytes --]

  reply	other threads:[~2024-02-29 10:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 14:51 bug#57005: PETSc is not reproducible Ludovic Courtès
2024-02-29  9:46 ` bug#57005: [PATCH v1] gnu: petsc: scrub build machine specifics Lars Bilke
2024-02-29 10:00   ` Lars Bilke [this message]
2024-02-29 17:48 ` bug#57005: Suggestion Andreas Enge
2024-03-01  8:27 ` bug#57005: [PATCH v2] gnu: petsc: scrub build machine specifics Lars Bilke
2024-03-05 14:58 ` bug#57005: [PATCH v3] " Lars Bilke
2024-03-05 15:01   ` Lars Bilke
2024-03-06 11:51 ` bug#57005: [PATCH v4] " Lars Bilke
2024-03-06 11:54   ` Lars Bilke
2024-09-05 12:59 ` bug#57005: Close Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D266D4-7B4A-4486-AA7E-24CC9E4622B0@ufz.de \
    --to=lars.bilke@ufz.de \
    --cc=57005@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).