Skip to content

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

Closed
@mister-walter

Description

@mister-walter

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/hub.490633.xyz-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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions