Skip to content

Build issue OSX Tahoe 26.2 #328

Open

Description

@boggan

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

  1. dhritzkiv commented on Jan 25, 2026

    @dhritzkiv
    Member

    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.

  2. rushlet commented on Apr 10, 2026

    @rushlet

    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

      Build error:
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit/countl.h:28:10: error: use of undeclared identifier '__builtin_clzg'
      /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit/countr.h:28:10: error: use of undeclared identifier '__builtin_ctzg'
      make: *** [Release/obj.target/webgl/src/native/bindings.o] Error 1
      gyp ERR! build error
      gyp ERR! System Darwin 25.4.0
      gyp ERR! node -v v24.13.0
      gyp ERR! node-gyp -v v12.2.0
    
  3. dhritzkiv commented on Apr 10, 2026

    @dhritzkiv
    Member

    @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.

  4. rushlet commented on Apr 15, 2026

    @rushlet

    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:

    brew install llvm
      CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ npx node-gyp rebuild
    

    Got it working for us, hope it helps anyone else who might be running into issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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