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

compiler_builtins fails to compile due to using recently stabilized cfg_target_vendor #13

Closed
mister-walter opened this issue May 13, 2019 · 5 comments

Comments

@mister-walter
Copy link

mister-walter commented May 13, 2019

I'm not sure if this belongs here or on the main avr-rust/rust repo, but just wanted to post this here in case it's helpful to anyone else.

I'm using Xargo on Arch Linux with the latest commit of the avr-rust/rust master branch.

I managed to get past avr-rust/rust-legacy-fork#128 using hercek's patches, but building compiler_builtins failed because of a use of the cfg_config_vendor feature. That feature was stabilized earlier this year, but the it looks like the AVR patched Rust version hasn't pulled upstream since the stabilization.

To fix this, I simply modified the downloaded source for lib.rs in compiler_builtins in the Cargo registry folder (~/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.12/src/lib.rs on my machine), adding the missing #![feature(cfg_target_vendor)] line to the existing feature flags in that file.

I also get a message that indicates that it might be possible to set a version for compiler_builtins, though I wasn't able to figure out how:
warning: dependency (compiler_builtins) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions

The last version of compiler_builtins that has the cfg_target_vendor feature flag appears to be 0.1.5. (relevant commit)

More version info:

$ rustup run avr-toolchain xargo -V
xargo 0.3.14
cargo 1.36.0-nightly (6be12653d 2019-04-19)

$ rustup run avr-toolchain rustc -V
rustc 1.33.0-dev
@Rahix
Copy link

Rahix commented May 26, 2019

I was able to get it working by creating a Xargo.toml with the following contents:

[dependencies.core]
stage = 0

[dependencies.compiler_builtins]
stage = 1
version = "= 0.1.3"

@dylanmckay
Copy link
Member

I guess this would be fixed by avr-rust/rust-legacy-fork#137

@Rahix
Copy link

Rahix commented May 28, 2019

Yes, I believe so. Any rough estimate, when that update is going to hit? / Is there a list of blocking issues that still need work?

@dylanmckay
Copy link
Member

At the moment, the only issue blocking the merge is this bug

LLVM ERROR: Cannot select: t2: i16 = addrspacecast[1 -> 0] undef:i16

mentioned in this comment.

@stappersg
Copy link
Member

At the moment, the only issue blocking the merge is this bug

LLVM ERROR: Cannot select: t2: i16 = addrspacecast[1 -> 0] undef:i16

mentioned in this comment.

That merge did happen.
Closing this issue about xargo. Lots of things changed since the opening of this issue.

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

4 participants