-
Notifications
You must be signed in to change notification settings - Fork 421
Updated Docker image to Ubuntu-24.04 and Cargo dependencies #1580
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
base: main
Are you sure you want to change the base?
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-dev I 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-dev But 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 |
…hains - which is 1.88.0
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.
…d64 repositories, removed commented out xargo code in Dockerfiles
So should I just remove the commented out code completely? Anyway: I cracked it! 😄!The problem is with Ubuntu 24 and how it treats missing packages for requested architectures ( So, you must add the architectures to each source (in ubuntu.sources), like this:
It saves you also time, because it won't look in the wrong places where the packages don't exist anyway. So, instead of adding this to all my Dockerfiles, I added this to the end of each of cross's aarch64 Dockerfile:
This is a prepared |
Well done @JanDiederich!! Thank you for persisting with this. Great job! |
I'm sorry, I should have realized this earlier.. That's essentially what I do here: #751 (comment) with |
Maybe, but that's outdated now. With Ubuntu 24 the Edit: Oh, and maybe the old Compilation and runningAfter a long time I got my first cross-compilation running again, under my always up-to-date Ubuntu 24 and installed it on my always up-to-date Raspberry Pi OS and... It didn't work. This was the first time I had a glibc version conflict, I solved it by manually compiling and installing the specific glibc version 2.39 on my Raspberry Pi - which supports out-of-the-box only glibc 2.36. Like this: Compilation and installationsudo apt install build-essential wget tar
sudo apt install gawk bison
wget http://ftp.gnu.org/gnu/libc/glibc-2.39.tar.gz
tar -xvzf glibc-2.39.tar.gz
cd glibc-2.39
mkdir build
cd build
../configure --prefix=/opt/glibc-2.39
make -j$(nproc)
sudo make install Run program/opt/glibc-2.39/lib/ld-linux-aarch64.so.1 --library-path /opt/glibc-2.39/lib:/usr/lib/aarch64-linux-gnu ./your_program I write this as a help for others, and also because I saw a |
@Emilgardis As I wrote myself, I neither know all supported architectures, nor am I a Linux professional. But I think most people here are also no general experts in this fields. But they know their stuff and have an idea how to get it working. So my suggestion is: You merge this into an "edge" branch, release that, and let the people Pull-Request this into a polished final version. |
I dont think an edge branch approach is necessary, if the image doesnt build then the previous build will be used. I'll have a closer look at this PR, probably submit some patches myself and then merge. Thank you! /ci try |
This comment has been minimized.
This comment has been minimized.
Ill reiterate here also why I'm considering merging this pr now before releasing 0.3.0. The ubuntu version we're currently using on main is not maintained now, and trying to patch the tools and repos to make it work is a bigger pain for maintaining the project, therefore the approach of updating the base version of ubuntu is much more attractive to further the development and hopefully then finally push 0.3.0 of cross once all images we want are compliant |
Well, I'm all for it. |
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?