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

glibc compatibility / make x86_64-unknown-linux-gnu ubuntu again and provide image for glibc compatibility #680

Closed
Emilgardis opened this issue Apr 5, 2022 · 9 comments · Fixed by #764

Comments

@Emilgardis
Copy link
Member

Emilgardis commented Apr 5, 2022

I think it's unexpected all linux images are ubuntu, except x86_64-unknown-linux-gnu, I think this can be remedied by building two images: x86_64-unknown-linux-gnu and x86_64-unknown-linux-gnu.2.17

Thankfully, we have not published the centos change yet, so this can be remedied

Related to the glibc issue, I think we can remedy this by suggesting users use zig cc ala cargo-zigbuild. We can even use a similar approach setting *_CC to zig cc --target x86_64-linux-gnu.2.17 and make it easier for users of the x86_64-unknown-linux-gnu image to choose a glibc

ping #591

@Emilgardis Emilgardis changed the title glibccompatibility / make x86_64-unknown-linux-gnu ubuntu again and provide image for glibc compatibility glibc compatibility / make x86_64-unknown-linux-gnu ubuntu again and provide image for glibc compatibility Apr 5, 2022
@a1ecbr0wn
Copy link

This is a problem caused by the way we have an out of date version of Centos as the basis for the container.

@svenstaro
Copy link
Contributor

I don't really understand the problem or context or goal here given the issues on this that I've read. Is the goal to make everything Ubuntu based or not? What's the glibc issue that's being talked about here?

@Emilgardis
Copy link
Member Author

What's the glibc issue that's being talked about here?

the issue is that some people are still using rhel/centos 7, and we've been kind enough to make it easier for those users to compile with cross without linking in glibc > 2.17, and to do this were using centos 7.

see #455 and #501 where the change was done

@Emilgardis
Copy link
Member Author

The reason I personally want all images to be ubuntu is due to #678

@otavio
Copy link
Contributor

otavio commented Jun 10, 2022

At O.S. Systems we did a custom image in the lines of Rust toolchain used one which allows even older Glibc (2.12). We could make use of Debian for this and avoid CentOS use.

@Alexhuszagh
Copy link
Contributor

At O.S. Systems we did a custom image in the lines of Rust toolchain used one which allows even older Glibc (2.12). We could make use of Debian for this and avoid CentOS use.

I don't think we need to go below 2.17 (RHEL7), but that could work nicely.

@Alexhuszagh Alexhuszagh linked a pull request Jun 14, 2022 that will close this issue
@bors bors bot closed this as completed in f333a1b Jun 14, 2022
@Emilgardis
Copy link
Member Author

This has now been solved.

To opt in to using CentOS, specify in your cross configuration (e.g Cross.toml)

[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"

@fatihaziz
Copy link
Contributor

This has now been solved.

To opt in to using CentOS, specify in your cross configuration (e.g Cross.toml)

[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos"

Thanks! it work.

I think many people not knowing this only by reading the README.md,
I propose to update the README.md here: main...fatihaziz:cross:patch-1

@Emilgardis
Copy link
Member Author

@fatihaziz feel free to open a pr with those changes!

bors bot added a commit that referenced this issue May 2, 2023
1251: Update README.md for centos image target notes [5] and [7] r=Emilgardis a=fatihaziz

Based on #680, it is stated to add `ghcr.io/cross-rs/...` before the image tag. However, this is not stated in the README.md file, resulting in the error "docker login" being needed. 
With this update, the problem is fixed.

Co-authored-by: FatihAziz <m.fatihalaziz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants