-
Notifications
You must be signed in to change notification settings - Fork 379
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
cross metadata
target_dir does not match target dir used during build
#1397
Comments
I'm a bit confused as to what you expect this to do. The path reported is correct for the binaries running inside the container engine, and I dont see how we would be able to change it since all we do is call |
I expect |
They are referencing the same directory. Just mounted differently in the container. |
Taking a step back, my issue is that I want to retrieve the path of the binary after My idea is the following: the host and container target directories are mapped. I can query However, for this to work; the target dir must be mounted in the same place for both I posted the full commands and logs at https://gist.github.com/demurgos/77188279ee51de1f5af06d22c020b045 |
I'll look into this a bit more, I think you may be correct that this is unexpected. Ideally though, this should probably be done with |
Checklist
Describe your issue
Running
CROSS_REMOTE=1 cross metadata
prints/target
as thetarget_directory
value. This does not match the directory used in practice.What target(s) are you cross-compiling for?
No response
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5 (4282f2f 2023-12-27)
Example
I am writing a script to automate cross-compilation of [one of my projects]. As part of this, I want to find the output binary and move copy it for packaging.
To achieve this, I run
cross build
with the--message-format=json
option to get the build path. In my case,cross build
yields"/cross/data/projects/eternaltwin/etwin/bin/target/x86_64-unknown-linux-gnu/release/eternaltwin"
.This implies that the target directory used by the build is
/cross/data/projects/eternaltwin/etwin/bin/target
. However, when I runCROSS_REMOTE=1 cross metadata
then I get/target
for the target directory.https://gist.github.com/demurgos/77188279ee51de1f5af06d22c020b045
This discrepancy makes it impossible to reliably find the path of the executable relative to the target directory.
Additional information / notes
Also tested on
This was the first version with a fix for #1218; but the issue is already present there.
The text was updated successfully, but these errors were encountered: