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

Publish more images #32

Open
mcandre opened this issue Mar 27, 2023 · 3 comments
Open

Publish more images #32

mcandre opened this issue Mar 27, 2023 · 3 comments

Comments

@mcandre
Copy link

mcandre commented Mar 27, 2023

When I try to consume cross-toolchains images, then Docker often complains of missing images from the GHCR.

$ cat Cross.toml
[target.aarch64-pc-windows-msvc]
image = "ghcr.io/cross-rs/aarch64-pc-windows-msvc:local"

$ cross build --target aarch64-pc-windows-msvc
Unable to find image 'ghcr.io/cross-rs/aarch64-pc-windows-msvc:local' locally
docker: Error response from daemon: Head "https://ghcr.io/v2/cross-rs/aarch64-pc-windows-msvc/manifests/local": denied.
See 'docker run --help'.
@Emilgardis
Copy link
Member

Emilgardis commented Mar 27, 2023

You need to build them yourself according to the instructions.

git clone https://github.com/cross-rs/cross
cd cross
git submodule update --init --remote
cargo build-docker-image <target>-cross --tag local

we don't host these images because they are too large, too specific, legal reasons or break often.

@mcandre
Copy link
Author

mcandre commented Apr 1, 2023

I am curious.

The Go compiler is able to build Apple targets as a built-in feature. The Go user does not need to manually build Docker images for this.

I'll accept that rustc and cargo do not have the same level of completeness regarding stock cross-compilation ability. But I am unsure why cross[-toolchains] considers it a legal issue to self publish the Docker images. How does Go get away with it? Why can't cross[-toolchains] similarly publish its artifacts?

Is there another way of implementing cross, or of implementing the Docker images, that would allow cross-toolchains to publish its images?

@Emilgardis
Copy link
Member

the issue is republishing the toolchains for c/c++ and linking, go doesn't need to do that because it doesn't use them.

This could maybe be solved with another backend for codegeneration and linking.

So, the problem with MSVC is that Visual Studio isn't distributable, so a docker image with it inside is neither.
The problem with Darwin/apple is that the SDK is needed, and we can't distribute that either.

Does that explain it?

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

No branches or pull requests

2 participants