I have tried to first debug ‘guile’ with ‘gdb’. Since it crashes, I
don't know to get any backtrace from it. However I have noticed that
since ‘gdb’ itself is linked with libguile and suffers from the same
problem with LD_LIBRARY_PATH improperly set, but doesn't crash. So I
have run the following:
Toggle snippet (70 lines)
mthl@godel ~/src/guile$ gdb gdb
[...]
Reading symbols from gdb...(no debugging symbols found)...done.
(gdb) set environment LD_LIBRARY_PATH /home/mthl/.guix-profile/lib
(gdb) run
Starting program: /gnu/store/ly635xcgaqwb6brmwhf5d71fvcbz5dpc-profile/bin/gdb
warning: the debug information found in "/home/mthl/.guix-profile/lib/debug//gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/lib/libdl-2.25.so.debug" does not match "/home/mthl/.guix-profile/lib/libdl.so.2" (CRC mismatch).
warning: File "/gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22.8.1-gdb.scm" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22.8.1-gdb.scm
line to your configuration file "/home/mthl/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/mthl/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
warning: the debug information found in "/home/mthl/.guix-profile/lib/debug//gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/lib/libpthread-2.25.so.debug" does not match "/home/mthl/.guix-profile/lib/libpthread.so.0" (CRC mismatch).
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25/lib/libthread_db.so.1".
warning: the debug information found in "/home/mthl/.guix-profile/lib/debug//gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/lib/libutil-2.25.so.debug" does not match "/home/mthl/.guix-profile/lib/libutil.so.1" (CRC mismatch).
warning: the debug information found in "/home/mthl/.guix-profile/lib/debug//gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/lib/libm-2.25.so.debug" does not match "/home/mthl/.guix-profile/lib/libm.so.6" (CRC mismatch).
warning: the debug information found in "/home/mthl/.guix-profile/lib/debug//gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/lib/libc-2.25.so.debug" does not match "/home/mthl/.guix-profile/lib/libc.so.6" (CRC mismatch).
warning: the debug information found in "/home/mthl/.guix-profile/lib/debug//gnu/store/38kr8xi7nib8rx8xr4gi0w0d8knyca3k-glibc-2.25/lib/libcrypt-2.25.so.debug" does not match "/home/mthl/.guix-profile/lib/libcrypt.so.1" (CRC mismatch).
[New Thread 0x7ffff4bd6700 (LWP 21942)]
[New Thread 0x7ffff4385700 (LWP 21943)]
[New Thread 0x7ffff3b34700 (LWP 21944)]
Throw without catch before boot:
Throw to key encoding-error with args ("scm_to_stringn" "cannot convert narrow string to output locale" 22 #f #f)Aborting.
Thread 1 "gdb" received signal SIGABRT, Aborted.
0x00007ffff5d052c4 in raise () from /home/mthl/.guix-profile/lib/libc.so.6
(gdb) bt
#0 0x00007ffff5d052c4 in raise () from /home/mthl/.guix-profile/lib/libc.so.6
#1 0x00007ffff5d0672a in abort () from /home/mthl/.guix-profile/lib/libc.so.6
#2 0x00007ffff76bae23 in pre_init_throw ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#3 0x00007ffff76d08b6 in vm_regular_engine ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#4 0x00007ffff76d2a38 in scm_call_with_vm ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#5 0x00007ffff76b22bd in scm_to_stringn ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#6 0x00007ffff7666e70 in search_path ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#7 0x00007ffff76685c1 in scm_init_eval_in_scheme ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#8 0x00007ffff7661448 in scm_i_init_guile ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#9 0x00007ffff76b83b0 in scm_i_init_thread_for_guile ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#10 0x00007ffff76b83e9 in with_guile_and_parent ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#11 0x00007ffff7389732 in GC_call_with_stack_base ()
from /home/mthl/.guix-profile/lib/libgc.so.1
#12 0x00007ffff76b8808 in scm_with_guile ()
from /gnu/store/p50qidshrjvvd7d1955navjkijr2fg32-guile-2.0.14/lib/libguile-2.0.so.22
#13 0x000000000049cad6 in _initialize_guile() ()
#14 0x00000000006de1a3 in initialize_all_files() ()
#15 0x000000000069f27d in gdb_init(char*) ()
#16 0x00000000005fa0be in gdb_main(captured_main_args*) ()
#17 0x0000000000412075 in main ()
Apparently I miss the symbol table of gdb so I don't know how to proceed
next to get more precise information. Help welcome.
When looking at ‘scm_to_stringn’ code and crossing with the actual error
message it looks like the failing instruction is the following: