Comments (5)
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.
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.
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.
Ran into the same issue running trust (see link above). Adding cargo clean
before running cross build
appears to fix it.
from cross.
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)
- Investigate bindgen woes - "file not found" HOT 7
- FreeBSD 12 is EoL, update to 13 HOT 1
- `cross metadata` target_dir does not match target dir used during build HOT 5
- cannot install mips-unknown-linux-musl, and 'rustup target --list | grep mips' is empty HOT 1
- Building a custom `initrd` with the `linux-image.sh` script of the docker image fails on powerpc64 HOT 2
- loongarch64 support
- Set `PKG_CONFIG_ALLOW_CROSS=1` inside our dockerfiles instead of on invocation of docker HOT 3
- Unable to `-Zbuild-std` for `mips-unknown-linux-musl` HOT 18
- Fix mips-*-musl HOT 1
- Fix `riscv64gc-unknown-linux-gnu` HOT 2
- Fix `*-solaris`
- Fix zig image
- can't find crate for `std` error for mips-unknown-linux-musl target HOT 2
- `cross-util run` can't access the file in host FS if there is symlink in the file's path HOT 2
- `GLIBC_2.29` not found in `ghcr.io/cross-rs/aarch64-unknown-linux-musl:0.2.5` HOT 1
- Compiling to x86_64-unknown-linux-gnu with alsa using libudev dependency HOT 2
- x86_64-pc-windows-msvc Link error with very large number of objects HOT 4
- error while loading shared libraries: libLLVM-17-rust-1.75.0-stable.so for stable rust HOT 3
- `cross build --target x86_64-pc-windows-gnu` fails HOT 16
- Move docs/wiki to mdBook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cross.