unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 51466@debbugs.gnu.org
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Date: Tue, 01 Feb 2022 23:49:28 -0800	[thread overview]
Message-ID: <87sft13dyv.fsf@gmail.com> (raw)
In-Reply-To: <87h79slysd.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 25 Jan 2022 14:39:46 +0100")

[-- Attachment #1: Type: text/plain, Size: 4504 bytes --]

Hi,

I also observed this bug and reported it as 53355.  I tried to search
for bugs, but I didn't find this bug report until Ludo mentioned it.  I
think it's probably the same bug, so I've merged them.

Ludovic Courtès <ludo@gnu.org> writes:

> It looks like the shell-check machinery is misdiagnosing things, as
> Vagrant reported in <https://issues.guix.gnu.org/51466> (is this on
> Debian too?).

Yes, it's also Debian.  Debian Bullseye.  I've also verified that
similar behavior occurs on Fedora, although the problematic env vars are
different.  I tried fiddling with SHELL like Vagrant did, but I couldn't
make the error go away like he did.  Maybe I did something differently.

> Could you try the debugging tricks I proposed there?

Sure thing!  Thank you for taking the time to make the patch, even
though it was simple.  Here is the result on my Debian Bullseye ppc64el
system:

--8<---------------cut here---------------start------------->8---
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check --pure --development guix
guix shell: checking the environment variables visible from shell '/bin/sh'...

;;; (dropped "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit" #<vlist ()>)

;;; (variable "$ LIBRARY_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib" "$ LIBRARY_PATH")

;;; (variable "C_INCLUDE_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/include" "C_INCLUDE_PATH")

;;; (variable "USER=marusich" "USER")

;;; (variable "GUIX_LOCPATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib/locale" "GUIX_LOCPATH")

;;; (variable "HOME=/home/marusich" "HOME")

;;; (variable "GUILE_LOAD_COMPILED_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib/guile/3.0/site-ccache:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/share/guile/site/3.0" "GUILE_LOAD_COMPILED_PATH")

;;; (variable "CPLUS_INCLUDE_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/include/c++:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/include" "CPLUS_INCLUDE_PATH")

;;; (variable "INFOPATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/share/info" "INFOPATH")

;;; (variable "LOGNAME=marusich" "LOGNAME")

;;; (variable "PKG_CONFIG_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib/pkgconfig" "PKG_CONFIG_PATH")

;;; (variable "TERM=screen.xterm-256color" "TERM")

;;; (variable "ACLOCAL_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/share/aclocal" "ACLOCAL_PATH")

;;; (variable "PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/bin:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/sbin" "PATH")

;;; (variable "GUIX_ENVIRONMENT=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile" "GUIX_ENVIRONMENT")

;;; (variable "GUILE_LOAD_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/share/guile/site/3.0" "GUILE_LOAD_PATH")

;;; (variable "PWD=/home/marusich/guix-master" "PWD")
guix shell: warning: variable 'LIBRARY_PATH' is missing from shell environment
hint: One or more environment variables have a different value in the shell than
the one we set.  This means that you may find yourself running code in an
environment different from the one you asked Guix to prepare.

This usually indicates that your shell startup files are unexpectedly
modifying those environment variables.  For example, if you are using Bash,
make sure that environment variables are set or modified in
`~/.bash_profile' and _not_ in `~/.bashrc'.  For more information on Bash
startup files, run:

     info "(bash) Bash Startup Files"

Alternatively, you can avoid the problem by passing the `--container' or
`-C' option.  That will give you a fully isolated environment running in a
"container", immune to the issue described above.

[1] [env] marusich@suzaku:~/guix-master
$
--8<---------------cut here---------------end--------------->8---

The presence of the "$" in front of LIBRARY_PATH seems suspicious:

  ;;; (variable "$ LIBRARY_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib" "$ LIBRARY_PATH")

I'm not sure why the "$" is being added.  I tried various things to
remove it.  I tried explicitly setting PS1 to an empty string in my
~/.bashrc.  I also tried setting it explicitly to an empty string in
/etc/profile.  Maybe if we can figure out where that "$ " prefix is
coming from, we can resolve this issue?

-- 
Chris

PGP: https://savannah.gnu.org/people/viewgpg.php?user_id=106836

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2022-02-02  7:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19  3:29 bug#53355: guix shell --check: confusing error message Chris Marusich
2022-01-24 14:35 ` Ludovic Courtès
2022-01-25  0:55   ` Chris Marusich
2022-01-25 13:39     ` Ludovic Courtès
2022-02-02  7:49       ` Chris Marusich [this message]
2022-02-08  9:26         ` bug#51466: " Ludovic Courtès
2022-02-13 23:17           ` Chris Marusich
2022-02-14  9:47             ` Ludovic Courtès
2022-03-08 19:07               ` Ludovic Courtès
2022-05-20 21:37                 ` Ludovic Courtès
2022-05-24  4:42               ` Chris Marusich
2022-06-13 10:03                 ` Ludovic Courtès
2022-06-19 20:40                   ` Chris Marusich
2022-06-20  7:34                     ` bug#51466: " Ludovic Courtès
2022-06-20 10:12                     ` bug#53355: " bokr
2022-06-20 17:56                       ` Bengt Richter
2022-06-20 23:27                         ` bug#51466: " Bengt Richter
2022-06-21  4:00                           ` Thiago Jung Bauermann via Bug reports for GNU Guix
2022-06-25  9:07                 ` Chris Marusich
2022-06-25  9:37                   ` bug#53355: bug#51466: " Maxime Devos
2022-06-25 16:52                     ` Chris Marusich
2022-06-25 17:40                       ` Maxime Devos
2022-06-25 20:06                         ` bug#51466: " bokr
2022-06-25 21:04                           ` Maxime Devos
2022-06-26 10:33                         ` Josselin Poiret via Bug reports for GNU Guix
2022-06-26 13:07                           ` Maxime Devos
2022-06-26 19:45                             ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-06-27 10:17                   ` bug#51466: " Ludovic Courtès
2022-06-27 10:34                     ` bug#53355: " Maxime Devos
2022-06-28  7:45                       ` Ludovic Courtès
2022-06-28 10:38                         ` Maxime Devos
2022-06-28 16:57                           ` bug#53355: " paren--- via Bug reports for GNU Guix
2022-06-28 17:31                             ` bug#51466: " Maxime Devos
2022-07-04  8:11                             ` Ludovic Courtès
2022-06-27 11:23                     ` bokr
2022-06-27 14:22                       ` bug#51466: bug#53355: " Bengt Richter

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=87sft13dyv.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=51466@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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).