Git Product home page Git Product logo

Comments (5)

japaric avatar japaric commented on May 4, 2024 3

Actually, I think this is not a problem specific to the error-chain crate but with any crate that involves build scripts. The problem is that Cargo caches and shares the build scripts (the executables) across the different cross compilation target directories, which is actually a good thing but causes problems when combined with several cross environments.

To illustrate:

$ cargo new --bin foo && cd $_
$ cargo add error-chain
$ cross build --target x86_64-unknown-linux-gnu
$ cross build --target mips-unknown-linux-gnu

Here the build script was compiled within the x86_64 environment and was linked to glibc-2.15. Then the second cross build reuses that build script. No problem because the mips environment contains glibc-2.23. However, if you swap the commands

$ cargo clean
$ cross build --target mips-unknown-linux-gnu
$ cross build --target x86_64-unknown-linux-gnu

Here the build script was compiled on the mips environment and it's linked to glibc-2.23. Then the second cross build reuses that build script but it runs it inside an environment that only has glibc-2.15. That's what causes problems with undefined symbols.

from cross.

japaric avatar japaric commented on May 4, 2024 1

The workaround is to cargo clean if you are going to use several cross environment in a single Cargo project. rm **/build-script-build may do the trick as well. That or order your cross build commands to build the build scripts against the environment with the oldest glibc.

from cross.

shaunmulligan avatar shaunmulligan commented on May 4, 2024

upgrading the docker base to ubuntu:14.04 and setting all the curl calls to use --insecure (I know its a bad idea 😄 ) seems to have done the trick and I can now use error-chain 👍

from cross.

gnunicorn avatar gnunicorn commented on May 4, 2024

Ran into the same issue running trust (see link above). Adding cargo clean before running cross build appears to fix it.

from cross.

Alexhuszagh avatar Alexhuszagh commented on May 4, 2024

We've updated the images to 16.04 and soon will be updating the to 20.04 in v0.3.0 (see #591), and documented how to use those images based on Ubuntu 20.04 earlier in the wiki.

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.