Bug#988313: libgccjit-8-dev: Smoke test of libgccjit fails
Package: libgccjit-8-dev
Version: 8.3.0-6
Severity: normal
Dear Maintainer,
Short: the libgccjit example from the GNU GCC tutorial on JIT segfaults.
I tried to compile Emacs from GIT HEAD (aa354dd55b213b86ee8e3aa0365a6ad915838458), but
during ./configure --with-native-compilation it spit out this text:
...
checking for library containing inflateEnd... -lz
checking for dladdr... yes
checking for dlfunc... no
checking for gcc_jit_context_acquire in -lgccjit... yes
checking libgccjit.h usability... yes
checking libgccjit.h presence... yes
checking for libgccjit.h... yes
configure: error: Installed libgccjit has failed passing the smoke test.
You can verify it yourself compiling:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
Please report the issue to your distribution if libgccjit was installed through
that.
Here instructions on how to compile and install libgccjit from source:
<https://gcc.gnu.org/wiki/JIT>.
I then tried the tutorial01.html example as well, and the compilation step of that
page worked so far. But running it gave me this error:
$ ./tut01-hello-world
Segmentation fault
While I wrote this error report, I also install libgccjit-8-dbg via apt-get and used GDB.
The following backtrace happens:
$ gdb ./tut01-hello-world
Reading symbols from ./tut01-hello-world...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/schurig/.doom.d/emacs.git/tut01-hello-world
Program received signal SIGSEGV, Segmentation fault.
0xb74c07ba in do_add_prefix (pprefix=0xbffff250, prefix=0x4446b0 "/home/schurig/.local/bin/", first=false)
at ../../src/gcc/file-find.c:139
139 ../../src/gcc/file-find.c: No such file or directory.
(gdb) bt
#0 0xb74c07ba in do_add_prefix (pprefix=0xbffff250, prefix=0x4446b0 "/home/schurig/.local/bin/", first=false)
at ../../src/gcc/file-find.c:139
#1 0xb74c07ee in add_prefix (pprefix=0xbffff250, prefix=0x4446b0 "/home/schurig/.local/bin/")
at ../../src/gcc/file-find.c:147
#2 0xb74c08e8 in prefix_from_string (
p=0xbfffff44 "/home/schurig/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games",
pprefix=0xbffff250) at ../../src/gcc/file-find.c:201
#3 0xb74c09ac in prefix_from_env (env=0xb755b6ec "PATH", pprefix=0xbffff250) at ../../src/gcc/file-find.c:168
#4 0xb67fc4e4 in gcc::jit::playback::context::invoke_embedded_driver (this=0xbffff414, argvec=0xbffff2b4)
at ../../src/gcc/jit/jit-playback.c:2513
#5 0xb67fee9d in gcc::jit::playback::context::invoke_driver (this=0xbffff414,
ctxt_progname=0xb754eec8 "libgccjit.so", input_file=0x40ae90 "/tmp/libgccjit-wIeDdd/fake.s",
output_file=0x40aec0 "/tmp/libgccjit-wIeDdd/fake.so", tv_id=TV_ASSEMBLE, shared=true, run_linker=true)
at ../../src/gcc/jit/jit-playback.c:2492
#6 0xb67ffeb7 in gcc::jit::playback::context::convert_to_dso (this=0xbffff414,
ctxt_progname=0xb754eec8 "libgccjit.so") at ../../src/gcc/jit/jit-tempdir.h:59
#7 0xb67fff26 in gcc::jit::playback::compile_to_memory::postprocess (this=0xbffff414,
ctxt_progname=0xb754eec8 "libgccjit.so") at ../../src/gcc/jit/jit-playback.c:1900
#8 0xb67fe93d in gcc::jit::playback::context::compile (this=0xbffff414) at ../../src/gcc/jit/jit-playback.c:1873
#9 0xb67f4911 in gcc::jit::recording::context::compile (this=0x40a8c0) at ../../src/gcc/jit/jit-recording.c:1352
#10 0xb67e85b9 in gcc_jit_context_compile (ctxt=0x40a8c0) at ../../src/gcc/jit/libgccjit.c:2679
#11 0x00401466 in main ()
Note that this is on i386, not on amd64, maybe this is related. However, because I develop for
embedded x86 devices, I'd rather stay on i386 as long as possible.
-- System Information:
Debian Release: 10.9
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 4.19.0-16-686-pae (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages libgccjit-8-dev depends on:
ii gcc-8-base 8.3.0-6
ii libgccjit0 8.3.0-6
libgccjit-8-dev recommends no packages.
Versions of packages libgccjit-8-dev suggests:
pn libgccjit-8-dbg <none>
5H-- no debconf information
Reply to: