all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nils Gillmann <ng0@n0.is>
To: Christopher Lemmer Webber <cwebber@dustycloud.org>
Cc: 30680@debbugs.gnu.org, help-guix <help-guix@gnu.org>,
	racket-users@googlegroups.com
Subject: Re: bug#30680: [racket-users] Using Racket's raco on on Guix(SD)
Date: Sat, 11 Aug 2018 22:05:38 +0000	[thread overview]
Message-ID: <20180811220538.ca2wyilh6gq62dm3@abyayala> (raw)
In-Reply-To: <87va8gfu0c.fsf@dustycloud.org>

Christopher Lemmer Webber transcribed 3.3K bytes:
> Timothy Sample writes:
> 
> > Christopher Lemmer Webber <cwebber@dustycloud.org> writes:
> >
> >> Konrad Hinsen writes:
> >>
> >>> In my tests, all packages ended up working, but performance is indeed
> >>> worse than with a Racket installation outside of Guix.
> >>>
> >>> It would be nice if someone with more knowledge of Racket internals
> >>> could give a hint or two for debugging this issue!
> >>>
> >>> Konrad.
> >>
> >> I'm posting a bug bounty on this issue: if someone can fix this I will
> >> pay them $250 USD.  I don't have the time or knowledge enough of Racket
> >> internals to do so myself.
> >
> > I have discovered a few things, but I’m not sure how to fix the
> > underlying problem(s).
> >
> > The reason Racket is trying to recompile the OpenSSL files is because of
> > a hash mismatch.  This can be seen by enabling debugging output:
> >
> >     $ PLTSTDERR=debug raco setup openssl
> >
> > Which says a lot of things, but most interestingly it says:
> >
> > --------------------------------
> > ...
> > compiler/cm: checking: /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-racket-6.12/share/racket/collects/openssl/libcrypto.rkt
> > compiler/cm: different src hash... (5d9ca57f3e267d956c7b5e62578467beb8ccc1d2 4d21ac412723fbf33f97669c2f73f0e9367f4510)
> > compiler/cm: maybe-compile-zo starting /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-racket-6.12/share/racket/collects/openssl/libcrypto.rkt
> > compiler/cm:   start-compile: /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-racket-6.12/share/racket/collects/openssl/libcrypto.rkt
> > compiler/cm:   compiling /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-racket-6.12/share/racket/collects/openssl/libcrypto.rkt
> > open-output-file: cannot open output file
> >   path: /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-racket-6.12/share/racket/collects/openssl/compiled/tmp15340167971534016797570
> >   system error: Read-only file system; errno=30
> >   context...:
> > ...
> > --------------------------------
> >
> > This hash mismatch is caused by grafting.  When the package is built,
> > the path to OpenSSL gets hard-coded in a source file.  The SHA-1 hash
> > for this file is stored in its “.dep” file.  When the output is
> > grafted, the source file gets updated with a new OpenSSL path, but the
> > hash does not get updated.  This makes Racket think that the cached
> > bytecode file is incorrect (even though it was likely grafted too),
> > and it tries to recompile it.  It fails because it tries to write this
> > new bytecode file to the store.
> 
> Interesting... I hadn't even considered grafting.  (I still wonder why
> it's even trying to open *any* file in the store for output though...)
> 
> > I double checked this by trying with an ungrafted Racket, and got better
> > results.  (There was still a warning about writing to the store, but it
> > seemed less significant.)
> 
> Cool!
> 
> > The only thing I can think of for a fix would be to patch Racket to be
> > more lenient with bytecode files in the store.  That is, ignore hash
> > mismatches in store-files.  I might give this a try later tonight if
> > nobody has any better ideas.
> >
> > -- Tim
> 
> BTW, some examples of packages where I've had trouble, in case it helps
> with testing:
> 
>  - Raart
>  - Gregor
>  - crypto (seemed to work last time, not sure why it wasn't working before)
> 
> Though at this point I also can't do just "raco setup" on a local
> package either, but maybe resolving this issue will fix that.
> 
From what I've learned in the last couple of hours, the last problem could
be due to leftovers in your raco / dotRacket folder from an older installation.

  reply	other threads:[~2018-08-11 22:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 13:42 Using Racket's raco on on Guix(SD) Christopher Lemmer Webber
2018-05-22 15:01 ` Ricardo Wurmus
     [not found]   ` <87h8mzoht9.fsf-aeLSDxfgpabR7s880joybQ@public.gmane.org>
2018-07-27 18:38     ` Christopher Lemmer Webber
     [not found] ` <87d0xn24d9.fsf-oPPOFS2i0wrhBEyLrsoctQ@public.gmane.org>
2018-05-24  6:20   ` Konrad Hinsen
     [not found]     ` <0990d521-934b-069b-3f29-faf8a22a5bd0-97jfqw80gc7k1uMJSBkQmQ@public.gmane.org>
2018-08-11 15:18       ` Christopher Lemmer Webber
2018-08-11 20:23         ` bug#30680: [racket-users] " Timothy Sample
2018-08-11 20:23         ` Timothy Sample
     [not found]           ` <87h8k0d54i.fsf-txiMz1+kQXoAvxtiuMwx3w@public.gmane.org>
2018-08-11 21:55             ` bug#30680: " Christopher Lemmer Webber
2018-08-11 22:05               ` Nils Gillmann [this message]
2018-08-11 23:28                 ` bug#30680: [racket-users] " Christopher Lemmer Webber
2018-08-11 23:28                 ` bug#30680: " Christopher Lemmer Webber
2018-08-12  2:03                   ` bug#30680: [racket-users] " Timothy Sample
2018-08-12  2:03                   ` Timothy Sample
2018-08-12  9:32                     ` Gábor Boskovits
2018-08-12  9:32                     ` Gábor Boskovits
2018-08-12 15:31                     ` Christopher Lemmer Webber
     [not found]                     ` <871sb4cpeu.fsf-txiMz1+kQXoAvxtiuMwx3w@public.gmane.org>
2018-08-12 15:31                       ` bug#30680: " Christopher Lemmer Webber
2018-08-12 20:44                         ` bug#30680: [racket-users] " Timothy Sample
2018-08-13  0:21                           ` Christopher Lemmer Webber
2018-08-12 20:44                         ` Timothy Sample
2018-08-11 22:05               ` Nils Gillmann
2018-08-11 21:55           ` Christopher Lemmer Webber
2018-08-11 15:18     ` Christopher Lemmer Webber

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

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

  git send-email \
    --in-reply-to=20180811220538.ca2wyilh6gq62dm3@abyayala \
    --to=ng0@n0.is \
    --cc=30680@debbugs.gnu.org \
    --cc=cwebber@dustycloud.org \
    --cc=help-guix@gnu.org \
    --cc=racket-users@googlegroups.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.