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

Can't cross-compile to some targets anymore #306

Closed
CryZe opened this issue Sep 6, 2019 · 19 comments
Closed

Can't cross-compile to some targets anymore #306

CryZe opened this issue Sep 6, 2019 · 19 comments

Comments

@CryZe
Copy link
Contributor

CryZe commented Sep 6, 2019

This might be more of a question, but some of the targets that I've successfully been cross-compiling to with cross / trust on CI are now erroring like this:

error: cross does not provide docker image for x86_64-unknown-linux-gnux32 target, specify a custom image in Cross.toml

These have always worked before though, so is this a regression?

@CryZe
Copy link
Contributor Author

CryZe commented Sep 6, 2019

What I believe is happening here is that cross sometimes didn't even need to pull the images, but now there is an error check way earlier that errors out, despite there not being a need for the image.

@CryZe
Copy link
Contributor Author

CryZe commented Sep 6, 2019

Weirdly enough I have yet to figure out the exact pattern for this. Because somehow cross can still cross-compile to wasm32-unknown-unknown even though there is no docker image. But for others it can't?

@reitermarkus
Copy link
Member

Yeah, is_supported should check if the host supports compiling the target natively, or alternatively needs_docker should take the host into consideration.

@CryZe
Copy link
Contributor Author

CryZe commented Sep 6, 2019

So how do I work around this? Clearly not all linux targets need docker (or something?) but the error appears anyway due to needs_docker() returning true.

@reitermarkus
Copy link
Member

So how do I work around this?

There's no workaround, but this is definitely a bug which needs to be fixed.

@CryZe
Copy link
Contributor Author

CryZe commented Sep 6, 2019

I believe this is maybe because I'm cross compiling as static and shared libraries, so maybe the actual specific linker for the platform (and thus the whole docker image) isn't necessary?

@reitermarkus
Copy link
Member

Which targets apart from x86_64-unknown-linux-gnux32 are failing?

@CryZe
Copy link
Contributor Author

CryZe commented Sep 6, 2019

I'm currently doing a clean CI run atm (there were other issues mixed in in my previous run, such as Travis CI having spurious timeouts and some other compilation bug I caused). I'll respond with a full list of targets that are now rejected soon.

@CryZe
Copy link
Contributor Author

CryZe commented Sep 6, 2019

Alright so here are all the failures: https://travis-ci.org/LiveSplit/livesplit-core/builds/581619442

  • x86_64-unknown-linux-gnux32 (Fixed in Add x86_64-unknown-linux-gnux32. #308)
  • armv5te-unknown-linux-gnueabi (does not provide docker image)
  • powerpc64le-unknown-linux-gnu (Fixed in Fix default runner. #307)
  • i686-unknown-freebsd (Unable to find image)
  • x86_64-unknown-freebsd (Unable to find image)
  • asmjs-unknown-emscripten (Unable to find image)

Interestingly wasm32-unknown-emscripten actually got fixed by the latest cross.

@kurojishi
Copy link

+1 we are hitting the same issue with:

https://travis-ci.org/awslabs/flowgger/builds/581609924

i686-unknown-freebsd (Unable to find image)
x86_64-unknown-freebsd (Unable to find image)

@reitermarkus
Copy link
Member

I'm not sure a armv5te-unknown-linux-gnueabi image ever existed, so no idea how this was working before.

For the other images which are missing: These were disabled because they don't build anymore and no-one has bothered to fix them. So you can either drop support for them too or send a PR to fix them.

@CryZe
Copy link
Contributor Author

CryZe commented Sep 6, 2019

Yeah that's why I was saying that I don't think I even need the proper linkers and thus docker images to build for these targets as I only build static and shared libraries (which maybe cargo doesn't need a linker for?). I'm not entirely sure. But it definitely worked before.

Pretty sure the asmjs target should work if the wasm32-emscripten one does. So I bet that's just a matter of activating it on cross' side again. I'm fine with dropping the armv5te target, not sure about the freebsd ones, but I could temporarily drop them too.

@vishaltelangre
Copy link

Facing similar issue. Failing to compile for following targets.

  • powerpc64le-unknown-linux-gnu
  • i686-unknown-freebsd
  • x86_64-unknown-freebsd

The debug information/log is available at https://travis-ci.org/vishaltelangre/ff/builds/581675207 for these targets.

vishaltelangre added a commit to vishaltelangre/ff that referenced this issue Sep 6, 2019
@kurojishi
Copy link

The README still lists them:

https://github.com/rust-embedded/cross/blob/master/README.md

We are dropping the freebsd targets too

kurojishi added a commit to amazon-archives/flowgger-hold that referenced this issue Sep 6, 2019
kurojishi added a commit to amazon-archives/flowgger-hold that referenced this issue Sep 6, 2019
kurojishi added a commit to amazon-archives/flowgger-hold that referenced this issue Sep 6, 2019
@CryZe
Copy link
Contributor Author

CryZe commented Sep 9, 2019

@reitermarkus Do you know what supposedly is wrong with asmjs-unknown-emscripten? Cause I can't think of a reason why it should be disabled.

@reitermarkus
Copy link
Member

It was disabled in #231, probably because of https://travis-ci.org/rust-embedded/cross/builds/455974395.

@CryZe
Copy link
Contributor Author

CryZe commented Sep 9, 2019

Yes, but the intention with #230 was to enable them again. And considering the wasm one works again and is part of 0.1.15, the asmjs one should work just fine. I assume you thought the PR was only for wasm or something, so only wasm was enabled again, despite asmjs likely working as well again since the PR is for both.

@reitermarkus
Copy link
Member

the intention with #230 was to enable them again

Yep, and no one has bothered to to that as of yet.

so only wasm was enabled again

The wasm one was never completely disabled but pinned to a very old nightly Rust. Arguably it should be disabled since the CPP and RUN tests are disabled. The same is probably true for asmjs.

@CryZe
Copy link
Contributor Author

CryZe commented Sep 11, 2019

Is there a plan for a 0.1.16 soon (or I guess 0.1.15.1 if that's a thing) with the fixes? (asmjs missing, ppc64le test runner broken, too new qemu for some tests, incompatibility with GitHub Actions, ...)

autarch added a commit to houseabsolute/precious that referenced this issue Sep 11, 2019
This is no longer supported by the cross project. See
cross-rs/cross#306 for discussion.
brandur added a commit to brandur/redis-cell that referenced this issue Apr 5, 2020
Apparently the Rust Cross project doesn't support FreeBSD anymore:

cross-rs/cross#274
cross-rs/cross#306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants