Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Update images to Ubuntu 22.04 LTS#973

Open
Jules-Bertholet wants to merge2 commits intocross-rs:main
base:main
Choose a base branch
Loading
fromJules-Bertholet:ubuntu_22_04

Conversation

Jules-Bertholet
Copy link
Contributor

No description provided.

mcandre, dallagi, acheronfail, vnghia, ayebear, rotivleal, russellbanks, pvshvp-oss, joseluisq, edisno, and 5 more reacted with heart emojileet4tari reacted with eyes emoji
@Jules-BertholetJules-Bertholet requested a review froma team as acode ownerJuly 27, 2022 11:47
Copy link
Member

@EmilgardisEmilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

For changelog, please edithttps://github.com/cross-rs/cross/blob/main/.changes/591.json, rename to591-973.json and change 20.04 to 22.04

@Emilgardis
Copy link
Member

readme table needs to be updated.

You can generate the table with

cargo xtask target-info --tag local (all the images need to be built though beforehand)

@Emilgardis
Copy link
Member

bors try --target linux

borsbot added a commit that referenced this pull requestJul 27, 2022
@bors
Copy link
Contributor

borsbot commentedJul 27, 2022

try

Build failed:

@AlexhuszaghAlexhuszagh added this to the0.4.0 milestoneJul 27, 2022
@Alexhuszagh
Copy link
Contributor

Alexhuszagh commentedJul 27, 2022
edited
Loading

Marked this for the 0.4.0 milestone since it updates glibc from 2.21 to 2.35, which isn't supported on any Debian distribution as of yet (even on the unstable release, sid).

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commentedJul 27, 2022
edited
Loading

Looks like the error in the images containing a Linux image for full system emulation have an unrelated error:dropbear-2022.82 has a 520 error right now. We might need to switch to another mirror if this stays for a while. Amirror exists if needed.

@Alexhuszagh
Copy link
Contributor

Now that the mirror issues have been fixed...
bors try

borsbot added a commit that referenced this pull requestJul 28, 2022
@bors
Copy link
Contributor

borsbot commentedJul 28, 2022

try

Build failed:

@Emilgardis
Copy link
Member

seemsbzip2 is no longer in default installation

@Alexhuszagh
Copy link
Contributor

seemsbzip2 is no longer in default installation

That should probably be done explicitly too, since if it's already installed, we can just purge it later.

@Alexhuszagh
Copy link
Contributor

Looks likencurses-base is no longer a valid package or has no installation candidate: all thelinux-image.sh scripts are failing with:

apt-get -d --no-install-recommends download libcrypt1:mips64el busybox:mips64el dropbear-bin:mips64el libtommath1:mips64el libtomcrypt1:mips64el libgmp10:mips64el libc6:mips64el linux-image-5.10.0-16-5kc-malta:mips64el ncurses-base zlib1g:mips64el#22 20.92 E: Can't find a source to download version '6.3-2' of 'ncurses-base:amd64'

@Alexhuszagh
Copy link
Contributor

Looks likencurses-base is no longer a valid package or has no installation candidate: all thelinux-image.sh scripts are failing with:

apt-get -d --no-install-recommends download libcrypt1:mips64el busybox:mips64el dropbear-bin:mips64el libtommath1:mips64el libtomcrypt1:mips64el libgmp10:mips64el libc6:mips64el linux-image-5.10.0-16-5kc-malta:mips64el ncurses-base zlib1g:mips64el#22 20.92 E: Can't find a source to download version '6.3-2' of 'ncurses-base:amd64'

Oh, the issue is Ubuntu 22.04 added the packagencurses-base, which has version6.3-2, which is higher than thencurses-base in bullseye (6.2+20201114-2). We should also be using bookworm or sid for this upgrade as well, since Ubuntu 22.04 is based off of those versions. We also might need to choose an exact installation candidate, similar to how we do so for conflicting packages on amd64 inlinux-image.sh.

@flxo
Copy link
Contributor

Is there anything I can help here?

In the meantimebindgen removedsupport for ancient clang versions. The clang version in 18.04 is considered ancient.
As a resultbindgen (>=0.60.0) doesn't work in any of those images out of the box. Probably a solution would be to upgradeclang in a customDockerfile which is required anyways to install the bindgen requirements.

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commentedNov 11, 2022
edited
Loading

Is there anything I can help here?

In the meantimebindgen removedsupport for ancient clang versions. The clang version in 18.04 is considered ancient. As a resultbindgen (>=0.60.0) doesn't work in any of those images out of the box. Probably a solution would be to upgradeclang in a customDockerfile which is required anyways to install the bindgen requirements.

We use 20.04 on the latest mains and are working on a 0.3.0 release currently. I believe those should still work with bindgen. We'd like ideally to have a release on 20.04 before migrating to 22.04, personally, and I'd like a few bug fixes in the meantime. I'll test this later today with a more recent build.

@flxo
Copy link
Contributor

Is there anything I can help here?
In the meantimebindgen removedsupport for ancient clang versions. The clang version in 18.04 is considered ancient. As a resultbindgen (>=0.60.0) doesn't work in any of those images out of the box. Probably a solution would be to upgradeclang in a customDockerfile which is required anyways to install the bindgen requirements.

We use 20.04 on the latest mains and are working on a 0.3.0 release currently. I believe those should still work with bindgen. We'd like ideally to have a release on 20.04 before migrating to 22.04, personally, and I'd like a few bug fixes in the meantime. I'll test this later today with a more recent build.

Thanks. I didn't know that there's 20.04 in between. Haven't tried but it's very likely this works.

Any plans to include thebindgen dependencies by default? I have multiple projects with aCross.toml and Dockerfiles just for adding thebiindgen dependencies.

@Emilgardis
Copy link
Member

Any plans to include thebindgen dependencies by default? I have multiple projects with aCross.toml and Dockerfiles just for adding thebiindgen dependencies.

Not currently, the clang deps take up a lot of space.

You can skip the additionalDockerfiles and only use aCross.toml (or even justCargo.toml likethis)

# Cross.toml[target.TARGET]pre-build = ["apt-get update && apt-get install --assume-yes --no-install-recommends libclang-3.9-dev clang-3.9"]
flxo reacted with thumbs up emoji

@ShayBox
Copy link

What's the ETA on this change? currently unable to compile anything using libssl as Ubuntu 20.04 only provides libssl1 while every distro now uses libssl3, and Ubuntu 22.04 doesn't have an official package for libssl1.

fmorency, qiaoruntao, Porges, acheronfail, Altair-Bueno, russellbanks, jmmv, MaddieM4, etherik, decahedron1, and merklefruit reacted with thumbs up emoji

@Emilgardis
Copy link
Member

What's the ETA on this change?

there is no ETA on 0.4.0, we still have to do 0.3.0 which needs on other changes. development has slowed down a bit due to availability, but any help is greatly appreciated

tesaguri added a commit to tesaguri/pipitor that referenced this pull requestJul 25, 2023
We preferred dynamic linking because that makes it easy for end users toupgrade OpenSSL (potentially with security fixes) without reinstallingthe app.When cross-compiling, however, we use a container based on Ubuntu 20.04,which does not have `libssl3` package, making the release artifactdepend on OpenSSL 1.1.1, which will reach EOL at 2013-09-11(<https://www.openssl.org/blog/blog/2023/03/28/1.1.1-EOL/>). See also<cross-rs/cross#973> for current status of thecontainer image.This commit aims at working around the problem by statically linkingagainst OpenSSL when cross compiling, so that the end user does notneed to install OpenSSL 1.1.1.
tesaguri added a commit to tesaguri/pipitor that referenced this pull requestJul 25, 2023
We preferred dynamic linking because that makes it easy for end users toupgrade OpenSSL (potentially with security fixes) without reinstallingthe app.When cross-compiling, however, we use a container based on Ubuntu 20.04,which does not have `libssl3` package, making the release artifactdepend on OpenSSL 1.1.1, which will reach EOL at 2013-09-11(<https://www.openssl.org/blog/blog/2023/03/28/1.1.1-EOL/>). See also<cross-rs/cross#973> for current status of thecontainer image.This commit aims at working around the problem by statically linkingagainst OpenSSL when cross compiling, so that the end user does notneed to install OpenSSL 1.1.1.
github-merge-queuebot pushed a commit to kaskada-ai/kaskada that referenced this pull requestJul 25, 2023
We build our binaries on ubuntu:20 which uses libssl1.1 (through ourdirect dependency of `reqwest`). Libssl is dynamically linked and withsystems moving to ubuntu:22 that has libssl3.0 our binary breaks. Anexample is Google's Collab.We also build multiplatform linux docker image using `cross-rs`.`cross-rs` currently builds for ubuntu:20 on their `master` branch andthere is currently an open PR(cross-rs/cross#973) to move to ubuntu:22.The proposed solution with this PR is to enable the feature on `reqwest`that builds the libssl crate (and the libssl library) statically in thesparrow binaries rather than relying on dynamic linking to pick thesystem's libssl library.We are *not* moving our CI to use ubuntu:22 until there we have asolution for building multiarch images on ubuntu:22 (through `cross-rs`or otherwise). Otherwise, if we move to ubuntu:22 today with out anyother changes our docker image will break on linux on arm (anyone on aMac with an M chip running a docker container).1. sparrow depends on `reqwest` which brings in libssl. 2. added an `if` condition on the release CI that we missedI verified that the binaries Before: ```❯ ldd sparrow-mainlinux-vdso.so.1 (0x00007fff56643000)libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007f3387ee8000)libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f3383e00000)libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3383a00000)libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3387ec8000)libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3384321000)libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3383c1f000)/lib64/ld-linux-x86-64.so.2 (0x00007f3387fa4000)```After ```❯ ldd sparrow-main        linux-vdso.so.1 (0x00007ffc7d3f2000)        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3989800000)        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f398d9aa000)        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3989b21000)        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f398961f000)        /lib64/ld-linux-x86-64.so.2 (0x00007f398d9dd000)```The final `release` binary size increases by 2MB Before: ```❯ ls -lh sparrow-main-rwxr-xr-x 2 therapon therapon 85M Jul 24 13:09 sparrow-main```After```❯ ls -lh sparrow-main             -rwxr-xr-x 2 therapon therapon 87M Jul 24 13:06 sparrow-main```
@EmilgardisEmilgardis mentioned this pull requestFeb 27, 2024
2 tasks
@pvshvp-oss
Copy link

Is there a TODO list on this?

@Dylan-DPC
Copy link
Contributor

I wonder if it's worth going straight to Ubuntu 24.04 LTS now instead of 22.04

russellbanks and tjallingt reacted with thumbs up emoji

@pvshvp-oss
Copy link

pvshvp-oss commentedMay 15, 2024
edited
Loading

I wonder if it's worth going straight to Ubuntu 24.04 LTS now instead of 22.04

On a related note, I think it is totally worth having an Arch Linux image that is automatically periodically updated. It may be burdensome for the team to be on their toes updating for SSL or other things.

@polarathene
Copy link

I've not been keeping up with this project, but didn't it use old versions of Ubuntu for minimizing the glibc version to link against for broader portability?

These days you can usecargo zigbuild to cross compile to targets. It handles the glibc minimal version for you so that you can run on a modern distro release, and you don't have to worry about toolchains for different archs, just add the targets via rustup IIRC.

@Emilgardis
Copy link
Member

Emilgardis commentedMay 15, 2024
edited
Loading

@polarathene yes that was one of the reasons for a older release, but we've moved away from that philosophy.
We also provide zigbuild withtarget.<target>.zig the only problem with that is cross-compiling with dependencies.

the only todo for this is to release 0.3.0 first@pvshvp-oss

We don't provide ssl in our images (except freebsd) for exactly the reason of having to update, instead you have to manually pull the dependency via something likeprebuild

we also have a centos based image, making a archlinux based image shouldn't be too hard:https://github.com/cross-rs/cross/blob/7d75864e7812005156805587838f41eb3b30a270/docker/Dockerfile.native.centos

polarathene and tjallingt reacted with heart emoji

@13r0ck
Copy link

I assume that by now this should be closed in favor of cross using Ubuntu 24.04?

joaoantoniocardoso and joseluisq reacted with thumbs up emoji

@Emilgardis
Copy link
Member

Emilgardis commentedOct 7, 2024
edited
Loading

I'll keep it open, but yes, it would probably make sense to jump directly to 24. I've previously said though that we should release 22.04 first but I think that would not be wise anymore.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@EmilgardisEmilgardisAwaiting requested review from Emilgardis

Assignees
No one assigned
Projects
None yet
Milestone
0.4.0
Development

Successfully merging this pull request may close these issues.

9 participants
@Jules-Bertholet@Emilgardis@Alexhuszagh@flxo@ShayBox@pvshvp-oss@Dylan-DPC@polarathene@13r0ck

[8]ページ先頭

©2009-2025 Movatter.jp