help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I easily install GNU Emacs 27.1.50 via Guix?


From: Carlo Zancanaro
Subject: Re: Can I easily install GNU Emacs 27.1.50 via Guix?
Date: Fri, 18 Dec 2020 22:37:49 +1100
User-agent: mu4e 1.4.13; emacs 27.1

Hi Simon,

On Fri, Dec 18 2020, zimoun wrote:
Is your point that:

...

My point is: Guix manipulates environment variables in a way that can, and does, break "foreign" programs when Guix's programs launch "foreign" programs. We should consider this a bug. This bug might be hard, or even impossible, to resolve but we should consider it a bug nonetheless.

Lots of variables are safe to manipulate, like COLUMNS, or TERM, but some are dangerous, like GTK_PATH, XDG_DATA_DIRS, and LD_LIBRARY_PATH (among others). This isn't always a problem, but sometimes it is.

However, on my machine running Guix on the top of Debian, I get:

--8<---------------cut here---------------start------------->8---
guix environment --ad-hoc emacs grep coreutils --pure
env | grep GTK_PATH
/usr/bin/evince # Works!

emacs -q -f shell
sh-5.0$ env | grep GTK_PATH
GTK_PATH=/gnu/store/v3rqcgz6chnmv2sg7lgf4s9kv2xyb5rl-gtk+-3.24.23/lib/gtk-3.0
sh-5.0$ /usr/bin/evince

(evince:21780): GLib-GIO-ERROR **: 11:24:25.706: No GSettings schemas are installed on the system
Trace/breakpoint trap
sh-5.0$ unset GTK_PATH
sh-5.0$ env | grep GTK_PATH
sh-5.0$ /usr/bin/evince

(evince:25064): GLib-GIO-ERROR **: 11:32:22.826: No GSettings schemas are installed on the system
Trace/breakpoint trap
--8<---------------cut here---------------end--------------->8---

So the story seems more complicated than GTK_PATH. :-)

Did you try opening the print dialog in evince? If you did, then you should have seen different behaviour when GTK_PATH was set compared to when it wasn't. Namely, when GTK_PATH was set you should have seen some messages like this in your shell:

(evince:31345): Gtk-WARNING **: 22:26:55.204: /gnu/store/0vi459fa3b36b5xw8gkxmvfpqz48cyqr-gtk+-3.24.23/lib/gtk-3.0/3.0.0/printbackends/libprintbackend-cups.so: cannot open shared object file: Permission denied

The problem is that GTK_PATH is checked for libraries first, where it finds the above library and tries and fails to load it. It does not fall back to the default paths, but rather treats loading that library as having failed, and thus evince cannot print. When GTK_PATH is unset it checks the default locations, and successfully finds and loads the library, and thus evince can print.

Carlo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]