Bug#954438: libgccjit0: GCCJIT leads to linking error
Package: libgccjit0
Version: 10-20200312-2
Severity: important
Dear Maintainer,
libgccjit0 leads to linking error, I have the following C source code:
#include <libgccjit.h>
#include <math.h>
#include <stdio.h>
int main(int argc, char **argv) {
gcc_jit_context *ctxt;
ctxt = gcc_jit_context_acquire();
gcc_jit_rvalue *args[2];
printf("%5.8lf\n", sin(30));
return 0;
}
and I compiled it using the following command line:
gcc-10 test.c -o test -lgccjit
or
gcc-10 test.c -lgccjit -o test
leads to the same error message:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/libgccjit.so: undefined reference to `lang_register_spec_functions()'
collect2: error: ld returned 1 exit status
However, exactly the same gcc and gccjit version on Fedora Rawhide work as intened.
It seems a gccjit issue rather than a ld issue.
Thanks,
Gong-Yi.
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.4.0-0.bpo.3-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libgccjit0 depends on:
ii binutils 2.34-5
ii gcc-10-base 10-20200312-2
ii libc6 2.30-2
ii libgcc-10-dev 10-20200312-2
ii libgmp10 2:6.2.0+dfsg-4
ii libisl22 0.22.1-1
ii libmpc3 1.1.0-1
ii libmpfr6 4.0.2-1
ii libzstd1 1.4.4+dfsg-3
ii zlib1g 1:1.2.11.dfsg-2
libgccjit0 recommends no packages.
libgccjit0 suggests no packages.
-- no debconf information
Reply to: