unofficial mirror of help-guix@gnu.org 
 help / color / Atom feed
* How to debug / investigate non-reproducible build for r-repr?
@ 2020-06-29  8:25 Lo Peter
  2020-06-29  9:13 ` Brice Waegeneire
  0 siblings, 1 reply; 3+ messages in thread
From: Lo Peter @ 2020-06-29  8:25 UTC (permalink / raw)
  To: help-guix

Dear all,

I am trying to import r-languageserver, and one of its dependency is
r-repr, which I found that cannot be built reproducibly (on my
laptop's guix, installed on Linux Mint), i.e.

        guix build --rounds=2 r-repr

would give the error saying that "...r-repr-1.1.0.drv differs from
previous round".

How should I begin to investigate the issue?

Regards,
Peter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to debug / investigate non-reproducible build for r-repr?
  2020-06-29  8:25 How to debug / investigate non-reproducible build for r-repr? Lo Peter
@ 2020-06-29  9:13 ` Brice Waegeneire
  2020-06-29 10:19   ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: Brice Waegeneire @ 2020-06-29  9:13 UTC (permalink / raw)
  To: Lo Peter; +Cc: Help-Guix, help-guix

Hello Peter,

On 2020-06-29 08:25, Lo Peter wrote:
> I am trying to import r-languageserver, and one of its dependency is
> r-repr, which I found that cannot be built reproducibly (on my
> laptop's guix, installed on Linux Mint), i.e.
> 
>         guix build --rounds=2 r-repr
> 
> would give the error saying that "...r-repr-1.1.0.drv differs from
> previous round".
> 
> How should I begin to investigate the issue?

I'm new to fixing non reproductible build, all I ever needed thus
far is using 'diffoscope'.  Note that this program has a lot of
optional dependencies that aren't installed by default but you
get a warning when 'diffoscope' can make uses of such dependencies,
in the case of 'r-repr' it wants to use 'Rscript'.

Here is quick use of it:
--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc diffoscope r
$ guix build r-repr --check --keep-failed
…
guix build: error: derivation 
`/gnu/store/5rbf3kb0s96m1nij5s631j1k3mnh75lg-r-repr-1.1.0.drv' may not 
be deterministic: output 
`/gnu/store/aah5bpxg1h3sf09ca1plp4cbj745n95y-r-repr-1.1.0' differs from 
‘/gnu/store/aah5bpxg1h3sf09ca1plp4cbj745n95y-r-repr-1.1.0-check’
$ diffoscope --exclude-command stat 
/gnu/store/aah5bpxg1h3sf09ca1plp4cbj745n95y-r-repr-1.1.0{,-check}
--8<---------------cut here---------------end--------------->8---

- Brice


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to debug / investigate non-reproducible build for r-repr?
  2020-06-29  9:13 ` Brice Waegeneire
@ 2020-06-29 10:19   ` zimoun
  0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2020-06-29 10:19 UTC (permalink / raw)
  To: Brice Waegeneire, Lo Peter; +Cc: Help-Guix, help-guix

Dear,

To complement what Brice said.

On Mon, 29 Jun 2020 at 09:13, Brice Waegeneire <brice@waegenei.re> wrote:

> --8<---------------cut here---------------start------------->8---
> $ guix build r-repr --check --keep-failed
> …
> guix build: error: derivation 
> `/gnu/store/5rbf3kb0s96m1nij5s631j1k3mnh75lg-r-repr-1.1.0.drv' may not 
> be deterministic: output 
> `/gnu/store/aah5bpxg1h3sf09ca1plp4cbj745n95y-r-repr-1.1.0' differs from 
> ‘/gnu/store/aah5bpxg1h3sf09ca1plp4cbj745n95y-r-repr-1.1.0-check’
> --8<---------------cut here---------------end--------------->8---

Before going to "diffoscope", personally I try to identify which files
are offending, something like:

--8<---------------cut here---------------start------------->8---
diff -r --no-dereference /gnu/store/75xc2l38ml4mz7w2cb4qhg08vs34xr3i-r-repr-1.1.0{,-check}
Binary files /gnu/store/75xc2l38ml4mz7w2cb4qhg08vs34xr3i-r-repr-1.1.0/site-library/repr/R/repr.rdb and /gnu/store/75xc2l38ml4mz7w2cb4qhg08vs34xr3i-r-repr-1.1.0-check/site-library/repr/R/repr.rdb differ
Binary files /gnu/store/75xc2l38ml4mz7w2cb4qhg08vs34xr3i-r-repr-1.1.0/site-library/repr/R/repr.rdx and /gnu/store/75xc2l38ml4mz7w2cb4qhg08vs34xr3i-r-repr-1.1.0-check/site-library/repr/R/repr.rdx differ
--8<---------------cut here---------------end--------------->8---

Well, you need to check the files "repr/R/repr.{rdb,rdx}".  Because of
the option "--keep-failed", you can go to
"/tmp/guix-build-r-repr-1.1.0.drv-0" and give a look to how these files
are produced.  The classical source of non-determinism is date.  Then if
everything appears to you as expected, then you can go to "diffoscope".


Hope that helps,
simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29  8:25 How to debug / investigate non-reproducible build for r-repr? Lo Peter
2020-06-29  9:13 ` Brice Waegeneire
2020-06-29 10:19   ` zimoun

unofficial mirror of help-guix@gnu.org 

Archives are clonable:
	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git