-
Notifications
You must be signed in to change notification settings - Fork 382
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
Config in Cargo.toml: invalid type: map, expected a string for key target.x86_64-unknown-freebsd.image
#1182
Comments
Alright, that was wrong, it's a bit more "wierd". When merging, we create a Line 213 in 1d9d310
this works fine in most cases, however, when the serialization does not match the deserialization, this fails when they do not match (i.e it can be either a toml string or array). Solution is to serialize Lines 104 to 117 in 1d9d310
|
Wow, super fast fix. Thank you! After putting the config back in $ rm -f Cross.toml
$ cargo install cross --git https://github.com/Emilgardis/cross --branch fix-1182
$ cross --version
cross 0.2.4 (6a57d01 2023-01-06)
[cross] warning: `cross` does not provide a Docker image for target aarch64-apple-darwin, specify a custom image in `Cross.toml`.
[cross] note: Falling back to `cargo` on the host.
cargo 1.66.0 (d65d197ad 2022-11-15)
$ cross build --target x86_64-unknown-freebsd --release
Finished release [optimized] target(s) in 1.41s
$ file target/x86_64-unknown-freebsd/release/hello-world-pfsense
target/x86_64-unknown-freebsd/release/hello-world-pfsense: ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.4, FreeBSD-style, stripped
$ scp target/x86_64-unknown-freebsd/release/hello-world-pfsense router:/tmp
hello-world-pfsense 100% 275KB 1.4MB/s 00:00
$ ssh router /tmp/hello-world-pfsense
Hello, world! I'm not sure about the warning (EDIT: I guess it's just a warning, probably not be a good idea to have it try to parse the config in order to silence the warning in a version check), but it seems to work! |
This error is back. $ tail -n 3 Cargo.toml
[package.metadata.cross.target.x86_64-unknown-freebsd]
image.name = "ghcr.io/cross-rs/x86_64-unknown-freebsd:local"
image.toolchain = ["linux/arm64/v8=aarch64-unknown-linux-gnu"]
$ cross --version
cross 0.2.5
Error:
0: invalid type: map, expected a string for key `target.x86_64-unknown-freebsd.image` Based on the docs it looks like EDIT: Only getting this from crates.io, installing from git seems to work. |
+1 |
Checklist
Describe your issue
Related: #657
What target(s) are you cross-compiling for?
x86_64-unknown-freebsd
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.4
Example
Using cross 0.2.4 from nixpkgs or crates.io, I get:
Using cross from
main
, I get a different error:If I instead put (what I believe to be) the analogous table into
Cross.toml
, I get the same error with nixpkgs and crates.io but it works fine frommain
:Using the current
main
, as recommended in the README, is it expected that this table works fromCross.toml
but not fromCargo.toml
?Thanks for your work on a cool project!
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: