Skip to content

Build fails on macOS ARM64 with Apple Clang 17 when compiling libffi #186

@MatthewScargill

Description

@MatthewScargill

A fresh clone of KIFMM fails to build on macOS Apple Silicon (M1). The build stops while compiling the bundled version of libffi used by libffi-sys v2.3.0. It looks like the ARM64 assembly included with libffi 3.2.0 isn’t compatible. Would updating libffi / libffi-sys or using the system libffi be a possible fix?

Error:

/var/folders/c3/y73s8rn52hq33whs6qvg2yjh0000gn/T/sysv-6a9612.s:27:2: error: invalid CFI advance_loc expression
.cfi_def_cfa x1, 40;
^
/var/folders/c3/y73s8rn52hq33whs6qvg2yjh0000gn/T/sysv-6a9612.s:188:2: error: invalid CFI advance_loc expression
.cfi_adjust_cfa_offset (8*2 + (8 * 16 + 8 * 8) + 64)
^
make[2]: *** [src/aarch64/sysv.lo] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

thread 'main' panicked at /Users/matthewscargill/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libffi-sys-2.3.0/build/common.rs:8:5:
Building libffi

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