Hello, ludo@gnu.org (Ludovic Courtès) writes: > Mathieu Lirzin skribis: > >> After looking at the attached ‘strace’ log, as you initially guessed >> this issue is that multiple GCC are loaded. My ‘gcc-toolchain’ is using >> GCC 7.3 and ‘glibc’ is referring to GCC 5.4. > > Normally ‘glibc’ does not contain references to ‘gcc’: > > $ guix size /gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25 > store item total self > /gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25 38.5 37.1 96.3% > /gnu/store/zhrajv6qf2hzn9c3g2bb07559hyrz5xp-bash-static-4.4.12 1.4 1.4 3.7% > total: 38.5 MiB OK, My guess regarding the link between glibc@2.25 and gcc@5.4 was solely based on the proximity in the order of ‘.so’ files opening. --8<---------------cut here---------------start------------->8--- 1382 open("/home/mthl/.guix-profile/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1382 open("/gnu/store/3v8z40rdvpbdpaccfqgvxkw1dnipc321-gmp-6.1.2/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1382 open("/gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1382 open("/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib/lib/tls/x86_64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1382 stat("/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib/lib/tls/x86_64", 0x7ffec8dd5730) = -1 ENOENT (No such file or directory) 1382 open("/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib/lib/tls/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1382 stat("/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib/lib/tls", 0x7ffec8dd5730) = -1 ENOENT (No such file or directory) 1382 open("/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib/lib/x86_64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) 1382 stat("/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib/lib/x86_64", 0x7ffec8dd5730) = -1 ENOENT (No such file or directory) 1382 open("/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib/lib/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3 --8<---------------cut here---------------end--------------->8--- Even if it was effective in term of solving my specific issue, it was really not a rigorous analysis. >> After removing ‘glibc’ and from my profile calling ‘gcc’ completes, so I >> don't need to install ‘binutils’ in my profile anymore. > > I don’t get it yet. The log shows this: > > 9543 execve("/gnu/store/x7i79rihhdjkps5fx0f9p2q0svh5a88n-guile-2.2.2/bin/guile", ["/gnu/store/x7i79rihhdjkps5fx0f9p"..., "-c", "(load-compiled \"/gnu/store/w27in"..., "-plugin", "/gnu/store/xjpchnxm9fgg05fqm9apy"..., "-plugin-opt=/gnu/store/xjpchnxm9"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "--eh-frame-hdr", "-m", "elf_x86_64", "-dynamic-linker", "/gnu/store/3h31zsqxjjg52da5gp3qm"..., "/gnu/store/0qg64bwn2z3g91b5iw16i"..., "/gnu/store/0qg64bwn2z3g91b5iw16i"..., "/gnu/store/45rhjm5ryms10frcyrzcd"..., "-L/gnu/store/0qg64bwn2z3g91b5iw1"..., "-L/gnu/store/45rhjm5ryms10frcyrz"..., "-L/gnu/store/45rhjm5ryms10frcyrz"..., "-L/gnu/store/3h31zsqxjjg52da5gp3"..., "/tmp/cc9aj9M2.o", "-lgcc", "--as-needed", "-lgcc_s", "--no-as-needed", "-L/gnu/store/3h31zsqxjjg52da5gp3"..., "-rpath=/gnu/store/3h31zsqxjjg52d"..., ...], 0x113a520 /* 31 vars */) = 0 > > 9543 open("/home/mthl/.guix-profile/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 > > 9543 write(2, "Uncaught exception:\n", 20) = 20 > 9543 futex(0x7f5d453c6930, FUTEX_WAKE_PRIVATE, 2147483647) = 0 > 9543 futex(0x7f5d43ab0190, FUTEX_WAKE_PRIVATE, 2147483647) = 0 > 9543 close(3) = 0 > 9543 close(4) = 0 > 9543 munmap(0x7f5d455e8000, 4096) = 0 > 9543 exit(0) = ? > 9539 <... wait4 resumed> 0xcddb20, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set) > 9539 --- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} --- > > This is the execution of ld-wrapper and it terminates with “Uncaught > exception”, which isn’t really helpful. Apparently this happens before > ‘boot-9.scm’ was even search for. > > Can you reproduce it by running ‘ld’ directly in that environment? Or > better yet, by running ‘guile’? The next thing is to try and do that > in gdb… Yes I can reproduce simply by running ‘guile’ (v2.2.2 and v2.2.3). :-) --8<---------------cut here---------------start------------->8--- LD_LIBRARY_PATH="$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) --8<---------------cut here---------------end--------------->8--- I have tried to set LC_ALL=C, but this doesn't have any impact. Here are the outputs of ‘LD_LIBRARY_PATH="$HOME/.guix-profile/lib" strace -f -s 1000 -o OUTPUT guile’ for the failing environment with glibc@2.25 in the profile: