Skip to content

build: libomp path assumes ARM homebrew (/opt/homebrew) - fails on x86 Mac #2

Description

@ababber

Summary

npm run test2 fails on Intel Macs because the CI script assumes the ARM homebrew path for libomp.

Steps to Reproduce

  1. Intel Mac (x86_64) with homebrew at /usr/local/
  2. brew install libomp
  3. npm run test2

Error

cp: /opt/homebrew/opt/libomp/lib/libomp.dylib: No such file or directory

Expected

The script should detect the correct homebrew prefix:

  • ARM: /opt/homebrew/
  • Intel: /usr/local/

Actual Location

$ ls -la /usr/local/opt/libomp/lib/libomp.dylib
-r--r--r--  1 ankit  admin  688256 Mar 27 06:47 /usr/local/opt/libomp/lib/libomp.dylib

Suggested Fix

Use $(brew --prefix) instead of hardcoded path:

LIBOMP_PATH="$(brew --prefix libomp)/lib/libomp.dylib"

Or detect architecture:

if [[ $(uname -m) == "arm64" ]]; then
    BREW_PREFIX="/opt/homebrew"
else
    BREW_PREFIX="/usr/local"
fi

Environment

  • macOS Sonoma (darwin 25.4.0)
  • x86_64
  • Node.js v25.8.1
  • Apple clang 21.0.0

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