Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE: duplicate symbol: cannot add block to an imported function #296

Closed
matthiaskrgr opened this issue Jul 1, 2023 · 0 comments · Fixed by #497
Closed

ICE: duplicate symbol: cannot add block to an imported function #296

matthiaskrgr opened this issue Jul 1, 2023 · 0 comments · Fixed by #497

Comments

@matthiaskrgr
Copy link
Member

./tests/ui/duplicate/dupe-symbols-8.rs

// build-fail
// error-pattern: entry symbol `main` declared multiple times
//
// See #67946.

#![allow(warnings)]
fn main() {
    extern "Rust" {
     fn main();
    }
    unsafe { main(); }
}
libgccjit.so: error: gcc_jit_function_new_block: cannot add block to an imported function
gcc_jit_block_get_function: NULL block
gcc_jit_function_get_param: NULL function
gcc_jit_param_as_rvalue: NULL param
gcc_jit_block_get_function: NULL block
gcc_jit_function_get_param: NULL function
gcc_jit_param_as_rvalue: NULL param
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL ltype
libgccjit.so: error: gcc_jit_context_new_array_access: NULL ptr
gcc_jit_lvalue_as_rvalue: NULL lvalue
libgccjit.so: error: gcc_jit_context_new_cast: NULL rvalue
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_type_dyncast_vector: NULL type
gcc_jit_type_unqualified: NULL type
gcc_jit_type_is_integral: NULL type
gcc_jit_type_is_pointer: NULL type
gcc_jit_type_dyncast_vector: NULL type
gcc_jit_type_unqualified: NULL type
gcc_jit_type_dyncast_vector: NULL type
gcc_jit_type_unqualified: NULL type
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_rvalue_get_type: NULL rvalue
libgccjit.so: error: gcc_jit_context_new_bitcast: NULL rvalue
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_type_dyncast_vector: NULL type
gcc_jit_type_unqualified: NULL type
gcc_jit_type_is_integral: NULL type
gcc_jit_type_is_pointer: NULL type
gcc_jit_type_dyncast_vector: NULL type
gcc_jit_type_unqualified: NULL type
gcc_jit_type_dyncast_vector: NULL type
gcc_jit_type_unqualified: NULL type
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_rvalue_get_type: NULL rvalue
libgccjit.so: error: gcc_jit_context_new_bitcast: NULL rvalue
gcc_jit_block_get_function: NULL block
libgccjit.so: error: gcc_jit_context_new_call_through_ptr: NULL argument 2 to fn_ptr: _ZN3std2rt10lang_start17h34ab963e95c33da1E (type: __int64_t)
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_function_new_local: NULL function
gcc_jit_block_add_assignment: NULL block
gcc_jit_lvalue_as_rvalue: NULL lvalue
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL rtype
gcc_jit_compatible_types: NULL ltype
libgccjit.so: error: gcc_jit_context_new_array_access: NULL ptr
gcc_jit_lvalue_as_rvalue: NULL lvalue
libgccjit.so: error: gcc_jit_context_new_cast: NULL rvalue
gcc_jit_block_get_function: NULL block
gcc_jit_function_get_return_type: NULL function_type
gcc_jit_rvalue_get_type: NULL rvalue
gcc_jit_compatible_types: NULL ltype
libgccjit.so: error: gcc_jit_context_new_cast: NULL rvalue
gcc_jit_block_end_with_return: NULL block
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/matthias/.cargo/bin:/home/matthias/bin:/usr/local/bin:/home/matthias/.cargo/bin:/home/matthias/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/home/matthias/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/var/lib/snapd/snap/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcN6hqp3/symbols.o" "dupe-symbols-8.dupe_symbols_8.f6e5da93116eab23-cgu.0.rcgu.o" "dupe-symbols-8.3izdz456beur02ue.rcgu.o" "-Wl,--as-needed" "-L" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-cb92768712601a78.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-64fdea3f4b4483a9.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-7131d4e480a39cf1.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-5b0b0d3b7d32a280.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-ecb3c4cbccea6ca3.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-21489f6fc83bcf9c.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-4235769adaec73dc.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-39978a3c90cbbb03.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-2bcf5035b2e8207a.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-1f4a77c098ecaa29.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-d85c31e2a520cb57.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-af274bde543c4a19.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-54f3ccd06893aed8.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-99aff24c233bd0c8.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-4a9ff6e26a937e19.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-1ab040c8d581c1d5.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-1be5ab1a73b8d3c1.rlib" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-eaa0474023498767.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "dupe-symbols-8" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: /usr/bin/ld: cannot find dupe-symbols-8.dupe_symbols_8.f6e5da93116eab23-cgu.0.rcgu.o: No such file or directory
          /usr/bin/ld: warning: alignment 8 of symbol `_RNvNtNtNtCsle4rNbiKmem_4core3num7dec2flt5table17POWER_OF_FIVE_128' in /home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-1be5ab1a73b8d3c1.rlib(core-1be5ab1a73b8d3c1.core.f73e5ae8f2233ce4-cgu.3.rcgu.o) is smaller than 32 in /home/matthias/vcs/github/rustc_codegen_gcc_attempt2/rustc_codegen_gcc/build_sysroot/sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-1be5ab1a73b8d3c1.rlib(core-1be5ab1a73b8d3c1.core.f73e5ae8f2233ce4-cgu.11.rcgu.o)
          collect2: error: ld returned 1 exit status


error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant