rust-lang / rust-lang/rustc_codegen_gcc

rust build failure on Fedora 41

Open
#641 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.2k
Forks
105
Avg merge
8h 20m
Merged PRs (30d)
14

Description

One error out of 18756. Is the rust compiler still useable? I just installed it for the first time. I'm trying to compile resvg.

admin@xena:~/Downloads/rust_compiler/rust$ ./x test tests/ui
.
<lots of lines>
.
........................................................................................ 18480/18756
........................................................................................ 18568/18756
..............................................iiiiiiii.i................................ 18656/18756
........................................................................................ 18744/18756
............

failures:

---- [ui] tests/ui/process/nofile-limit.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/home/admin/Downloads/rust_compiler/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/home/admin/Downloads/rust_compiler/rust/tests/ui/process/nofile-limit.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/home/admin/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/home/admin/Downloads/rust_compiler/rust/vendor" "--sysroot" "/home/admin/Downloads/rust_compiler/rust/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-o" "/home/admin/Downloads/rust_compiler/rust/build/x86_64-unknown-linux-gnu/test/ui/process/nofile-limit/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/home/admin/Downloads/rust_compiler/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Ctarget-feature=+crt-static" "-Crpath=no" "-Crelocation-model=static"
stdout: none
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   = note:  "cc" "-m64" "/tmp/rustcp3BUoa/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,libcfg_if-*,liblibc-*}.rlib" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-lgcc_eh" "-lgcc" "-lc" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{liballoc-*,librustc_std_workspace_core-*,libcore-*,libcompiler_builtins-*}.rlib" "-L" "/tmp/rustcp3BUoa/raw-dylibs" "-Wl,-Bdynamic" "-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-fuse-ld=lld" "-Wl,-znostart-stop-gc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/admin/Downloads/rust_compiler/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/admin/Downloads/rust_compiler/rust/build/x86_64-unknown-linux-gnu/test/ui/process/nofile-limit/a" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: rust-lld: error: unable to find library -lm
           rust-lld: error: unable to find library -lc
           rust-lld: error: unable to find library -lc
           collect2: error: ld returned 1 exit status
           

error: aborting due to 1 previous error
------------------------------------------



failures:
    [ui] tests/ui/process/nofile-limit.rs

test result: FAILED. 18571 passed; 1 failed; 184 ignored; 0 measured; 0 filtered out; finished in 191.21s

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Build completed unsuccessfully in 0:03:36
admin@xena:~/Downloads/rust_compiler/rust$

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with ./x test tests/ui on Fedora 41, focusing on tests/ui/process/nofile-limit.rs and the reported rust-lld errors for -lm and -lc. Inspect the test output and compiler test setup to determine whether this is an environment-specific failure or a regression; done means the cause and expected behavior are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.