Skip to content

Compilation error on macOS 13.2.1, M2 processor #110

Closed

Description

@ndaniels

Trying to compile with rustc 1.68 (stable) on macOS 13.2.1 on Apple Silicon, I get the following compilation error:

error: failed to run custom build command for `typst-cli v0.0.0 (/Users/noah/Downloads/typst-22-03-21-2/cli)`

Caused by:
  process didn't exit successfully: `/Users/noah/Downloads/typst-22-03-21-2/target/release/build/typst-cli-b26a6417ca33703c/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'byte index 8 is out of bounds of ``', cli/build.rs:7:48
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Activity

  1. CGMossa commented on Mar 22, 2023

    @CGMossa
    Contributor

    Can you run this with the added flag -vv just so I can see what is going on?

  2. ndaniels commented on Mar 22, 2023

    @ndaniels
    Author

    Sparing you all the noise; here's the last bit:

       Compiling codespan-reporting v0.11.1
         Running `CARGO=/Users/noah/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo CARGO_CRATE_NAME=codespan_reporting CARGO_MANIFEST_DIR=/Users/noah/.cargo/registry/src/index.crates.io-6f17d22bba15001f/codespan-reporting-0.11.1 CARGO_PKG_AUTHORS='Brendan Zabarauskas <[email protected]>' CARGO_PKG_DESCRIPTION='Beautiful diagnostic reporting for text-based programming languages' CARGO_PKG_HOMEPAGE='https://github.com/brendanzab/codespan' CARGO_PKG_LICENSE=Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=codespan-reporting CARGO_PKG_README=../README.md CARGO_PKG_REPOSITORY='https://github.com/brendanzab/codespan' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.11.1 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=11 CARGO_PKG_VERSION_PATCH=1 CARGO_PKG_VERSION_PRE='' DYLD_FALLBACK_LIBRARY_PATH='/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps:/Users/noah/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/noah/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/noah/lib:/usr/local/lib:/usr/lib' rustc --crate-name codespan_reporting --edition=2018 /Users/noah/.cargo/registry/src/index.crates.io-6f17d22bba15001f/codespan-reporting-0.11.1/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=107 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=a1e7b2544316aed6 -C extra-filename=-a1e7b2544316aed6 --out-dir '/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps' -L 'dependency=/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps' --extern 'termcolor=/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps/libtermcolor-2c033293249681f0.rmeta' --extern 'unicode_width=/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps/libunicode_width-8bf8129c5d0ae63c.rmeta' --cap-lints warn`
         Running `/Users/noah/Downloads/typst-22-03-21-2 2/target/release/build/typst-cli-b26a6417ca33703c/build-script-build`
    [typst-cli 0.0.0] thread 'main' panicked at 'byte index 8 is out of bounds of ``', cli/build.rs:7:48
    [typst-cli 0.0.0] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    error: failed to run custom build command for `typst-cli v0.0.0 (/Users/noah/Downloads/typst-22-03-21-2 2/cli)`
    
    Caused by:
      process didn't exit successfully: `/Users/noah/Downloads/typst-22-03-21-2 2/target/release/build/typst-cli-b26a6417ca33703c/build-script-build` (exit status: 101)
      --- stderr
      thread 'main' panicked at 'byte index 8 is out of bounds of ``', cli/build.rs:7:48
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    warning: build failed, waiting for other jobs to finish...
    

    and with a backtrace enabled:

         Running `/Users/noah/Downloads/typst-22-03-21-2 2/target/release/build/typst-cli-b26a6417ca33703c/build-script-build`
         Running `CARGO=/Users/noah/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo CARGO_CRATE_NAME=memmap2 CARGO_MANIFEST_DIR=/Users/noah/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memmap2-0.5.10 CARGO_PKG_AUTHORS='Dan Burkert <[email protected]>:Yevhenii Reizner <[email protected]>' CARGO_PKG_DESCRIPTION='Cross-platform Rust API for memory-mapped file IO' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=memmap2 CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/RazrFalcon/memmap2-rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.5.10 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_VERSION_PATCH=10 CARGO_PKG_VERSION_PRE='' DYLD_FALLBACK_LIBRARY_PATH='/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps:/Users/noah/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/noah/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/noah/lib:/usr/local/lib:/usr/lib' rustc --crate-name memmap2 --edition=2018 /Users/noah/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memmap2-0.5.10/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=107 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=6439924180cc85d7 -C extra-filename=-6439924180cc85d7 --out-dir '/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps' -L 'dependency=/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps' --extern 'libc=/Users/noah/Downloads/typst-22-03-21-2 2/target/release/deps/liblibc-733cfc0338da307d.rmeta' --cap-lints warn`
    [typst-cli 0.0.0] thread 'main' panicked at 'byte index 8 is out of bounds of ``', cli/build.rs:7:48
    [typst-cli 0.0.0] stack backtrace:
    [typst-cli 0.0.0]    0: rust_begin_unwind
    [typst-cli 0.0.0]              at /rustc/1db9c061d387a66ab16a90ec5a1b90adf216e2da/library/std/src/panicking.rs:579:5
    [typst-cli 0.0.0]    1: core::panicking::panic_fmt
    [typst-cli 0.0.0]              at /rustc/1db9c061d387a66ab16a90ec5a1b90adf216e2da/library/core/src/panicking.rs:64:14
    [typst-cli 0.0.0]    2: core::str::slice_error_fail_rt
    [typst-cli 0.0.0]    3: core::str::slice_error_fail
    [typst-cli 0.0.0]              at /rustc/1db9c061d387a66ab16a90ec5a1b90adf216e2da/library/core/src/str/mod.rs:86:9
    [typst-cli 0.0.0]    4: core::str::traits::<impl core::slice::index::SliceIndex<str> for core::ops::range::RangeTo<usize>>::index
    [typst-cli 0.0.0]    5: core::str::traits::<impl core::ops::index::Index<I> for str>::index
    [typst-cli 0.0.0]    6: build_script_build::main
    [typst-cli 0.0.0]    7: core::ops::function::FnOnce::call_once
    [typst-cli 0.0.0] note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    error: failed to run custom build command for `typst-cli v0.0.0 (/Users/noah/Downloads/typst-22-03-21-2 2/cli)`
    note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
    
    Caused by:
      process didn't exit successfully: `/Users/noah/Downloads/typst-22-03-21-2 2/target/release/build/typst-cli-b26a6417ca33703c/build-script-build` (exit status: 101)
      --- stderr
      thread 'main' panicked at 'byte index 8 is out of bounds of ``', cli/build.rs:7:48
      stack backtrace:
         0: rust_begin_unwind
                   at /rustc/1db9c061d387a66ab16a90ec5a1b90adf216e2da/library/std/src/panicking.rs:579:5
         1: core::panicking::panic_fmt
                   at /rustc/1db9c061d387a66ab16a90ec5a1b90adf216e2da/library/core/src/panicking.rs:64:14
         2: core::str::slice_error_fail_rt
         3: core::str::slice_error_fail
                   at /rustc/1db9c061d387a66ab16a90ec5a1b90adf216e2da/library/core/src/str/mod.rs:86:9
         4: core::str::traits::<impl core::slice::index::SliceIndex<str> for core::ops::range::RangeTo<usize>>::index
         5: core::str::traits::<impl core::ops::index::Index<I> for str>::index
         6: build_script_build::main
         7: core::ops::function::FnOnce::call_once
      note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    warning: build failed, waiting for other jobs to finish...
    
  3. CGMossa commented on Mar 22, 2023

    @CGMossa
    Contributor

    Can you run git rev-parse HEAD in your cloned repository folder and see what the output is?

  4. ndaniels commented on Mar 22, 2023

    @ndaniels
    Author
  5. CGMossa commented on Mar 22, 2023

    @CGMossa
    Contributor

    Sooo... I'd consider this solved then.

  6. ndaniels commented on Mar 22, 2023

    @ndaniels
    Author

    Yes, I'd say.

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

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