Skip to content
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

Run cargo clean before building for target #61

Closed
wants to merge 1 commit into from

Conversation

gnunicorn
Copy link

Using cross with build scripts breaks sometimes, see cross-rs/cross#39 . By cleaning first, we ensure we don't fail because of reusing build-scripts.

Fixes #60 .

Using cross with build scripts breaks sometimes, see cross-rs/cross#39 . By cleaning first, we ensure we don't fail because of reusing build-scripts.
@johannhof
Copy link
Contributor

That eliminates the effect of caching, so you might as well just remove cache:cargo from your .travis.yml. That way you avoid Travis time for cleaning and caching.

IMO this is a too broad approach that will yield a significant disadvantage (a lot slower build time) to most projects.

To preserve caching for your project maybe consider only not caching the affected files by using directory-based caching (like https://github.com/cobalt-org/cobalt.rs/blob/master/.travis.yml#L49).

@gnunicorn
Copy link
Author

@johannhof agreed. However, I don't understand the build-steps part good enough to actually figure out which parts can and can't be cached. I'd leave the PR open for now, so ppl can find and fix it easily themselves until we have a better solution.

@japaric
Copy link
Owner

japaric commented Feb 22, 2017

cargo clean shouldn't be necessary. The link problem you mention can happen, afaik, in two scenarios

  • Calling cross build with two or more different targets within the same Cargo project.

  • Using cargo build and cross build within the same Cargo project.

Trust doesn't run into any of these situtations, afaik. So you may want to check the modifications you have done to the initial template.

@gnunicorn
Copy link
Author

Ah. then this isn't a usual problem then. Yes, we are running cargo test outside of cross (I wasn't aware that it uses docker internally before digging into it) as the lib in question has integration tests with the system which require packages, they don't run in the docker containers. Not sure how usual that is of a use case...

@japaric
Copy link
Owner

japaric commented Feb 23, 2017

@gnunicorn You can use custom Docker images with cross. You could install the extra stuff you need in those images. Not sure if that would be enough for your case; it depends on the type of integration tests you are running.

@gnunicorn gnunicorn closed this Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Travis: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.18' not found
3 participants