cross-toolchains
cross-toolchains copied to clipboard
add powerpc-musl images
requires cross-rs/cross#1346
Out of curiosity, what's held this back from being merged? Was it incomplete?
There's nothing hindering this, missing from this pr would be a readme change
I grabbed it to see if it would work for me out of the box, and when going to compile a program I get errors like the ones in this issue: https://github.com/cross-rs/cross/issues/1416
Interestingly, I also get:
[cross] warning: rust-std is not available for powerpc-unknown-linux-musl
[cross] note: you may need to build components for the target via `-Z build-std=<components>` or in your cross configuration specify `target.powerpc-unknown-linux-musl.build-std`
the available components are core, std, alloc, and proc_macro
Even though I've already got that. I don't know a ton about the inner workings here, but could potentially try some specific things out if it would help get this merged!
ah yes, need to add it to the list of targets that need build-std by default
oh wait, this is cross-toolchains, never mind then, not applicable. You need to add
[target.powerpc-unknown-linux-musl]
build-std = true
So I've been using docker-in-docker and was having issues with the build-std parameter getting picked up consistently, so I've been passing it via the cross command line, a la:
-Z build-std=core,std,alloc,proc_macro,panic_abort -Z build-std-features=optimize_for_size,panic_immediate_abort
That's been working for all my other builds consistently. I've tried this with both the latest release and the main branch of cross-rs.
If it would help, I can try and do a hello minimal example of it not working. That might help me make sure I'm not doing anything weird or wrong either.
Interesting! An example would be helpful
I'm currently setting up a small repository with a complete example, but as I am, I wanted to note that after I call:
cargo build-docker-image powerpc-unknown-linux-musl-cross --tag local
I get the following warning, which may or may not be important?
1 warning found (use docker --debug to expand):
- UndefinedVar: Usage of undefined variable '$PKG_CONFIG_PATH' (line 25)
Alright, I've got a pretty minimal example. I thought about just pasting the README here, but since perhaps there might lie an issue in another part of my setup, I figured I'd link to the whole thing: https://github.com/dfego/cross-issue
Yes, that's cross-rs/cross#1416 still don't know how to solve it fully :/
So I did see that issue, but I've also successfully gotten mips-unknown-linux-musl to work for me, using the git version of cross and in Cross.toml:
[target.mips-unknown-linux-musl]
image = "ghcr.io/cross-rs/mips-unknown-linux-musl:main"
[target.mipsel-unknown-linux-musl]
image = "ghcr.io/cross-rs/mipsel-unknown-linux-musl:main"
Notably, I can't do that with powerpc-unknown-linux-musl because there is no image for me to pull.