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

Update rust resolving TARGET=HOST build issues #5446

Merged
merged 4 commits into from
Aug 3, 2021

Conversation

heitbaum
Copy link
Contributor

@heitbaum heitbaum commented Jun 19, 2021

PR that fixes the rust TARGET=HOST build issues

  • librespot: fix build where TARGET=HOST with rust 1.54
  • system-tools: update to (124)
  • bottom: fix build where TARGET=HOST with rust 1.54
  • rust: use nightly until 1.54 is released

this was tested with nightly-x86_64-unknown-linux-gnu installed - rustc 1.55.0-nightly (ce1d5611a 2021-06-18)

no planned to be pulled into master until 1.54 is released - 29th July 2021

@jameshilliard
Copy link
Contributor

jameshilliard commented Aug 1, 2021

FYI you can use this now in 1.54.0 stable, you just have to set this undocumented env variable to enable nightly features in the stable channel: __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly", something like this.

@heitbaum
Copy link
Contributor Author

heitbaum commented Aug 2, 2021

With @jameshilliard ‘s help and __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" this can now be merged using the stable release of rust - 1.54.0

There should be no issues with updating rust to future versions - but will need to keep a watch on rust-lang/cargo#9753 - at which time the target-applies-to-host option will need to be incorporated without the -Z nightly.

It has been tested building librespot and bottom on

PROJECT=Generic ARCH=x86_64 TARGET_CPU=tigerlake IMAGE_SUFFIX=tigerlake
PROJECT=Rockchip ARCH=aarch64 DEVICE=RK3399 UBOOT_SYSTEM=rock-pi-n10
PROJECT=Rockchip ARCH=arm DEVICE=RK3568 UBOOT_SYSTEM=roc-pc

Until target-applies-to-host is incorporated into stable this
"target-applies-to-host" option is required for a matching
host-target triple to be compiled by the cross compiler.

Read more here:
https://doc.rust-lang.org/cargo/reference/unstable.html#target-applies-to-host

When rust-lang/cargo merges the following and it is released - then this "rust"
package will need to be revisted if it is bumped.
- Stabilize target-applies-to-host feature. #9753

The following are the rust-lang/cargo PRs that made this possible:
- Configure hosts separately from targets when --target is specified. #9322
- Tracking Issue for target-applies-to-host #9453
@heitbaum heitbaum marked this pull request as ready for review August 2, 2021 14:03
Copy link
Member

@CvH CvH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it works :)

@jameshilliard
Copy link
Contributor

I found a cleaner way to do this in #6104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] rust fails to build ytop and librespot when cross compiling on host=target arch
3 participants