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

Flowistry 0.5.41 fails to cross-compile on Macbook M1 #86

Open
yarrow opened this issue Dec 15, 2023 · 4 comments
Open

Flowistry 0.5.41 fails to cross-compile on Macbook M1 #86

yarrow opened this issue Dec 15, 2023 · 4 comments

Comments

@yarrow
Copy link

yarrow commented Dec 15, 2023

Likely this is because I'm running an x86_64 compiler but asking it to build for Apple silicon. (I've been reluctant to use a Tier 2 compiler since no CI tests are run, so my rustc is x86_64 running under Rosetta; on the other hand, some other projects run better when compiled for Apple silicon. This is the first time I've run into a problem with the setup.)

Flowistry could not run because your project failed to build with error:
error[E0463]: can't find crate for `std`
  |
  = note: the `aarch64-apple-darwin` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-apple-darwin`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0463]: can't find crate for `core`
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/lib.rs:257:13
    |
257 |     pub use core;
    |             ^^^^ can't find crate
    |
    = note: the `aarch64-apple-darwin` target may not be installed
    = help: consider downloading the target with `rustup target add aarch64-apple-darwin`
    = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0463]: can't find crate for `core`
 --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:1:5
  |
1 | use core::{
  |     ^^^^ can't find crate
  |
  = note: the `aarch64-apple-darwin` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-apple-darwin`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0463]: can't find crate for `core`
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:33:5
   |
33 | use core::fmt::{self, Write};
   |     ^^^^ can't find crate
   |
   = note: the `aarch64-apple-darwin` target may not be installed
   = help: consider downloading the target with `rustup target add aarch64-apple-darwin`
   = help: consider building the standard library from source with `cargo build -Zbuild-std`

error: cannot find macro `vec` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:336:25
    |
336 |     let mut distances = vec![0; (a_len + 2) * (b_len + 2)];
    |                         ^^^

error: cannot find macro `write` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:24:9
   |
24 |         write!(fmt, "{}", text)
   |         ^^^^^

error: cannot find macro `write` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:368:21
    |
368 |                       write!(writer, "{:x}", self)
    |                       ^^^^^
...
384 | / impl_bits! {
385 | |     u8, i8,
386 | |     u16, i16,
387 | |     u32, i32,
...   |
390 | |     usize, isize,
391 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `impl_bits` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find attribute `derive` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:13:3
   |
13 | #[derive(Debug, PartialEq)]
   |   ^^^^^^

error: cannot find macro `write` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:374:21
    |
374 |                       write!(writer, "{:x}", self)
    |                       ^^^^^
...
384 | / impl_bits! {
385 | |     u8, i8,
386 | |     u16, i16,
387 | |     u32, i32,
...   |
390 | |     usize, isize,
391 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `impl_bits` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0416]: identifier `None` is bound more than once in the same pattern
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:43:20
   |
43 |             (None, None) => return Ok(count),
   |                    ^^^^ used in a pattern more than once

error: cannot find attribute `derive` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:158:3
    |
158 | #[derive(Debug)]
    |   ^^^^^^

error: cannot find attribute `derive` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:161:3
    |
161 | #[derive(Debug)]
    |   ^^^^^^

error: cannot find macro `write` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:220:17
    |
220 |                 write!(f, "unrecognized named flag")?;
    |                 ^^^^^

error: cannot find macro `write` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:224:21
    |
224 |                     write!(f, " `{}`", _got)?;
    |                     ^^^^^

error: cannot find macro `write` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:230:17
    |
230 |                 write!(f, "invalid hex flag")?;
    |                 ^^^^^

error: cannot find macro `write` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:234:21
    |
234 |                     write!(f, " `{}`", _got)?;
    |                     ^^^^^

error: cannot find macro `write` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:238:17
    |
238 |                 write!(f, "encountered empty flag")?;
    |                 ^^^^^

error[E0412]: cannot find type `Result` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:19:43
   |
19 |     fn fmt(&self, fmt: &mut Formatter) -> Result<(), fmt::Error> {
   |                                           ^^^^^^ not found in this scope

error[E0412]: cannot find type `Result` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:30:26
   |
30 | pub type HammingResult = Result<usize, StrSimError>;
   |                          ^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:35:18
   |
35 |     where Iter1: IntoIterator<Item=Elem1>,
   |                  ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:36:18
   |
36 |           Iter2: IntoIterator<Item=Elem2>,
   |                  ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:37:18
   |
37 |           Elem1: PartialEq<Elem2> {
   |                  ^^^^^^^^^ not found in this scope

error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:42:14
   |
42 |             (Some(x), Some(y)) => if x != y { count += 1 },
   |              ^^^^ not found in this scope

error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:42:23
   |
42 |             (Some(x), Some(y)) => if x != y { count += 1 },
   |                       ^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:66:22
   |
66 |     where &'a Iter1: IntoIterator<Item=Elem1>,
   |                      ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:67:22
   |
67 |           &'b Iter2: IntoIterator<Item=Elem2>,
   |                      ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:68:18
   |
68 |           Elem1: PartialEq<Elem2> {
   |                  ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:135:14
    |
135 | impl<'a, 'b> IntoIterator for &'a StringWrapper<'b> {
    |              ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:159:22
    |
159 |     where &'a Iter1: IntoIterator<Item=Elem1>,
    |                      ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:160:22
    |
160 |           &'b Iter2: IntoIterator<Item=Elem2>,
    |                      ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:161:18
    |
161 |           Elem1: PartialEq<Elem2> {
    |                  ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:201:22
    |
201 |     where &'a Iter1: IntoIterator<Item=Elem1>,
    |                      ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `IntoIterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:202:22
    |
202 |           &'b Iter2: IntoIterator<Item=Elem2>,
    |                      ^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:203:18
    |
203 |           Elem1: PartialEq<Elem2> {
    |                  ^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `Vec` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:208:20
    |
208 |     let mut cache: Vec<usize> = (1..b_len+1).collect();
    |                    ^^^ not found in this scope

error[E0412]: cannot find type `Vec` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:274:33
    |
274 |     let mut prev_two_distances: Vec<usize> = Vec::with_capacity(b_len + 1);
    |                                 ^^^ not found in this scope

error[E0412]: cannot find type `Vec` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:275:29
    |
275 |     let mut prev_distances: Vec<usize> = Vec::with_capacity(b_len + 1);
    |                             ^^^ not found in this scope

error[E0412]: cannot find type `Vec` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:276:29
    |
276 |     let mut curr_distances: Vec<usize> = Vec::with_capacity(b_len + 1);
    |                             ^^^ not found in this scope

error[E0405]: cannot find trait `Eq` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:328:17
    |
328 |     where Elem: Eq + Hash + Clone {
    |                 ^^ not found in this scope

error[E0405]: cannot find trait `Clone` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:328:29
    |
328 |     where Elem: Eq + Hash + Clone {
    |                             ^^^^^ not found in this scope

error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:357:17
    |
357 |                 Some(&value) => value,
    |                 ^^^^ not found in this scope

error[E0412]: cannot find type `Vec` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:391:18
    |
391 |     let (x, y): (Vec<_>, Vec<_>) = (a.chars().collect(), b.chars().collect());
    |                  ^^^ not found in this scope

error[E0412]: cannot find type `Vec` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:391:26
    |
391 |     let (x, y): (Vec<_>, Vec<_>) = (a.chars().collect(), b.chars().collect());
    |                          ^^^ not found in this scope

error[E0405]: cannot find trait `Iterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:415:29
    |
415 | fn bigrams(s: &str) -> impl Iterator<Item=(char, char)> + '_ {
    |                             ^^^^^^^^ not found in this scope

error[E0412]: cannot find type `String` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:437:12
    |
437 |     let a: String = a.chars().filter(|&x| !char::is_whitespace(x)).collect();
    |            ^^^^^^ not found in this scope

error[E0412]: cannot find type `String` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:438:12
    |
438 |     let b: String = b.chars().filter(|&x| !char::is_whitespace(x)).collect();
    |            ^^^^^^ not found in this scope

error[E0433]: failed to resolve: use of undeclared type `Vec`
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:84:26
   |
84 |     let mut b_consumed = Vec::with_capacity(b_len);
   |                          ^^^ use of undeclared type `Vec`

error[E0433]: failed to resolve: use of undeclared type `Vec`
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:274:46
    |
274 |     let mut prev_two_distances: Vec<usize> = Vec::with_capacity(b_len + 1);
    |                                              ^^^ use of undeclared type `Vec`

error[E0433]: failed to resolve: use of undeclared type `Vec`
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:275:42
    |
275 |     let mut prev_distances: Vec<usize> = Vec::with_capacity(b_len + 1);
    |                                          ^^^ use of undeclared type `Vec`

error[E0433]: failed to resolve: use of undeclared type `Vec`
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:276:42
    |
276 |     let mut curr_distances: Vec<usize> = Vec::with_capacity(b_len + 1);
    |                                          ^^^ use of undeclared type `Vec`

error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:43:36
   |
43 |             (None, None) => return Ok(count),
   |                                    ^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs:44:25
   |
44 |             _ => return Err(StrSimError::DifferentLengthArgs),
   |                         ^^^ not found in this scope

Some errors have detailed explanations: E0405, E0412, E0416, E0425, E0433, E0463, E0531.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `strsim` (lib) due to 40 previous errors
error[E0463]: can't find crate for `std`
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:247:6
    |
247 | impl std::error::Error for ParseError {}
    |      ^^^ can't find crate
    |
    = note: the `aarch64-apple-darwin` target may not be installed
    = help: consider downloading the target with `rustup target add aarch64-apple-darwin`
    = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0405]: cannot find trait `Iterator` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:38:16
   |
38 | impl<B: Flags> Iterator for Iter<B> {
   |                ^^^^^^^^ not found in this scope

error[E0412]: cannot find type `Option` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:41:27
   |
41 |     fn next(&mut self) -> Option<Self::Item> {
   |                           ^^^^^^ not found in this scope

error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:43:13
   |
43 |             Some((_, flag)) => Some(flag),
   |             ^^^^ not found in this scope

error[E0405]: cannot find trait `Iterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:107:16
    |
107 | impl<B: Flags> Iterator for IterNames<B> {
    |                ^^^^^^^^ not found in this scope

error[E0412]: cannot find type `Option` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:110:27
    |
110 |     fn next(&mut self) -> Option<Self::Item> {
    |                           ^^^^^^ not found in this scope

error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:111:19
    |
111 |         while let Some(flag) = self.flags.get(self.idx) {
    |                   ^^^^ not found in this scope

error[E0425]: cannot find value `None` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:114:24
    |
114 |                 return None;
    |                        ^^^^ not found in this scope

error[E0425]: cannot find value `None` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:143:9
    |
143 |         None
    |         ^^^^ not found in this scope

error[E0412]: cannot find type `Result` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:42:66
   |
42 | pub fn to_writer<B: Flags>(flags: &B, mut writer: impl Write) -> Result<(), fmt::Error>
   |                                                                  ^^^^^^ not found in this scope

error[E0412]: cannot find type `Result` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:97:43
   |
97 | pub fn from_str<B: Flags>(input: &str) -> Result<B, ParseError>
   |                                           ^^^^^^ not found in this scope

error[E0531]: cannot find tuple struct or tuple variant `Some` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:118:34
    |
118 |         let parsed_flag = if let Some(flag) = flag.strip_prefix("0x") {
    |                                  ^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:154:15
    |
154 |         Self: Sized;
    |               ^^^^^ not found in this scope

error[E0412]: cannot find type `Result` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:152:34
    |
152 |     fn parse_hex(input: &str) -> Result<Self, ParseError>
    |                                  ^^^^^^ not found in this scope

error[E0412]: cannot find type `String` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:169:14
    |
169 |         got: String,
    |              ^^^^^^ not found in this scope

error[E0412]: cannot find type `String` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:175:14
    |
175 |         got: String,
    |              ^^^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:131:18
    |
131 | pub trait Flags: Sized + 'static {
    |                  ^^^^^ not found in this scope

error[E0412]: cannot find type `Option` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:162:39
    |
162 |     fn from_bits(bits: Self::Bits) -> Option<Self> {
    |                                       ^^^^^^ not found in this scope

error[E0425]: cannot find value `None` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:168:13
    |
168 |             None
    |             ^^^^ not found in this scope

error[E0412]: cannot find type `Option` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:184:33
    |
184 |     fn from_name(name: &str) -> Option<Self> {
    |                                 ^^^^^^ not found in this scope

error[E0425]: cannot find value `None` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:187:20
    |
187 |             return None;
    |                    ^^^^ not found in this scope

error[E0425]: cannot find value `None` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:196:9
    |
196 |         None
    |         ^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:230:15
    |
230 |         Self: Sized,
    |               ^^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:238:15
    |
238 |         Self: Sized,
    |               ^^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:246:15
    |
246 |         Self: Sized,
    |               ^^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:257:15
    |
257 |         Self: Sized,
    |               ^^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:265:15
    |
265 |         Self: Sized,
    |               ^^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:273:15
    |
273 |         Self: Sized,
    |               ^^^^^ not found in this scope

error[E0405]: cannot find trait `Clone` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:320:5
    |
320 |     Clone
    |     ^^^^^ not found in this scope

error[E0405]: cannot find trait `Copy` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:321:7
    |
321 |     + Copy
    |       ^^^^ not found in this scope

error[E0405]: cannot find trait `PartialEq` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:322:7
    |
322 |     + PartialEq
    |       ^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Sized` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:327:7
    |
327 |     + Sized
    |       ^^^^^ not found in this scope

error[E0412]: cannot find type `Result` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:355:46
    |
355 |                   fn parse_hex(input: &str) -> Result<Self, ParseError> {
    |                                                ^^^^^^ not found in this scope
...
384 | / impl_bits! {
385 | |     u8, i8,
386 | |     u16, i16,
387 | |     u32, i32,
...   |
390 | |     usize, isize,
391 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `impl_bits` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `Result` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:361:46
    |
361 |                   fn parse_hex(input: &str) -> Result<Self, ParseError> {
    |                                                ^^^^^^ not found in this scope
...
384 | / impl_bits! {
385 | |     u8, i8,
386 | |     u16, i16,
387 | |     u32, i32,
...   |
390 | |     usize, isize,
391 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `impl_bits` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0405]: cannot find trait `Iterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:407:16
    |
407 |     type Iter: Iterator<Item = Self>;
    |                ^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Iterator` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:410:21
    |
410 |     type IterNames: Iterator<Item = (&'static str, Self)>;
    |                     ^^^^^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:43:32
   |
43 |             Some((_, flag)) => Some(flag),
   |                                ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
  --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:51:21
   |
51 |                     Some(B::from_bits_retain(self.inner.remaining.bits()))
   |                     ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/iter.rs:139:24
    |
139 |                 return Some((flag.name(), B::from_bits_retain(bits)));
    |                        ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:105:16
    |
105 |         return Ok(parsed_flags);
    |                ^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Err` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:113:20
    |
113 |             return Err(ParseError::empty_flag());
    |                    ^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:134:5
    |
134 |     Ok(parsed_flags)
    |     ^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Ok` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/parser.rs:242:9
    |
242 |         Ok(())
    |         ^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:166:13
    |
166 |             Some(truncated)
    |             ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope
   --> /Users/yarrow/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.4.1/src/traits.rs:192:24
    |
192 |                 return Some(Self::from_bits_retain(flag.value().bits()));
    |                        ^^^^ not found in this scope

Some errors have detailed explanations: E0405, E0412, E0425, E0463, E0531.
error: could not compile `bitflags` (lib) due to 58 previous errors
@willcrichton willcrichton changed the title Flowistry 0.5.41 fails to build on Macbook M1 Flowistry 0.5.41 fails to cross-compile on Macbook M1 Dec 15, 2023
@willcrichton
Copy link
Owner

Hi @yarrow, thanks for the report. I believe this is a fundamental limitation to using code that links against the compiler via #![feature(rustc_private)]. It's the same reason I can't yet produce Flowistry binaries for ARM -- GitHub does not offer ARM runners. I don't believe there's any way to cross-compile rustc_private code at the moment, but I will update this thread if that changes.

@yarrow
Copy link
Author

yarrow commented Dec 16, 2023

Thanks! I've checked, and Flowistry does work if I create a .cargo/config.toml file in a project where I want to use it, with:

[build]
target = "x86_64-apple-darwin"

(overriding the global target = "aarch64-apple-darwin" in my ~/.cargo/config.toml

@willcrichton
Copy link
Owner

Wait sorry -- are you trying to use x86-compiled Flowistry? Or are you trying to use ARM-compiled Flowistry on x86-targeted code?

I just tried cross-compiling Flowistry on my laptop and still got an error:

$ rustup toolchain install nightly-2023-08-25 -c rust-src rustc-dev llvm-tools-preview miri --target x86_64-apple-darwin
<works fine>
$ cargo build --release --target x86_64-apple-darwin
<snip>
error[E0463]: can't find crate for `rustc_driver`
 --> /Users/will/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexical-0.3.1/src/impls/rustc.rs:1:1
  |
1 | extern crate rustc_driver;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

@yarrow
Copy link
Author

yarrow commented Jan 7, 2024

Flowistry works in Rosetta mode if I compile my project for x86 and use x86-compiled Flowistry with the x86-compiled rustc.

(I usually use the x86 rustc in Rosetta mode with an aarch64-apple-darwin target — I want to use a Tier 1 compiler but produce binaries that run faster on my machine.)

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

2 participants