Skip to content

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

Closed
@CryZe

Description

@CryZe
Contributor

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?

Activity

CryZe

CryZe commented on Sep 6, 2019

@CryZe
ContributorAuthor

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

CryZe commented on Sep 6, 2019

@CryZe
ContributorAuthor

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

reitermarkus commented on Sep 6, 2019

@reitermarkus
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

CryZe commented on Sep 6, 2019

@CryZe
ContributorAuthor

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

reitermarkus commented on Sep 6, 2019

@reitermarkus
Member

So how do I work around this?

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

CryZe

CryZe commented on Sep 6, 2019

@CryZe
ContributorAuthor

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

reitermarkus commented on Sep 6, 2019

@reitermarkus
Member

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

CryZe

CryZe commented on Sep 6, 2019

@CryZe
ContributorAuthor

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

CryZe commented on Sep 6, 2019

@CryZe
ContributorAuthor

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

kurojishi commented on Sep 6, 2019

@kurojishi

+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

reitermarkus commented on Sep 6, 2019

@reitermarkus
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

CryZe commented on Sep 6, 2019

@CryZe
ContributorAuthor

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.

21 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kurojishi@vishaltelangre@reitermarkus@CryZe@Alexhuszagh

        Issue actions

          Can't cross-compile to some targets anymore · Issue #306 · cross-rs/cross