-
Notifications
You must be signed in to change notification settings - Fork 407
Relax insistence that cargo project is mounted read-only #145
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
Comments
I have a similar problem with a Project which uses bindgen. The build.rs needs to compile the C lib within a subdir of the repo. |
I've submitted a PR that might fix this. Hard to tell without any kind of testing harness. Might want to check that PR out and see if it fixes it for you. |
Yes, that's the change that I made locally when I was doing this. |
@dimbleby Couldn't you just copy the C library to the OUT_DIR, and run |
Or in other words, I pretty much have ended up agreeing with the defaults that the project directory should be immutable. If you need to do "mutating" work, copying/linking stuff into the |
I think what we have in my example is an awkward collision between Rust and not-Rust cultures:
Your suggested workaround of copying It makes perfect sense to me that I had forgotten all about this issue until your comment yesterday, so this certainly isn't important to me. Feel free to declare that I am wrong and just ought to be using |
I clashed with this yesterday as well. I tried to do the work in place, and crashed against Rust/cargo/cross defaults. After finding a work around for this issue, the "copy to
I wasn't suggesting to close this issue or anything, just sharing a potential workaround that I thought might work for you (and others) for the time being. My IIRC CMake doesn't have a way to enforce that the project directory is read only, so you can actually modify it but if you do so "some things might not work", so in the past I have actively tried to avoid that there, and yet I was, trying to do the opposite here 😆 |
Looks like cargo has decided to play hardball on this one - rust-lang/cargo#5584. So I guess we all are going to have to go along with Rust conventions, like it or not - and Therefore suggest close this one out. |
People from the future: no matter what you want to do/change in your source / cross-root directory during your build, the path of least resistance is to just copy / set up whatever you need into the target directory. The target directory can be accessed as:
If you want to:
|
I'm having a go at cross-compiling rust-c-ares.
To build the underlying C library, the first step is to run buildconf which:
c-ares
checkoutconfigure
script... which is unfortunate for trying to get it to work with
cross
, because the file system is mounted read-only.Any chance of relaxing that, perhaps via some opt-in option if you want to maintain current behaviour as default?
(Also: it would be nice if the Docker images would
apt-get install automake libtool m4
so that I didn't have to make my own docker image, but this is not a big deal).The text was updated successfully, but these errors were encountered: