Skip to content

0.15.0 build failure with tectonic_bridge_harfbuzz on macOS (Apple Silicon) #1264

@g4titanx

Description

@g4titanx

i'm experiencing build failures when trying to compile a rust project that depends on tectonic 0.15.0 on macOS with Apple Silicon (M1/M2). The specific error occurs in the tectonic_bridge_harfbuzz dependency.

error: failed to run custom build command for `tectonic_bridge_harfbuzz v0.2.9`

Caused by:
  process didn't exit successfully: `/Users/g4titan/noteforge/backend/target/debug/build/tectonic_bridge_harfbuzz-93af2d9e1a93bceb/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /Users/g4titan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tectonic_bridge_harfbuzz-0.2.9/build.rs:143:47:
  failed to copy header: Os { code: 2, kind: NotFound, message: "No such file or directory" }

i've tried:

  • setting PKG_CONFIG_PATH to point to the Homebrew-installed dependencies
  • installing all required dependencies via Homebrew
  • creating symbolic links to the header files
  • setting various environment variables (HARFBUZZ_INCLUDE_DIR, CPATH, etc.)

looking at the build script:
the error occurs at line 143 in the build.rs file for tectonic_bridge_harfbuzz:

// Around line 143
for entry in fs::read_dir(&src_dir).expect("failed to read dir") {
    let entry = entry.expect("failed to get dir entry");
    if entry.path().extension() == Some(OsStr::new("h")) {
        let hdest = dest_dir.join(entry.path().file_name().unwrap());
        fs::copy(entry.path(), hdest).expect("failed to copy header");
    }
}

it seems the build script is trying to copy header files from a source directory, but one or more of those files can't be found.

is there a known fix for this issue? are there specific environment variables I should set to help the build script find the required headers?

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