From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: Re: NPM breakthrough with test packages and weird error Date: Sat, 12 Jan 2019 23:26:10 +0100 Message-ID: <20190112232610.54031b45@lepiller.eu> References: <89736bcaeddb7721bc9b5d4920f9bd4b@riseup.net> <229083517c65c576652c6b17a6fd128f@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:41205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1giRqa-0005SI-7R for guix-devel@gnu.org; Sat, 12 Jan 2019 17:33:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1giRjf-0002BT-Vo for guix-devel@gnu.org; Sat, 12 Jan 2019 17:26:37 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:40072) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1giRjf-000213-M4 for guix-devel@gnu.org; Sat, 12 Jan 2019 17:26:35 -0500 Received: from localhost (static-176-182-42-79.ncc.abo.bbox.fr [176.182.42.79]) by lepiller.eu (OpenSMTPD) with ESMTPSA id b0372082 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sat, 12 Jan 2019 22:22:22 +0000 (UTC) In-Reply-To: <229083517c65c576652c6b17a6fd128f@riseup.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Le Sat, 12 Jan 2019 11:08:03 -0800, swedebugia@riseup.net a =C3=A9crit : > On 2019-01-12 18:57, swedebugia@riseup.net wrote: > > Hi > >=20 > > I have good (and bad) news! > >=20 > > Today I worked intensely on the node-build-system, importer and made > > some improvements as I ran into multiple errors using the importer > > and building the packages. > >=20 > > I tried first importing tape (test package, quite popular) and > > succeded with a few adjustments. > >=20 > > Then I tried tap, its a hairy mess unfortunately and pulls in del, > > typescript, grunt, nyc, and others > >=20 > > I write this message mostly because I now receive a really weird > > error from guix. > >=20 > > sdb@antelope ~/src/guix$ ./pre-inst-env guix build -K node-grunt > > guix build: error: build failed: invalid hash > > `72bd690b3fbd3be123e66c0c1932d856b294931d134cd07d4d4cd6aa1e07' > > sdb@antelope ~/src/guix$ ./pre-inst-env guix build -K > > node-tap-mocha-reporter > > guix build: error: build failed: invalid hash > > `72bd690b3fbd3be123e66c0c1932d856b294931d134cd07d4d4cd6aa1e07' > >=20 > > The error is the same across multiple packages. Builds "succeede" as > > usual if they are already in the store or unrelated to grunt and > > nyc. > >=20 > > After investigating with strace I found this in the end: > >=20 > > [pid 8371] read(13, "download", 8) =3D 8 > > [pid 8371] write(13, > > "\10\0\0\0\0\0\0\0\27\0\0\0\0\0\0\0minimatch-3.0.4."..., 944) =3D 944 > > [pid 8371] read(13, "ptxc\0\0\0\0", 8) =3D 8 > > [pid 8371] read(13, "K\0\0\0\0\0\0\0", 8) =3D 8 > > [pid 8371] read(13, "invalid hash `72bd690b3fbd3be123"..., 75) =3D 75 > > [pid 8371] read(13, "\0\0\0\0\0", 5) =3D 5 > > [pid 8371] read(13, "\1", 1) =3D 1 > > [pid 8371] read(13, "\0\0\0\0\0\0\0", 7) =3D 7 > > [pid 8371] close(13) =3D 0 > > [pid 8371] write(2, "guix build: error: build failed:"..., 109guix > > build: error: build failed: invalid hash > > `72bd690b3fbd3be123e66c0c1932d856b294931d134cd07d4d4cd6aa1e07' > > ) =3D 109 > > [pid 8371] exit_group(1) =3D ? > > [pid 8376] <... read resumed> ) =3D ? > > [pid 8375] <... read resumed> ) =3D ? > > [pid 8376] +++ exited with 1 +++ > > [pid 8375] +++ exited with 1 +++ > > [pid 8374] <... futex resumed>) =3D ? > > [pid 8374] +++ exited with 1 +++ > > +++ exited with 1 +++ > >=20 > > How did I get a corrupted store? No idea. How to delete single > > items?=20 > >=20 > > I found this email from =E5=AE=8B=E6=96=87=E6=AD=A6 from 2016 > > =20 > > "> How do I get rid of these ca. 30 outdated store items? =20 > > I think call gc for each one will work, eg: > >=20 > > for i in /gnu/store/*teensy*; do guix gc -d $i; done" > >=20 > > I adapted it to *minimatch* and deleted them all and checked the > > store manually for any minimatch left and... it still did not work. > >=20 > > Hm. > >=20 > > Removed the hash for minimatch from the node.scm. Tried again. No > > luck. > >=20 > > Time to repair the store? Update the daemon via reconfigure? > >=20 > > I run vanilla 0.16. =20 >=20 > Pushed my changes here for anybody interested in taking a look > https://gitlab.com/swedebugia/guix/commits/npm2 >=20 > (All my work build on the previous work of Jelle and Julien. Big > thanks to you!) >=20 > Resume of its status:=20 > * recursive import works now. > * cyclic dependencies are not detected by the importer > * you have to import an earlier version by hand if a cycle is > encountered. >=20 > I imported 400+ packages in one day and most of them work out of the > box :) >=20 Nice! For the hash issue, I just had a similar one because I somehow removed the hash in an origin record like so: (sha256 (base32 "")) The error is weird, but maybe the importer did something wrong?