From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#32456: Guile failed to call package-derivation without pre-inst-env Date: Tue, 21 Aug 2018 12:05:38 +0200 Message-ID: <876004qbkd.fsf@gnu.org> References: <87lg96qoo0.fsf@gmail.com> <877eklgy5r.fsf@gnu.org> <876004vkg6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs3Y8-00011i-DD for bug-guix@gnu.org; Tue, 21 Aug 2018 06:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fs3Y2-0003AE-Lf for bug-guix@gnu.org; Tue, 21 Aug 2018 06:06:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51146) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fs3Y2-0003A6-Ha for bug-guix@gnu.org; Tue, 21 Aug 2018 06:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fs3Y2-0008UV-6z for bug-guix@gnu.org; Tue, 21 Aug 2018 06:06:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <876004vkg6.fsf@gmail.com> (Oleg Pykhalov's message of "Mon, 20 Aug 2018 23:42:33 +0300") 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: Oleg Pykhalov Cc: 32456@debbugs.gnu.org Hi, Oleg Pykhalov skribis: > natsu@magnolia ~/src/guix$ for path in $(printenv GUILE_LOAD_PATH | tr ':= ' '\n'); do echo -e "\n"; env GUILE_LOAD_PATH=3D$path pr > intenv GUILE_LOAD_PATH; env GUILE_LOAD_PATH=3D$path guile -c '(use-module= s (guix) (guix ui) (guix store)) (format #t "~s~%" (pack > age-derivation (open-connection) (@@ (gnu packages base) hello)))'; done > > > /home/natsu/.guix-profile/share/guile/site/2.2 > Backtrace: > In guix/packages.scm: > 923:16 19 (expand-input # # =E2=80=A6) > 878:14 18 (cache! # # =E2=80=A6) > In unknown file: > 17 (_ # # #) > In guix/packages.scm: > 1202:22 16 (thunk) > 1135:25 15 (bag->derivation # #< =E2=80=A6) > In srfi/srfi-1.scm: > 592:29 14 (map1 (("source" #= ) =E2=80=A6)) > 592:17 13 (map1 (("make" #= ) =E2=80=A6)) > In guix/packages.scm: > 923:16 12 (expand-input # # =E2=80=A6) > 878:14 11 (cache! # # =E2=80=A6) > In unknown file: > 10 (_ # # #) > In guix/packages.scm: > 1202:22 9 (thunk) > In guix/derivations.scm: > 1242:24 8 (build-expression->derivation # =E2=80=A6) > 1004:18 7 (imported-files # ((. #) =E2=80= =A6) =E2=80=A6) > In srfi/srfi-1.scm: > 592:29 6 (map1 (("guix/build/gnu-build-system.scm" . "/home/=E2=80=A6= ") =E2=80=A6)) > 592:29 5 (map1 (("guix/build/utils.scm" . "/home/natsu/.guix=E2=80=A6= ") =E2=80=A6)) > 592:29 4 (map1 (("guix/build/gremlin.scm" . "/home/natsu/.gu=E2=80=A6= ") =E2=80=A6)) > 592:17 3 (map1 (("guix/elf.scm" . "/home/natsu/.guix-profile/s=E2=80= =A6"))) > In guix/derivations.scm: > 1007:31 2 (_ _) > In guix/store.scm: > 948:24 1 (_ # "elf.scm" #f "sha256" =E2= =80=A6) > 928:31 0 (add-to-store # _ #f "sha=E2=80= =A6" =E2=80=A6) > > guix/store.scm:928:31: In procedure add-to-store: > Throw to key `srfi-34' with args `(#)'. The problem here is that ~/.guix-profile/share/guile/site/2.2/guix/elf.scm is a symlink. When doing an =E2=80=98add-to-store=E2=80=99 RPC with #:recursive? #f, we pass t= hat file name, but the daemon rejects it because it=E2=80=99s not a regular file (it= =E2=80=99s a symlink; see nix-daemon.cc:416.) I don=E2=80=99t understand the purpose of this check in nix-daemon.cc; I th= ink it=E2=80=99s useless. However, removing it alone doesn=E2=80=99t solve the= problem for clients talking to old daemons. So we=E2=80=99d need =E2=80=98add-to-store= =E2=80=99 to resolve symlinks when it=E2=80=99s talking to an old daemon. However, I don=E2=80=99t understand why guix/elf.scm is a symlink in your profile. First that means you installed the =E2=80=98guix=E2=80=99 package= in your profile, which is not recommended (better have it in the =E2=80=98guix pull=E2=80=99-managed profile.) Second, that also means that two guix/ subdirectories were merged into one by =E2=80=98union-build=E2=80=99, which= is surprising: presumably only =E2=80=98guix=E2=80=99 provides such a subdirec= tory. What do these commands report: ls -l ~/.guix-profile/share/guile/site/2.2/guix ls -l $(readlink ~/.guix-profile/share/guile/site/2.2/guix) ? Thanks, Ludo=E2=80=99.