Skip to content

error: cannot open rcrt1.o: No such file or directory while running src/test/ui/process/nofile-limit.rs #99382

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

Closed
Logarithmus opened this issue Jul 17, 2022 · 3 comments
Labels
C-bug Category: This is a bug.

Comments

@Logarithmus
Copy link
Contributor

Logarithmus commented Jul 17, 2022

Steps to reproduce

  1. git clone https://github.com/rust-lang/rust
  2. ./x.py setup
  3. Choose compiler
  4. ./x.py test src/test/ui

Expected behavior

All tests should pass

Actual behavior

   = note: ld: error: cannot open rcrt1.o: No such file or directory
           collect2: error: ld returned 1 exit status
error: aborting due to previous error
------------------------------------------
failures:
    [ui] src/test/ui/process/nofile-limit.rs

System

Void Linux rolling
I guess ./x.py uses its own bootstrap compiler, so rustup toolchain version is irrelevant, but anyway, it's 1.61.

@tmiasko
Copy link
Contributor

tmiasko commented Jul 19, 2022

With -Ctarget-feature=+crt-static rustc will try to auto detect support for static-pie in the linker. Unfortunately on Void Linux, linker does support the option, but required object files are missing (it seems glibc is built without --enable-static-pie):

# echo 'int main(){}' > a.c
# gcc -static-pie a.c
/usr/sbin/ld: cannot find rcrt1.o: No such file or directory
collect2: error: ld returned 1 exit status

Not sure what what could be done on rustc side, short of disabling the test altogether.

@Logarithmus
Copy link
Contributor Author

@tmiasko thanks, I'll try reaching out the Void devs

@tmiasko
Copy link
Contributor

tmiasko commented Jul 20, 2022

Ah, one workaround would be to disable the relocation in the test, I will do that.

If you could reach out to Void Linux developers to enable static-pie that would be great as well. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants