Updated Docker image to Ubuntu-24.04 and Cargo dependencies#1580
Updated Docker image to Ubuntu-24.04 and Cargo dependencies#1580JanDiederich wants to merge 17 commits intocross-rs:mainfrom
Conversation
|
/ci try |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Looking at the died down predecessor #973 I don't expect any help soon. On the other hand: This project is super famous and used by many, many people. |
|
Thank you for the consideration, I'd rather get help with contributions like this rather than money <3 I don't think a way to donate would motivate me, but maybe it could motivate other invited maintainers? I have no clue :3 I'll look into the issue you reported, but try setting |
|
Note how it is filled with |
|
|
|
I managed to get all the way to testing the targets before bombing: https://github.com/petehayes102/cross/actions/runs/12102553312. You can see my commits on top of your original one: https://github.com/petehayes102/cross/commits/trying/. I messed up this branch so it says its miles ahead of |
|
@petehayes102: FROM ghcr.io/cross-rs/aarch64_be-unknown-linux-gnu-cross:local
ARG DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture arm64
RUN apt-get install -y \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
binutils-aarch64-linux-gnu \
libfontconfig1-devI had to configure all my libraries which used some CPU specific SIMD code in their defaults to use other libraries / "vendor" feature, etc.. Then, when I cross-compile my project, I get a lot of this messages: Any ideas how to solve that? |
|
I'd guess gcc-aarch64-linux-gnu is not correct for be |
Ups. Yes, you were right, I was mixing be and le. Fixed that. Now it's FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:local
ARG DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture arm64
RUN echo -e "Types: deb\n\
URIs: http://ports.ubuntu.com/ubuntu-ports\n\
Suites: noble\n\
Components: main universe\n\
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n\
Enabled: yes" >> "/etc/apt/sources.list.d/ubuntu.sources"
RUN apt-get update -o APT::Architecture="arm64" -o APT::Architectures="arm64"; exit 0
RUN apt-get install -y \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
binutils-aarch64-linux-gnu \
libfontconfig1-devBut I always get the same error lines at the end: |
|
don't you need also, why install gcc etc again? |
Failed attempts to solve dependency problems. When I append ":arm64" the installation failed. For me it seems it runs like this:
To solve this I tried this in the # Disable all non-arm64 sources
RUN sed -i -e 's/Enabled: yes/Enabled: no/g' /etc/apt/sources.list.d/ubuntu.sources
# Add arm64 sources as the only valid sources
RUN echo -e "Types: deb\n\
URIs: http://ports.ubuntu.com/ubuntu-ports\n\
Suites: noble\n\
Components: main universe\n\
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n\
Enabled: yes" >> "/etc/apt/sources.list.d/ubuntu.sources"It doesn't seem to help at all. |
|
@Emilgardis Regarding the package installation problems, do you have any idea how this problem happens? when I try to install the |
|
@Emilgardis Is there a way I can persuade someone to solve this? Maybe with a donation after all? |
|
@Emilgardis Any update? |
|
I updated some crates and Rust and now "xargo" isn't compiling anymore, which is for a long time now in maintenance only mode. "Xargo" doesn't seem to easy to fix too. This seems like a never-ending story. |
|
Xargo can be dropped, its not relevant anymore |
|
Also sorry for not seeing your earlier comments! I have completely missed them. Ill take a look at what you've said and give a response if needed |
|
Not sure how to solve the issues you're seeing, also not sure why it happens :/ |
Big thanks. I commented it out everywhere, that already helped a lot. I could get it to compile with the latest Rust and the latest packages. It seems smoothed out, but I still struggle with the part where I use it. I can't get it to compile my project due to basic conflicts. Where I need the |
|
I think (but I'm not sure) my PR now works for the most part, and the problems I have are personal package installation problems, which have nothing to do with my PR branch. Edit: I see, someone else already made a PR with an Owo-Colors correction: #1611, interesting. But I see no discussion if that solution is accepted or not? |
|
/ci try |
This comment has been minimized.
This comment has been minimized.
|
#1611 is fine, the issue was how to resolve the old dependency without introducing multiple versions of crates.
I think that's right, the impl can be removed :) |
This comment has been minimized.
This comment has been minimized.
docker/linux-image.sh
Outdated
| # Install packages | ||
| root="root-${arch}" | ||
|
|
||
| mkdir -p "${root}"/{bin,etc/dropbear,root,sys,dev,proc,sbin,tmp,usr/{bin,sbin},var/log} |
There was a problem hiding this comment.
| mkdir -p "${root}"/{bin,etc/dropbear,root,sys,dev,proc,sbin,tmp,usr/{bin,sbin},var/log} | |
| mkdir -p "${root}"/{etc/dropbear,root,sys,dev,proc,tmp,usr/{bin,sbin},var/log} |
This two should make the ln below fail. Maybe its overall more failsafe to create the symlinks first, to assure no package install or so pre-creates the dirs.
There was a problem hiding this comment.
afaik it should work fine, but it's unnecessary.
There was a problem hiding this comment.
I know now why it did not fail, but it is not as it was supposed to be, wait.
|
Further things to fix:
|
docker/linux-image.sh
Outdated
|
|
||
| mkdir -p "${root}"/{bin,etc/dropbear,root,sys,dev,proc,sbin,tmp,usr/{bin,sbin},var/log} | ||
| for deb in "${arch}"/*deb; do | ||
| dpkg -x "${deb}" "${root}"/ | ||
| done | ||
| # make libraries and binaries available as usrmerge | ||
| for d in lib lib64 bin sbin; do | ||
| ln -ns "usr/${d}" "${root}/${d}" | ||
| done |
There was a problem hiding this comment.
It did work now, since /lib and /lib64 were linked. But /bin and /sbin links were put into the previously created /bin and /sbin directories. I was missing the -d flag to assure ln takes the actual directory as link target, instead of putting it inside. It did not cause issues here, but if on actual usage or later on something is looking for an executable in /(s)bin while all of them are in /usr/(s)bin, it might become an issue.
And to prevent any potential package which does not follow usrmerge pre-creates any of the dirs, it is easier to create the symlinks first.
| mkdir -p "${root}"/{bin,etc/dropbear,root,sys,dev,proc,sbin,tmp,usr/{bin,sbin},var/log} | |
| for deb in "${arch}"/*deb; do | |
| dpkg -x "${deb}" "${root}"/ | |
| done | |
| # make libraries and binaries available as usrmerge | |
| for d in lib lib64 bin sbin; do | |
| ln -ns "usr/${d}" "${root}/${d}" | |
| done | |
| # make libraries and binaries available as usrmerge | |
| for d in lib lib64 bin sbin; do | |
| ln -snd "usr/${d}" "${root}/${d}" | |
| done | |
| mkdir -p "${root}"/{etc/dropbear,root,sys,dev,proc,tmp,usr/{bin,sbin,lib,lib64},var/log} | |
| for deb in "${arch}"/*deb; do | |
| dpkg -x "${deb}" "${root}"/ | |
| done |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Michalng <28480705+Michalng@users.noreply.github.com>
|
/ci try |
This comment has been minimized.
This comment has been minimized.
| repository = "https://github.com/cross-rs/cross" | ||
| version = "0.2.5" | ||
| edition = "2021" | ||
| version = "0.2.6" |
There was a problem hiding this comment.
this should not be bumped in this pr, and if it should be bumped it should be to 0.3.0, I want to do a alpha + rc first though :)
docker/linux-image.sh
Outdated
| # mipsel was discontinued in trixie, so we have to use bookworm. | ||
| kernel='6.*-4kc-malta' | ||
| deps=(libcrypt1:"${arch}") | ||
| debsource="deb http://http.debian.net/debian/ bookworm main" |
There was a problem hiding this comment.
http.debian.net redirects to deb.debian.org. And any reason to not use HTTPS here?
| debsource="deb http://http.debian.net/debian/ bookworm main" | |
| debsource="deb https://deb.debian.org/debian bookworm main" |
Same for the other sources, but everything below bullseye will require archive.debian.org instead.
And for debian-ports (also available at deb.debian.org/debian-ports, a dedicated keyring is needed: https://deb.debian.org/debian-ports/pool/main/d/debian-ports-archive-keyring/
docker/linux-image.sh
Outdated
| if [ -d "usr/${d}" ]; then | ||
| ln -nsd "usr/${d}" "${root}/${d}" | ||
| else | ||
| mkdir -p "${root}/${d}" | ||
| fi |
There was a problem hiding this comment.
The directories are expected to not yet exist here, but they will be created with below package installs (or the mkdir -p call). Even if they remain non-existent, the symlinks do not hurt. This condition needs to be removed, else, as the test shows, it fails again:
| if [ -d "usr/${d}" ]; then | |
| ln -nsd "usr/${d}" "${root}/${d}" | |
| else | |
| mkdir -p "${root}/${d}" | |
| fi | |
| ln -nsd "usr/${d}" "${root}/${d}" |
There was a problem hiding this comment.
Its needed because bookworm/buster/older doesnt have these directories
There was a problem hiding this comment.
Bookworm is as well usr-merged, but right everything below no fully. In that case, below:
mkdir -p "${root}"/{etc/dropbear,root,sys,dev,proc,tmp,usr/{bin,sbin},var/log}=>
mkdir -p "${root}"/{etc/dropbear,root,sys,dev,proc,tmp,usr/{bin,sbin,lib,lib64},var/log}If there are any issues with package installs (like "file X is already in package Y"), then it would need to be done conditional based on Debian version. But the symlinks must be all created on Bookworm and Trixie, else things fail.
There was a problem hiding this comment.
Ah yes, i mixed up the intent and broke what was fixed :D
This comment has been minimized.
This comment has been minimized.
…n :3 preferably maybe update to 15/16
|
/ci try |
This comment has been minimized.
This comment has been minimized.
|
Debian ports supports A bunch of runs failed with 50x and 403 for network requests, most likely due to some rate limiting. It should be possible to rerun only failed jobs directly in the Actions GUI. It does checkout new code for those, only the code of the workflows themselves remains the same. That should speedup test iterations and reduce concurrent network requests to package servers etc. |
This comment has been minimized.
This comment has been minimized.
| if [[ "${arch}" == "riscv64" ]]; then | ||
| # Symlink dynamic loader to /lib/ld-linux-riscv64-lp64d.so.1 | ||
| mkdir -p "${root}/lib" | ||
| ln -s /usr/lib/riscv64-linux-gnu/ld-linux-riscv64-lp64d.so.1 "${root}/lib/ld-linux-riscv64-lp64d.so.1" | ||
| fi | ||
|
|
There was a problem hiding this comment.
This is now redundant (and hence fails) with the usr-merge symlinks being created above already.
There were attempts to update to Ubuntu 22 (#973), and then Ubuntu 24, but that seems to have stopped? Also the dependencies were outdated.
So I updated them, but I can't get it running. I tried to build the Docker image for ARM64 Linux, but it stops in an endless loop. The command line is
cargo build-docker-image aarch64_be-unknown-linux-gnu-cross --tag local.In
crosstool-ng.sh:Please, can anyone give me a hint how to fix that?