[Bug 1185529] New: libgccjit does not find libgcc/crtbegin.o
http://bugzilla.opensuse.org/show_bug.cgi?id=1185529 Bug ID: 1185529 Summary: libgccjit does not find libgcc/crtbegin.o Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: screening-team-bugs@suse.de Reporter: opensusebz@halobates.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Trying to compile current emacs with libgccjit11, but the test of libgccjit at configure time fails: (t.c is below) gcc t.c -lgccjit ./a.out ld: cannot find crtbeginS.o: No such file or directory ld: cannot find -lgcc ld: cannot find -lgcc_s libgccjit.so: error: error invoking gcc driver strace shows that the paths seem to be incorrect: strace -e execve -f ./a.out ... [pid 23720] execve("/usr/bin/ld", ["ld", "--build-id", "--eh-frame-hdr", "-m", "elf_x86_64", "-shared", "-o", "/tmp/libgccjit-X37gMf/fake.so", "/usr/lib/../lib64/crti.o", "crtbeginS.o", "-L/lib/../lib64", "-L/usr/lib/../lib64", "/tmp/ccgGNXSP.o", "-lgcc", "--push-state", "--as-needed", "-lgcc_s", "--pop-state", "-lc", "-lgcc", "--push-state", "--as-needed", "-lgcc_s", "--pop-state", "crtendS.o", "/usr/lib/../lib64/crtn.o"], 0x14203a0 /* 105 vars */) = 0 crtbegin etc. are in /usr/lib64/gcc/x86_64-suse-linux/ but the driver is not telling the linker that. t.c: #include <libgccjit.h> #include <stdlib.h> #include <stdio.h> int main (int argc, char **argv) { gcc_jit_context *ctxt; gcc_jit_result *result; ctxt = gcc_jit_context_acquire (); if (!ctxt) exit (1); gcc_jit_type *int_type = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT); gcc_jit_function *func = gcc_jit_context_new_function (ctxt, NULL, GCC_JIT_FUNCTION_EXPORTED, int_type, "foo", 0, NULL, 0); gcc_jit_block *block = gcc_jit_function_new_block (func, "foo"); gcc_jit_block_end_with_return ( block, NULL, gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1)); result = gcc_jit_context_compile (ctxt); if (!result) exit (1); typedef int (*fn_type) (void); fn_type foo = (fn_type)gcc_jit_result_get_code (result, "foo"); if (!foo) exit (1); if (foo () != 1) exit (1); gcc_jit_context_release (ctxt); gcc_jit_result_release (result); return 0; } -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1185529 http://bugzilla.opensuse.org/show_bug.cgi?id=1185529#c4 Richard Biener <rguenther@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |rguenther@suse.com Resolution|NORESPONSE |--- Assignee|screening-team-bugs@suse.de |martin.liska@suse.com Flags|needinfo?(opensusebz@haloba | |tes.de) | --- Comment #4 from Richard Biener <rguenther@suse.com> --- It's part of the gcc11 package. Martin, can you have a look please? Reminds me of some (openQA?) testing of the installed system. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1185529 http://bugzilla.opensuse.org/show_bug.cgi?id=1185529#c5 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(opensusebz@haloba | |tes.de) --- Comment #5 from Martin Li��ka <martin.liska@suse.com> --- (In reply to Richard Biener from comment #4)
It's part of the gcc11 package. Martin, can you have a look please?
Sure, it works on a vanilla Tumbleweed with the following Dockerfile: FROM opensuse/tumbleweed RUN zypper -n install libgccjit0 libgccjit0-devel-gcc11 gcc wget RUN wget https://gist.githubusercontent.com/marxin/43b8f6d7d2c83efd6de6d20e32bee488/r... RUN gcc t.c -lgccjit && ./a.out
Reminds me of some (openQA?) testing of the installed system.
Yes, we should do it. I'm going to work on it. So we need more info from Andi, what's wrong in his setup.. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1185529 http://bugzilla.opensuse.org/show_bug.cgi?id=1185529#c6 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #6 from Martin Li��ka <martin.liska@suse.com> --- This should be fixed and covered by openQA tests. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com