From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nils Gillmann Subject: bug#30680: [racket-users] Using Racket's raco on on Guix(SD) Date: Sat, 11 Aug 2018 22:05:38 +0000 Message-ID: <20180811220538.ca2wyilh6gq62dm3__11935.5600131259$1534024990$gmane$org@abyayala> References: <87d0xn24d9.fsf@dustycloud.org> <0990d521-934b-069b-3f29-faf8a22a5bd0@fastmail.net> <87wosxexu7.fsf@dustycloud.org> <87h8k0d54i.fsf@ngyro.com> <87va8gfu0c.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foc0Q-0003Hm-Qi for bug-guix@gnu.org; Sat, 11 Aug 2018 18:05:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foc0M-0005q5-3T for bug-guix@gnu.org; Sat, 11 Aug 2018 18:05:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foc0L-0005pz-W8 for bug-guix@gnu.org; Sat, 11 Aug 2018 18:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1foc0L-0003JM-Oc for bug-guix@gnu.org; Sat, 11 Aug 2018 18:05:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87va8gfu0c.fsf@dustycloud.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Christopher Lemmer Webber Cc: 30680@debbugs.gnu.org, help-guix , racket-users@googlegroups.com Christopher Lemmer Webber transcribed 3.3K bytes: > Timothy Sample writes: >=20 > > Christopher Lemmer Webber 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=E2=80=99m 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=3Ddebug raco setup openssl > > > > Which says a lot of things, but most interestingly it says: > > > > -------------------------------- > > ... > > compiler/cm: checking: /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-rack= et-6.12/share/racket/collects/openssl/libcrypto.rkt > > compiler/cm: different src hash... (5d9ca57f3e267d956c7b5e62578467beb8c= cc1d2 4d21ac412723fbf33f97669c2f73f0e9367f4510) > > compiler/cm: maybe-compile-zo starting /gnu/store/jx0bkmaafb8fq0mqs5ywg= nxq8rbpn8j1-racket-6.12/share/racket/collects/openssl/libcrypto.rkt > > compiler/cm: start-compile: /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8= j1-racket-6.12/share/racket/collects/openssl/libcrypto.rkt > > compiler/cm: compiling /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-ra= cket-6.12/share/racket/collects/openssl/libcrypto.rkt > > open-output-file: cannot open output file > > path: /gnu/store/jx0bkmaafb8fq0mqs5ywgnxq8rbpn8j1-racket-6.12/share/r= acket/collects/openssl/compiled/tmp15340167971534016797570 > > system error: Read-only file system; errno=3D30 > > 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 =E2=80=9C.dep=E2=80=9D file. When the o= utput 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. >=20 > 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...) >=20 > > 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.) >=20 > Cool! >=20 > > 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 >=20 > BTW, some examples of packages where I've had trouble, in case it helps > with testing: >=20 > - Raart > - Gregor > - crypto (seemed to work last time, not sure why it wasn't working befor= e) >=20 > 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. >=20 =46rom 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 installat= ion.