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

add powerpc-musl images #46

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

add powerpc-musl images #46

wants to merge 2 commits into from

Conversation

Emilgardis
Copy link
Member

@dfego
Copy link

dfego commented Nov 27, 2024

Out of curiosity, what's held this back from being merged? Was it incomplete?

@Emilgardis
Copy link
Member Author

There's nothing hindering this, missing from this pr would be a readme change

@dfego
Copy link

dfego commented Nov 27, 2024

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: cross-rs/cross#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!

@Emilgardis
Copy link
Member Author

ah yes, need to add it to the list of targets that need build-std by default

@Emilgardis
Copy link
Member Author

oh wait, this is cross-toolchains, never mind then, not applicable. You need to add

[target.powerpc-unknown-linux-musl]
build-std = true

@dfego
Copy link

dfego commented Nov 27, 2024

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.

@Emilgardis
Copy link
Member Author

Interesting! An example would be helpful

@dfego
Copy link

dfego commented Nov 29, 2024

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)

@dfego
Copy link

dfego commented Nov 29, 2024

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

@Emilgardis
Copy link
Member Author

Yes, that's cross-rs/cross#1416 still don't know how to solve it fully :/

@dfego
Copy link

dfego commented Nov 29, 2024

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.

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.

2 participants