Skip to content

gccjit does not build on s390x due to old libc dependency #109774

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
uweigand opened this issue Mar 30, 2023 · 5 comments · Fixed by #109779
Closed

gccjit does not build on s390x due to old libc dependency #109774

uweigand opened this issue Mar 30, 2023 · 5 comments · Fixed by #109779

Comments

@uweigand
Copy link
Contributor

Running ./x.py check on s390x fails when attempting to build rustc_codegen_gcc due to:

Checking stage0 gcc artifacts (s390x-unknown-linux-gnu)
    Updating git repository `https://github.com/antoyo/gccjit.rs`
  Downloaded libc v0.1.12
  Downloaded 1 crate (31.1 KB) in 0.42s
    Checking libc v0.1.12
    Checking smallvec v1.10.0
error[E0433]: failed to resolve: could not find `arch` in `os`
   --> /home/uweigand/.cargo/registry/src/git.colasdn.top-eae4ba8cbf2ce1c7/libc-0.1.12/rust/src/liblibc/lib.rs:100:20
    |
100 | pub use types::os::arch::c95::*;
    |                    ^^^^ could not find `arch` in `os`

This seems to be caused by a dependency on libc 0.1.12 from gccjit_sys. This version is very old (from about 2015), and does not yet support the s390x architecture at all.

@antoyo could this be updated to a more recent libc version? If so, would you like me to send a patch against https://github.com/antoyo/gccjit.rs ?

@antoyo
Copy link
Contributor

antoyo commented Mar 30, 2023

@antoyo could this be updated to a more recent libc version? If so, would you like me to send a patch against https://github.com/antoyo/gccjit.rs ?

Yes, please!

@uweigand
Copy link
Contributor Author

Thanks for the quick merge! I see ./x.py check still fails for now, because the rust build still seems to pull in the eefb8c662d commit of gccjit.rs, probably because of the Cargo.lock in rustc_codegen_gcc.

Will this be pulled forward automatically at some point, or do I need to submit another PR? (If so, against which repo?)

@antoyo
Copy link
Contributor

antoyo commented Mar 30, 2023

The fastest would be to update the Cargo.lock in this repo (rust-lang/rust). I would appreciate if you submit a PR for this. Thanks!

@uweigand
Copy link
Contributor Author

I've updated the gccjit.rs dependency to the current head commit and rebuilt. This automatically removed the libc 0.1 dependency from Cargo.lock; it is now using 0.2.112 (the version that was also already present in Cargo.lock) everywhere, which is fine for s390x.

@uweigand
Copy link
Contributor Author

With that PR applied, ./x.py check now passes on s390x.

@bors bors closed this as completed in 3f30b51 Mar 31, 2023
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.

2 participants