From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SP5VIqaU3F+NcwAA0tVLHw (envelope-from ) for ; Fri, 18 Dec 2020 11:38:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MF8gHqaU3F9jKAAAbx9fmQ (envelope-from ) for ; Fri, 18 Dec 2020 11:38:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1625D94043B for ; Fri, 18 Dec 2020 11:38:12 +0000 (UTC) Received: from localhost ([::1]:35290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqE5K-000298-TB for larch@yhetil.org; Fri, 18 Dec 2020 06:38:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqE56-00027c-02 for help-guix@gnu.org; Fri, 18 Dec 2020 06:37:56 -0500 Received: from zancanaro.com.au ([45.76.117.151]:50304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqE54-0006dP-5S for help-guix@gnu.org; Fri, 18 Dec 2020 06:37:55 -0500 Received: by zancanaro.com.au (Postfix, from userid 116) id A02A432F59; Fri, 18 Dec 2020 11:37:50 +0000 (UTC) Received: from jolteon (unknown [27.96.215.68]) by zancanaro.com.au (Postfix) with ESMTPSA id E3C2632F56; Fri, 18 Dec 2020 11:37:49 +0000 (UTC) References: <87h7ov0vxl.fsf@disroot.org> <87h7ou1yxf.fsf@ambrevar.xyz> <861rfxj0lx.fsf@gmail.com> <87wnxgf3hh.fsf@disroot.org> <867dpfools.fsf@gmail.com> <875z4z4v6s.fsf@zancanaro.id.au> <86h7ojmqtq.fsf@gmail.com> <8736034fsk.fsf@zancanaro.id.au> <86eejnmmao.fsf@gmail.com> User-agent: mu4e 1.4.13; emacs 27.1 From: Carlo Zancanaro To: zimoun Subject: Re: Can I easily install GNU Emacs 27.1.50 via Guix? In-reply-to: <86eejnmmao.fsf@gmail.com> Date: Fri, 18 Dec 2020 22:37:49 +1100 Message-ID: <87wnxf2vle.fsf@zancanaro.id.au> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=45.76.117.151; envelope-from=carlo@zancanaro.id.au; helo=zancanaro.com.au X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 1625D94043B X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: ECMTch+DwWzJ 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