From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: bug#37347: 'guix environment' fails after trying to follow the steps from "Running Guix Before It Is Installed" page Date: Mon, 09 Sep 2019 08:23:50 +0200 Message-ID: References: <20190909024917.19b37a23@kompiuter> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56262) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7D9g-000883-1Q for bug-guix@gnu.org; Mon, 09 Sep 2019 02:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7D9e-0005lN-GD for bug-guix@gnu.org; Mon, 09 Sep 2019 02:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58887) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7D9e-0005lE-2y for bug-guix@gnu.org; Mon, 09 Sep 2019 02:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i7D9d-00013a-UO for bug-guix@gnu.org; Mon, 09 Sep 2019 02:28:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: 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: Jesse Gibbons , Jan , 37347@debbugs.gnu.org Le 9 septembre 2019 03:14:05 GMT+02:00, Jesse Gibbons a =C3=A9crit : >On Mon, 2019-09-09 at 02:49 +0200, Jan wrote: >> Hi, I'm a new Guix user and I wanted to hack on Guix and update a >> package, I hadn't known exactly how to do this, so I started >> following >> instructions from >> https://guix=2Egnu=2Eorg/manual/en/html_node/Running-Guix-Before-It-Is-= In >> stalled=2Ehtml#Running-Guix-Before-It-Is-Installed >> and >> https://guix=2Egnu=2Eorg/blog/2018/a-packaging-tutorial-for-guix/ >>=20 >> The situation started to be interesting, when the tutorial told me to >> run "cd $GUIX_CHECKOUT" and "=2E/pre-inst-env guix package >> --list-available=3Druby" >> I was confused, because I couldn't find any "=2E/pre-inst-env" file, so >> I >> used 'find' to search for it and there were one file with a similar >> name >> in $GUIX_CHECKOUT/build-aux - =2E/pre-inst-env=2Ein (as I'm composing >> this >> email now I see that's stupid, but I tried using this file, as I >> don't >> know what I was doing (still don't know)) >> So I started running the following stupid commands: >>=20 >> ---------------- >> user@machine ~/Prog/repo/guix [env]$ sudo -E =2E/pre-inst-env=2Ein >> guix-daemon --build-users-group=3Dguixbuild >>=20 >> sudo: /gnu/store/z26h622slm8p61myhk45v3jjg8p7qm8z-profile/bin/sudo >> must >> be owned by uid 0 and have the setuid bit set=20 >>=20 >> user@machine ~/Prog/repo/guix [env]$ =2E/pre-inst-env=2Ein >> bash: =2E/pre-inst-env=2Ein: No such file or directory=20 >> user@machine ~/Prog/repo/guix [env]$ cd build-aux/=20 >> user@machine ~/Prog/repo/guix/build-aux [env]$ sudo >> -E =2E/pre-inst-env=2Ein guix-daemon --build-users-group=3Dguixbuild >> sudo: /gnu/store/z26h622slm8p61myhk45v3jjg8p7qm8z-profile/bin/sudo >> must >> be owned by uid 0 and have the setuid bit set=20 >> user@machine ~/Prog/repo/guix/build-aux [env]$ exit >> --------------- >>=20 >> And then: >>=20 >> ------------------ >> user@machine ~/Prog/repo/guix/build-aux$ chmod +x =2E/pre-inst-env=2Ein= =20 >> user@machine ~/Prog/repo/guix/build-aux$ sudo -E =2E/pre-inst-env=2Ein >> guix-daemon --build-users-group=3Dguixbuild Password:=20 >> =2E/pre-inst-env=2Ein: line 33: cd: @abs_top_srcdir@: >> there is no such file or directory=20 >> =2E/pre-inst-env=2Ein: line 34: cd: >> @abs_top_builddir@: there is no such file or directory >> -------------------- >>=20 >> And after that I couldn't run "guix >> environment" anymore, it threw an error: >>=20 >> guix environment: error: failed to connect to >> `/var/guix/daemon-socket/socket': Connection refused >>=20 >> Restarting the computer helps, but doing the same stuff breaks it >> again, so guess it's reproducible=2E >>=20 >> After doing it I ran the "history" command so you can know what I did >> exactly (some commands were unfortunately run in an environment and I >> can't provide them), here it is: >>=20 >> 371 git clone --recurse-submodules >> git://git=2Esavannah=2Egnu=2Eorg/guix=2Egit=20 >> 372 guix environment guix --pure >> 373 sudo -E >> 374 sudo --help >> 375 guix environment guix --pure >> 376 guix environment guix --pure --ad-hoc sudo=20 >> 377 ls >> 378 cd guix/ >> 379 ls >> 380 cd build-aux/ >> 381 ls >> 382 =2E >> 383 guix environment guix --pure >> 384 chmod +x =2E/pre-inst-env=2Ein=20 >> 385 sudo -E =2E/pre-inst-env=2Ein guix-daemon >> --build-users-group=3Dguixbuild=20 >> 386 ls >> 387 cd =2E=2E >> 388 =2E/configure=20 >> 389 guix environment guix --pure >> 390 history >>=20 >> As stupid and complicated as it is, something is definitely broken >> here=2E >>=20 >> Sincerely, >> Jan Wielkiewicz >>=20 >>=20 >>=20 > >pre-inst-env=2Ein is for generating the pre-inst-env script=2E Have you >tried: >=2E/bootstrap >=2E/configure > >This should generate pre-inst-env for you=2E > >Also, make sure the guix daemon is running after you restart=2E Do not run =2E/configure alone, always specify --localstatedir=3D/var unle= ss you plan to run the daemon from the repo too (then it's fine without the= option, but you won't be able to pull or you'll get into trouble iiuc)=2E