Git Product home page Git Product logo

Comments (4)

Emilgardis avatar Emilgardis commented on June 8, 2024 1

We provide a unknown-linux-gnu centos7 images to make this easier, however it uses ld 2.27

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

we also have integration with cargo-zigbuild which lets you choose glibc version, https://github.com/cross-rs/cross/wiki/Configuration#buildzig

from cross.

Emilgardis avatar Emilgardis commented on June 8, 2024

the latest images works, using ld 2.34

$ CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE="ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main" \ 
  cross-util run --target x86_64-unknown-linux-gnu -- "ld --version"
GNU ld (GNU Binutils for Ubuntu) 2.34

Make sure that ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main is actually updated, cross doesn't pull in the latest images for a tag like main/edge

$ docker pull ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
docker pull ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
main: Pulling from cross-rs/x86_64-unknown-linux-gnu
edaedc954fb5: Already exists           
3ba6a39e216b: Pull complete
ceb9f63710c9: Pull complete
b09634800521: Pull complete
6c70d1c0e806: Pull complete
8b1d4c95c4a4: Pull complete
c710eb4c7c4b: Pull complete
da0191c7c407: Pull complete
0e1376e6048d: Pull complete
fb5bccee428c: Pull complete
913a127e772e: Pull complete
44e47dfe46b9: Pull complete
2a23a22cb021: Pull complete
f204b9544051: Pull complete
Digest: sha256:30235811948871aef514c986f0f991fa9b56385910210038d8354e9bf63d06e2
Status: Downloaded newer image for ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
$ docker image ls ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main     
REPOSITORY                                  TAG       IMAGE ID       CREATED        SIZE
ghcr.io/cross-rs/x86_64-unknown-linux-gnu   main      396b40224753   38 hours ago   1.46GB

To solve this, you can either use below workaround to update the image cross uses, or use cross installed from main (and ensuring that the image is updated).

Quick workaround for users on 0.2.5, note that cross 0.2.5 has Ubuntu 16.04, newer cross uses Ubuntu 20.04.

env:

# set to latest image
CROSS_TARGET_X86_64_UNKNOWN_LINUX_GNU_IMAGE=ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main

config:

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

Or

# Cargo.toml
[package.metadata.cross.target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"

from cross.

Emilgardis avatar Emilgardis commented on June 8, 2024

closed by accident

from cross.

VorpalBlade avatar VorpalBlade commented on June 8, 2024

Upgrading the default distro is however not a great idea either. Since you need to build on a sufficiently old version of glibc to not get errors when trying to run the binary on other distros (notably: stable Debian, RHEL/CentOS). Some care is needed to ensure that this doesn't break.

from cross.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.