-
Notifications
You must be signed in to change notification settings - Fork 394
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
Update Ubuntu (and therefore Qemu) Version #557
Comments
Relates to #517 |
The system packages for Focal (20.04) are still at 4.2.X, and v6.1.0 of Qemu has recently been released, and there's been numerous bug fixes in 5.X and 6.X. Since we already build from source, it should be trivial to update the local versions and enure all targets build. |
@VictorKoenders How recent is the version you are running? It should be fixed in Qemu versions, although I'm not sure a cross-rs release has been published since then, as shown in #586. |
I think my issue is closer related to #644 |
we're using 5.1.0 on upstream cross right now, try using that instead while we get ready for a release.
or point the image you're using to the newest (unreleased) image [target.{{target}}]
image = "ghcr.io/cross-rs/{{target}}:edge" |
@VictorKoenders They're related (I know from the Qemu bug tracker): the floating point implementation was somewhat bugged in older versions of Qemu, and pinning it to v3.0.1 (which I did) fixed some issues but causes other ones that existed in 4.x. In Qemu versions 5.x+, (I believe) all of these are fixed. So unpinning the older version of Qemu and using a suitable, modern version should fix these issues (which is done in upstream). You can test upstream or compile and use a system installation of a modern Qemu version to test. (Right now I'm getting relocation errors on my home PC cross-compiling and don't have time to test). |
@Emilgardis Also this PR is ready but is waiting on the merge of #593, since 2 of the images fail with interactive installed due to |
The latest Qemu release contains numerous bug fixes, and other improvements, and the existing patches various issues reported in older Qemu versions. The only changes required are incrementing the Qemu version and adding ninja-build as a temporary dependency, since Qemu now uses it for the build system. However, Ubuntu 16.04, the base image for numerous dependencies we use, still ships with Python3.5, and Qemu 6.1.0 requires Python3.6+, as well as the ninja-build system. We therefore add a check to see if we have a compatible Python version, and if we do, build the last Qemu version, so our code can be fully backwards-compatible. Fixes cross-rs#557. Closes cross-rs#587.
The latest Qemu release contains numerous bug fixes, and other improvements, and the existing patches various issues reported in older Qemu versions. The only changes required are incrementing the Qemu version and adding ninja-build as a temporary dependency, since Qemu now uses it for the build system. However, Ubuntu 16.04, the base image for numerous dependencies we use, still ships with Python3.5, and Qemu 6.1.0 requires Python3.6+, as well as the ninja-build system. We therefore add a check to see if we have a compatible Python version, and if we do, build the last Qemu version, so our code can be fully backwards-compatible. Fixes cross-rs#557. Closes cross-rs#587.
591: Update all GNU docker images to latest LTS version on Docker. r=Emilgardis a=Alexhuszagh Increment Ubuntu base image versions to 20.04. Update linux-image script to latest kernel and debian versions. Update by default to kernel version 5.10.0-8. This means updating our debian source to bullseye from buster. 32-bit big-endian mips was discontinued in bullseye, so we revert to buster. For some images, due to constantly updating linux kernel versions, we need to use wildcards otherwise the build step breaks. Since there may be more than one relevant package, we've added a function to manually expand wildcards and select the best kernel version, `max_kernel_version`. Likewise, on 32-bit big-endian mips, we need to specify the ncurses version. Created temporary symlinks for autconf and autom4te due to the build expecting a hard-coded version (2.69) of these binaries. Fixed the patch for `debian/rules` due to changed line numbers. Updated the patch to use dwarf rather than sjlj exceptions to patch the template file (`debian/gcc-mingw-w64-i686.install.in`) since `debian/gcc-mingw-w64-i686.install` is overwritten during the build. For `x86_64-unknown-linux-gnu`, building the linux image fails unless we download specific versions of `libgcc-s1` and `libstdc++6`, since the pre-installed Ubuntu versions are higher than the Debian versions. We therefore extract the specific versions. However, while building the linux image, it prefers these system versions, so we must uninstall them or else while running `qemu-system` it cannot find `libgcc_s1.so.1`. Since `apt` and basically every other package besides `dpkg` relies on `libgcc-s1`, we have to temporarily delete it and reinstall it. Closes #616. Closes #557. We've already addressed the Qemu fixes, which will be applied automatically. Closes #517. Closes #417. Replaces #481. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
591: Update all GNU docker images to latest LTS version on Docker. r=Emilgardis a=Alexhuszagh Increment Ubuntu base image versions to 20.04. Update linux-image script to latest kernel and debian versions. Update by default to kernel version 5.10.0-8. This means updating our debian source to bullseye from buster. 32-bit big-endian mips was discontinued in bullseye, so we revert to buster. For some images, due to constantly updating linux kernel versions, we need to use wildcards otherwise the build step breaks. Since there may be more than one relevant package, we've added a function to manually expand wildcards and select the best kernel version, `max_kernel_version`. Likewise, on 32-bit big-endian mips, we need to specify the ncurses version. Created temporary symlinks for autconf and autom4te due to the build expecting a hard-coded version (2.69) of these binaries. Fixed the patch for `debian/rules` due to changed line numbers. Updated the patch to use dwarf rather than sjlj exceptions to patch the template file (`debian/gcc-mingw-w64-i686.install.in`) since `debian/gcc-mingw-w64-i686.install` is overwritten during the build. For `x86_64-unknown-linux-gnu`, building the linux image fails unless we download specific versions of `libgcc-s1` and `libstdc++6`, since the pre-installed Ubuntu versions are higher than the Debian versions. We therefore extract the specific versions. However, while building the linux image, it prefers these system versions, so we must uninstall them or else while running `qemu-system` it cannot find `libgcc_s1.so.1`. Since `apt` and basically every other package besides `dpkg` relies on `libgcc-s1`, we have to temporarily delete it and reinstall it. Closes #616. Closes #557. We've already addressed the Qemu fixes, which will be applied automatically. Closes #517. Closes #417. Replaces #481. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
591: Update all GNU docker images to latest LTS version on Docker. r=Emilgardis a=Alexhuszagh Increment Ubuntu base image versions to 20.04. Update linux-image script to latest kernel and debian versions. Update by default to kernel version 5.10.0-8. This means updating our debian source to bullseye from buster. 32-bit big-endian mips was discontinued in bullseye, so we revert to buster. For some images, due to constantly updating linux kernel versions, we need to use wildcards otherwise the build step breaks. Since there may be more than one relevant package, we've added a function to manually expand wildcards and select the best kernel version, `max_kernel_version`. Likewise, on 32-bit big-endian mips, we need to specify the ncurses version. Created temporary symlinks for autconf and autom4te due to the build expecting a hard-coded version (2.69) of these binaries. Fixed the patch for `debian/rules` due to changed line numbers. Updated the patch to use dwarf rather than sjlj exceptions to patch the template file (`debian/gcc-mingw-w64-i686.install.in`) since `debian/gcc-mingw-w64-i686.install` is overwritten during the build. For `x86_64-unknown-linux-gnu`, building the linux image fails unless we download specific versions of `libgcc-s1` and `libstdc++6`, since the pre-installed Ubuntu versions are higher than the Debian versions. We therefore extract the specific versions. However, while building the linux image, it prefers these system versions, so we must uninstall them or else while running `qemu-system` it cannot find `libgcc_s1.so.1`. Since `apt` and basically every other package besides `dpkg` relies on `libgcc-s1`, we have to temporarily delete it and reinstall it. Closes #616. Closes #557. We've already addressed the Qemu fixes, which will be applied automatically. Closes #517. Closes #417. Replaces #481. Co-authored-by: Alex Huszagh <ahuszagh@gmail.com>
Currently, on images provided by cross v0.2.1, we get the following after loading into the image:
Cross Information:
Image Information
The latest LTS version for Ubuntu is
20.04
, which has newer versions of important dependencies, such as Qemu.Issue
This actually matters, as numerous bugs, such as for float-point emulation, have been fixed in newer Qemu versions:
In addition, here's a sample code snippet that fails on Qemu 3.0.1 but works on Qemu 4.2.1:
If we run the above using Qemu 3.0.1, we get:
If we run the above using Qemu 4.2.1, we get:
In short, we have a rounding error of 1 ULP due to cross using outdated Ubuntu (and therefore Qemu) versions. Ideally, we'd use version 6.0.1 or v5.0.0 (the latter requiring the following PPA, the former requiring compiling from source).
The text was updated successfully, but these errors were encountered: