unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Jesse Gibbons <jgibbons2357@gmail.com>
To: Jan <tona_kosmicznego_smiecia@interia.pl>, 37347@debbugs.gnu.org
Subject: bug#37347: 'guix environment' fails after trying to follow the steps from "Running Guix Before It Is Installed" page
Date: Sun, 08 Sep 2019 19:14:05 -0600	[thread overview]
Message-ID: <a977afd71a8202d4df2a64a94b3543ec748b20f4.camel@gmail.com> (raw)
In-Reply-To: <20190909024917.19b37a23@kompiuter>

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.gnu.org/manual/en/html_node/Running-Guix-Before-It-Is-In
> stalled.html#Running-Guix-Before-It-Is-Installed
> and
> https://guix.gnu.org/blog/2018/a-packaging-tutorial-for-guix/
> 
> The situation started to be interesting, when the tutorial told me to
> run "cd $GUIX_CHECKOUT" and "./pre-inst-env guix package
> --list-available=ruby"
> I was confused, because I couldn't find any "./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 - ./pre-inst-env.in (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:
> 
> ----------------
> user@machine ~/Prog/repo/guix [env]$ sudo -E ./pre-inst-env.in
> guix-daemon --build-users-group=guixbuild
> 
> sudo: /gnu/store/z26h622slm8p61myhk45v3jjg8p7qm8z-profile/bin/sudo
> must
> be owned by uid 0 and have the setuid bit set 
> 
> user@machine ~/Prog/repo/guix [env]$ ./pre-inst-env.in
> bash: ./pre-inst-env.in: No such file or directory 
> user@machine ~/Prog/repo/guix [env]$ cd build-aux/ 
> user@machine ~/Prog/repo/guix/build-aux [env]$ sudo
> -E ./pre-inst-env.in guix-daemon --build-users-group=guixbuild
> sudo: /gnu/store/z26h622slm8p61myhk45v3jjg8p7qm8z-profile/bin/sudo
> must
> be owned by uid 0 and have the setuid bit set 
> user@machine ~/Prog/repo/guix/build-aux [env]$ exit
> ---------------
> 
> And then:
> 
> ------------------
> user@machine ~/Prog/repo/guix/build-aux$ chmod +x ./pre-inst-env.in 
> user@machine ~/Prog/repo/guix/build-aux$ sudo -E ./pre-inst-env.in
> guix-daemon --build-users-group=guixbuild Password: 
> ./pre-inst-env.in: line 33: cd: @abs_top_srcdir@:
> there is no such file or directory 
> ./pre-inst-env.in: line 34: cd:
> @abs_top_builddir@: there is no such file or directory
> --------------------
> 
> And after that I couldn't run "guix
> environment" anymore, it threw an error:
> 
> guix environment: error: failed to connect to
> `/var/guix/daemon-socket/socket': Connection refused
> 
> Restarting the computer helps, but doing the same stuff breaks it
> again, so guess it's reproducible.
> 
> 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:
> 
>   371  git clone --recurse-submodules
>   git://git.savannah.gnu.org/guix.git 
>   372  guix environment guix --pure
>   373  sudo -E
>   374  sudo --help
>   375  guix environment guix --pure
>   376  guix environment guix --pure --ad-hoc sudo 
>   377  ls
>   378  cd guix/
>   379  ls
>   380  cd build-aux/
>   381  ls
>   382  .
>   383  guix environment guix --pure
>   384  chmod +x ./pre-inst-env.in 
>   385  sudo -E ./pre-inst-env.in guix-daemon
>   --build-users-group=guixbuild 
>   386  ls
>   387  cd ..
>   388  ./configure 
>   389  guix environment guix --pure
>   390  history
> 
> As stupid and complicated as it is, something is definitely broken
> here.
> 
> Sincerely,
> Jan Wielkiewicz
> 
> 
> 

pre-inst-env.in is for generating the pre-inst-env script. Have you
tried:
./bootstrap
./configure

This should generate pre-inst-env for you.

Also, make sure the guix daemon is running after you restart.

  reply	other threads:[~2019-09-09  1:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  0:49 bug#37347: 'guix environment' fails after trying to follow the steps from "Running Guix Before It Is Installed" page Jan
2019-09-09  1:14 ` Jesse Gibbons [this message]
2019-09-09  6:23   ` Julien Lepiller
2019-09-11 20:53     ` Jan
2019-09-16 16:01       ` Ludovic Courtès
2019-09-16 17:40         ` Jan
2019-10-03 16:39         ` Jan Wielkiewicz
2019-10-03 19:57         ` Bengt Richter
2019-10-04  3:06           ` Bengt Richter
2019-10-04  7:15             ` Jelle Licht
2019-10-04 22:27               ` Bengt Richter
2019-10-05 12:58                 ` Marius Bakke
2019-10-06 19:00         ` Jan Wielkiewicz
2019-10-24 20:16 ` Gábor Boskovits

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=a977afd71a8202d4df2a64a94b3543ec748b20f4.camel@gmail.com \
    --to=jgibbons2357@gmail.com \
    --cc=37347@debbugs.gnu.org \
    --cc=tona_kosmicznego_smiecia@interia.pl \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).