binding.gyp forces `arm64` on macOS
In binding.gyp, we check whether or not the Clang version is greater than or equal to 12.0.0. This is always true on modern macOS systems. Specifically, anything with macOS 11 or greater would have a version above. macOS 10.15 was released in 2019 and is no longer supported.
The issue is that this line forces arm64 builds, meaning that environments cannot build x64 from source on a modern Mac.
Would you be open to a PR removing this line? This is arguable a bug on modern systems - and anyone still running 10.15 could simply use the existing versions of bufferutil.
https://github.com/websockets/bufferutil/blob/362f677da8445176d63b236534572dff35ab3c2a/binding.gyp#L19-L26
I'm not sure I understand. On an intel mac it builds a universal binary that works both on x64 and arm64. On a modern mac it builds only an arm64 binary. Is the request to allow building a binary on a modern mac that also work on x64? If so we can always build a universal binary by adding -arch x86_64 . See also https://github.com/websockets/bufferutil/commit/3af337566915e9b306c671671939c88fb5ee0ee7.
Untested because I only have an intel mac but I think the following command also works
node-gyp rebuild -arch x86_64
I'm closing this due to inactivity.
I'm not sure I understand. On an intel mac it builds a universal binary that works both on x64 and arm64. On a modern mac it builds only an arm64 binary. Is the request to allow building a binary on a modern mac that also work on x64? If so we can always build a universal binary by adding
-arch x86_64. See also 3af3375.
This is interesting. On my modern Mac (M3 ARM64), I have a use-case to have my project working within Windows. When my project attempts to install bufferutil, it fails with a complaint:
Error: No native build was found for platform=win32 arch=arm64 runtime=node abi=127 uv=1 armv=8 libc=glibc node=22.13.1
npm error loaded from: C:\JIRA\ws\rplus-devtools-ci\node_modules\bufferutil
If win32|arm64 isn't supported, then I suppose that I would need to create a prebuild for this setup? Thanks!