From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#30395: =?UTF-8?Q?=E2=80=98gcc=E2=80=99?= doesn't compile with LD_LIBRARY_PATH="$HOME/.guix-profile/lib" Date: Sat, 17 Feb 2018 22:16:02 +0100 Message-ID: <87606vjp0t.fsf@gnu.org> References: <87vaf72y9w.fsf@gnu.org> <87k1vdqm09.fsf@gnu.org> <87mv09gn3i.fsf@gnu.org> <874lmhozml.fsf@gnu.org> <871shlkmp6.fsf@gnu.org> <87h8qgnavo.fsf@gnu.org> <87a7w7a18h.fsf@gnu.org> 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]:49009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en9r0-0003IP-4a for bug-guix@gnu.org; Sat, 17 Feb 2018 16:17:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en9qw-00063Q-OP for bug-guix@gnu.org; Sat, 17 Feb 2018 16:17:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:40789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1en9qw-00063G-KX for bug-guix@gnu.org; Sat, 17 Feb 2018 16:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1en9qw-0007Ou-Bh for bug-guix@gnu.org; Sat, 17 Feb 2018 16:17:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87a7w7a18h.fsf@gnu.org> (Mathieu Lirzin's message of "Sat, 17 Feb 2018 20:02:22 +0100") 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: Mathieu Lirzin Cc: 30395@debbugs.gnu.org Hi, This is getting interesting. :-) Mathieu Lirzin skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: [...] >> I don=E2=80=99t get it yet. The log shows this: >> >> 9543 execve("/gnu/store/x7i79rihhdjkps5fx0f9p2q0svh5a88n-guile-2.2.2/bi= n/guile", ["/gnu/store/x7i79rihhdjkps5fx0f9p"..., "-c", "(load-compiled \"/= gnu/store/w27in"..., "-plugin", "/gnu/store/xjpchnxm9fgg05fqm9apy"..., "-pl= ugin-opt=3D/gnu/store/xjpchnxm9"..., "-plugin-opt=3D-fresolution=3D/tmp/cc"= ..., "-plugin-opt=3D-pass-through=3D-lgcc", "-plugin-opt=3D-pass-through=3D= -lgcc_"..., "-plugin-opt=3D-pass-through=3D-lgcc_"..., "-plugin-opt=3D-pass= -through=3D-lc", "-plugin-opt=3D-pass-through=3D-lgcc", "-plugin-opt=3D-pas= s-through=3D-lgcc_"..., "--eh-frame-hdr", "-m", "elf_x86_64", "-dynamic-lin= ker", "/gnu/store/3h31zsqxjjg52da5gp3qm"..., "/gnu/store/0qg64bwn2z3g91b5iw= 16i"..., "/gnu/store/0qg64bwn2z3g91b5iw16i"..., "/gnu/store/45rhjm5ryms10fr= cyrzcd"..., "-L/gnu/store/0qg64bwn2z3g91b5iw1"..., "-L/gnu/store/45rhjm5rym= s10frcyrz"..., "-L/gnu/store/45rhjm5ryms10frcyrz"..., "-L/gnu/store/3h31zsq= xjjg52da5gp3"..., "/tmp/cc9aj9M2.o", "-lgcc", "--as-needed", "-lgcc_s", "--= no-as-needed", "-L/gnu/store/3h31zsqxjjg52da5gp3"..., "-rpath=3D/gnu/store/= 3h31zsqxjjg52d"..., ...], 0x113a520 /* 31 vars */) =3D 0 >> >> 9543 open("/home/mthl/.guix-profile/lib/libc.so.6", O_RDONLY|O_CLOEXEC)= =3D 3 >> >> 9543 write(2, "Uncaught exception:\n", 20) =3D 20 >> 9543 futex(0x7f5d453c6930, FUTEX_WAKE_PRIVATE, 2147483647) =3D 0 >> 9543 futex(0x7f5d43ab0190, FUTEX_WAKE_PRIVATE, 2147483647) =3D 0 >> 9543 close(3) =3D 0 >> 9543 close(4) =3D 0 >> 9543 munmap(0x7f5d455e8000, 4096) =3D 0 >> 9543 exit(0) =3D ? >> 9539 <... wait4 resumed> 0xcddb20, 0, NULL) =3D ? ERESTARTSYS (To be re= started if SA_RESTART is set) >> 9539 --- SIGINT {si_signo=3DSIGINT, si_code=3DSI_KERNEL} --- >> >> This is the execution of ld-wrapper and it terminates with =E2=80=9CUnca= ught >> exception=E2=80=9D, which isn=E2=80=99t really helpful. Apparently this= happens before >> =E2=80=98boot-9.scm=E2=80=99 was even search for. >> >> Can you reproduce it by running =E2=80=98ld=E2=80=99 directly in that en= vironment? Or >> better yet, by running =E2=80=98guile=E2=80=99? The next thing is to tr= y and do that >> in gdb=E2=80=A6 > > Yes I can reproduce simply by running =E2=80=98guile=E2=80=99 (v2.2.2 and= v2.2.3). :-) > > LD_LIBRARY_PATH=3D"$HOME/.guix-profile/lib" guile > Uncaught exception: > Throw to key encoding-error with args ("scm_to_stringn" "cannot convert > narrow string to output locale" 22 #f #f) Awesome. :-) > I have tried to set LC_ALL=3DC, but this doesn't have any impact. Here > are the outputs of =E2=80=98LD_LIBRARY_PATH=3D"$HOME/.guix-profile/lib" s= trace -f > -s 1000 -o OUTPUT guile=E2=80=99 for the failing environment with glibc@2= .25 in > the profile: [...] > 13061 open("/gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/share/= locale/locale.alias", O_RDONLY|O_CLOEXEC) =3D 3 > 13061 fstat(3, {st_mode=3DS_IFREG|0444, st_size=3D2997, ...}) =3D 0 > 13061 read(3, "# Locale name alias data base.\n# Copyright (C) 1996-2017 = Free Software Foundation, Inc.\n#\n# This program is free software; you can= redistribute it and/or modify\n# it under the terms of the GNU General Pub= lic License as published by\n# the Free Software Foundation; either version= 2, or (at your option)\n# any later version.\n#\n# This program is distrib= uted in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; witho= ut even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICU= LAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n#= You should have received a copy of the GNU General Public License\n# along= with this program; if not, see .\n\n# The fo= rmat of this file is the same as for the corresponding file of\n# the X Win= dow System, which normally can be found in\n#\t/usr/lib/X11/locale/locale.a= lias\n# A single line contains two fields: an alias and a substitution valu= e.\n# All entries are case independent.\n\n# Note: This file is o"..., 4096= ) =3D 2997 > 13061 read(3, "", 4096) =3D 0 > 13061 close(3) =3D 0 > 13061 open("/run/current-system/locale/2.25/fr_FR.utf8/LC_IDENTIFICATION"= , O_RDONLY|O_CLOEXEC) =3D 3 > 13061 fstat(3, {st_mode=3DS_IFREG|0444, st_size=3D299, ...}) =3D 0 > 13061 mmap(NULL, 299, PROT_READ, MAP_PRIVATE, 3, 0) =3D 0x7f726d164000 > 13061 close(3) =3D 0 > 13061 open("/gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/lib/gc= onv/gconv-modules.cache", O_RDONLY) =3D -1 ENOENT (No such file or director= y) > 13061 open("/gnu/store/5x9zxdmxphmprlchfl3a2y8w5ykcwkjc-glibc-2.25/lib/gc= onv/gconv-modules", O_RDONLY|O_CLOEXEC) =3D -1 ENOENT (No such file or dire= ctory) How come this =E2=80=98gconv-modules=E2=80=99 file doesn=E2=80=99t exist? = I have it here. I have: --8<---------------cut here---------------start------------->8--- $ guix hash -r /gnu/store/5x9zxdmxphmprlchfl3a2y8w5ykcwkjc-glibc-2.25 03la0p9pigf6r33px5nckky9fxvrynvw1fgn9v2l04zlys7k3k2y $ wget -q -O - https://berlin.guixsd.org/5x9zxdmxphmprlchfl3a2y8w5ykcwkjc.n= arinfo | grep NarHash NarHash: sha256:03la0p9pigf6r33px5nckky9fxvrynvw1fgn9v2l04zlys7k3k2y --8<---------------cut here---------------end--------------->8--- What about you? Can you try =E2=80=98guix gc --verify=E2=80=99? FTR these two libcs come from here (on x86_64 with current master): --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -e '((@ (guix packages) package-replacement) (@= @ (gnu packages base) glibc))' --no-grafts /gnu/store/bwbh5zfg06lxla7db6zslmkpc4jjq663-glibc-2.25-debug /gnu/store/5x9zxdmxphmprlchfl3a2y8w5ykcwkjc-glibc-2.25 $ ./pre-inst-env guix build -e '(@@ (gnu packages commencement) glibc-final= )' /gnu/store/w295br3vqqdvmd7hb2ga8h8hk3sd9iiv-glibc-2.25-debug /gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25 --8<---------------cut here---------------end--------------->8--- > When looking at =E2=80=98scm_to_stringn=E2=80=99 code and crossing with t= he actual error > message it looks like the failing instruction is the following: > > ret =3D mem_iconveh (scm_i_string_chars (str), ilen, > "ISO-8859-1", enc, > (enum iconv_ilseq_handler) handler, NULL, > &buf, &len); Yes, without =E2=80=98gconv-modules=E2=80=99, libc cannot determine how to = convert from ISO-8859-1. Thanks for investigating! Ludo=E2=80=99.