Repository navigation
Description
Hi!
I'm unable to install the headless-gl package under the latest version of OSX, tried with node 24 and node 22, the error seems to come from the version of python requested for the build I think ?
anyways, I hope you can help :)
he're the build output
------- cut here -------
.../node_modules/headless-gl install$ prebuild --install
.../node_modules/headless-gl install: prebuild info begin Prebuild version 5.1.2
.../node_modules/headless-gl install: prebuild ERR! configure error
.../node_modules/headless-gl install: prebuild ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
.../node_modules/headless-gl install: prebuild ERR! stack at PythonFinder.failNoPython (/Users/myuser/node_modules/.pnpm/node-gyp@3.8.0/node_modules/node-gyp/lib/configure.js:484:19)
.../node_modules/headless-gl install: prebuild ERR! stack at PythonFinder. (/Users/myuser/node_modules/.pnpm/node-gyp@3.8.0/node_modules/node-gyp/lib/configure.js:406:16)
.../node_modules/headless-gl install: prebuild ERR! stack at F (/Users/myuser/node_modules/.pnpm/which@1.3.1/node_modules/which/which.js:68:16)
.../node_modules/headless-gl install: prebuild ERR! stack at E (/Users/myuser/node_modules/.pnpm/which@1.3.1/node_modules/which/which.js:80:29)
.../node_modules/headless-gl install: prebuild ERR! stack at /Users/myuser/node_modules/.pnpm/which@1.3.1/node_modules/which/which.js:89:16
.../node_modules/headless-gl install: prebuild ERR! stack at /Users/myuser/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js:42:5
.../node_modules/headless-gl install: prebuild ERR! stack at /Users/myuser/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js:8:5
.../node_modules/headless-gl install: prebuild ERR! stack at FSReqCallback.oncomplete (node:fs:194:21)
.../node_modules/headless-gl install: prebuild ERR! not ok
.../node_modules/headless-gl install: prebuild ERR! build Error: Can't find Python executable "python", you can set the PYTHON env variable.
.../node_modules/headless-gl install: prebuild ERR! build at PythonFinder.failNoPython (/Users/myuser/node_modules/.pnpm/node-gyp@3.8.0/node_modules/node-gyp/lib/configure.js:484:19)
.../node_modules/headless-gl install: prebuild ERR! build at PythonFinder. (/Users/myuser/node_modules/.pnpm/node-gyp@3.8.0/node_modules/node-gyp/lib/configure.js:406:16)
.../node_modules/headless-gl install: prebuild ERR! build at F (/Users/myuser/node_modules/.pnpm/which@1.3.1/node_modules/which/which.js:68:16)
.../node_modules/headless-gl install: prebuild ERR! build at E (/Users/myuser/node_modules/.pnpm/which@1.3.1/node_modules/which/which.js:80:29)
.../node_modules/headless-gl install: prebuild ERR! build at /Users/myuser/node_modules/.pnpm/which@1.3.1/node_modules/which/which.js:89:16
.../node_modules/headless-gl install: prebuild ERR! build at /Users/myuser/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js:42:5
.../node_modules/headless-gl install: prebuild ERR! build at /Users/myuser/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js:8:5
.../node_modules/headless-gl install: prebuild ERR! build at FSReqCallback.oncomplete (node:fs:194:21)
.../node_modules/headless-gl install: Failed
------- cut here -------
then I changed the environment to use python3 (which is the one installed) and here's the result
------- cut here -------
../../node_modules/.pnpm/headless-gl@3.0.7/node_modules/headless-gl: Running install script, failed in 2s
.../node_modules/headless-gl install$ prebuild --install
│ prebuild info begin Prebuild version 5.1.2
│ (node:44926) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.
│ (Use node --trace-deprecation ... to show where the warning was created)
│ prebuild ERR! configure error
│ prebuild ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
│ prebuild ERR! stack File "", line 1
│ prebuild ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
│ prebuild ERR! stack ^
│ prebuild ERR! stack SyntaxError: invalid syntax
│ prebuild ERR! stack
│ prebuild ERR! stack at genericNodeError (node:internal/errors:985:15)
│ prebuild ERR! stack at wrappedFn (node:internal/errors:539:14)
│ prebuild ERR! stack at ChildProcess.exithandler (node:child_process:417:12)
│ prebuild ERR! stack at ChildProcess.emit (node:events:508:28)
│ prebuild ERR! stack at maybeClose (node:internal/child_process:1101:16)
│ prebuild ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
│ prebuild ERR! not ok
│ prebuild ERR! build Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
│ prebuild ERR! build File "", line 1
│ prebuild ERR! build import sys; print "%s.%s.%s" % sys.version_info[:3];
│ prebuild ERR! build ^
│ prebuild ERR! build SyntaxError: invalid syntax
│ prebuild ERR! build
│ prebuild ERR! build at genericNodeError (node:internal/errors:985:15)
│ prebuild ERR! build at wrappedFn (node:internal/errors:539:14)
│ prebuild ERR! build at ChildProcess.exithandler (node:child_process:417:12)
│ prebuild ERR! build at ChildProcess.emit (node:events:508:28)
│ prebuild ERR! build at maybeClose (node:internal/child_process:1101:16)
│ prebuild ERR! build at ChildProcess._handle.onexit (node:internal/child_process:305:5)
------- cut here -------
Thanks!
Activity
dhritzkiv commentedon Jan 25, 2026
Hi! From your logs, it looks like you are trying to install/build version 3.0.7, which likely doesn't support python3, as that version of headless-gl is several years old. Please correct me if I'm wrong.
Can you try a more recent version? The v9 release candidate supports building under macOS Tahoe in particular.
rushlet commentedon Apr 10, 2026
We're trying to use headless-gl in a Node 24 + macOS Tahoe (Darwin 25.4.0, Xcode 16, Apple Silicon arm64) environment and hitting a compilation failure with v9.0.0-rc.9. The issue comment suggested v9 RC would fix this, but we're still
seeing it. Is there a newer RC or a workaround available or something else we should try?
Environment: Darwin 25.4.0, arm64, Xcode 16.0, Node v24.13.0 (ABI 137), node-gyp v12.2.0
dhritzkiv commentedon Apr 10, 2026
@rushlet I've released a new RC version that updates some build dependencies, though I suspect they don't address the issues you were having. As part of the RC release, I've also added testing on macOS 15 as well as on macOS 26 to show that it should build on those platforms.
rushlet commentedon Apr 15, 2026
Hey @dhritzkiv
Thanks for looking into that so quickly.
We dug into this a bit more and it looks like the issue is specifically with Apple's bundled clang 16 (Xcode 16), which doesn't implement
__builtin_clzg/__builtin_ctzg. These builtins were added in LLVM 19, but Apple's clang 16 is based on an earlier LLVM.The Tahoe SDK's libc++ headers (
__bit/countl.h,__bit/countr.h) reference these builtins - so the build fails even though they're standard C++20 headers. See llvm/llvm-project#86556.Our workaround: building with Homebrew LLVM instead of Apple clang succeeds on Tahoe:
Got it working for us, hope it helps anyone else who might be running into issues