Summary
npm run test2 fails on Intel Macs because the CI script assumes the ARM homebrew path for libomp.
Steps to Reproduce
- Intel Mac (x86_64) with homebrew at
/usr/local/
brew install libomp
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
Summary
npm run test2fails on Intel Macs because the CI script assumes the ARM homebrew path for libomp.Steps to Reproduce
/usr/local/brew install libompnpm run test2Error
Expected
The script should detect the correct homebrew prefix:
/opt/homebrew//usr/local/Actual Location
Suggested Fix
Use
$(brew --prefix)instead of hardcoded path:LIBOMP_PATH="$(brew --prefix libomp)/lib/libomp.dylib"Or detect architecture:
Environment