Skip to content

Linux LLVM helper packages ship scriptc-llvm-codegen without the executable bit #430

Closed

Description

@temich

Summary

The Linux LLVM helper packages publish bin/scriptc-llvm-codegen with mode 0644, so every native build on Linux fails right after npm install scriptc:

error SC3003: LLVM native helper package @scriptc/llvm-linux-x64-gnu is incomplete: .../node_modules/@scriptc/llvm-linux-x64-gnu/bin/scriptc-llvm-codegen is not readable and executable; reinstall scriptc

Reinstalling doesn't help. chmod +x on the helper does.

Evidence

$ for p in llvm-linux-x64-gnu llvm-linux-x64-musl llvm-linux-arm64-gnu llvm-darwin-arm64; do npm pack -s @scriptc/$p@0.1.4 >/dev/null; tar tvzf scriptc-$p-0.1.4.tgz | grep bin/; done
-rw-r--r-- 0/0 46432280 1985-10-26 08:15 package/bin/scriptc-llvm-codegen   # linux-x64-gnu
-rw-r--r-- ...                                                               # linux-x64-musl
-rw-r--r-- ...                                                               # linux-arm64-gnu
-rwxr-xr-x ...                                                               # darwin-arm64

@scriptc/llvm-linux-x64-gnu 0.1.2 and 0.1.3 have the same 0644 mode.

Cause

release.yml restores 755 on every bin/scriptc-llvm-codegen before packing, but pnpm pack then normalises file modes: it keeps the executable bit only for files named in the manifest's bin field. packages/llvm-darwin-arm64/package.json declares

"bin": { "scriptc-llvm-codegen": "bin/scriptc-llvm-codegen" }

and the Linux helper manifests don't ("bin" appears only in files). I reproduced this with pnpm 11.1.3 by packing both package directories with a 755 stand-in binary: the darwin tarball kept rwxr-xr-x, and the linux-x64-gnu tarball got rw-r--r--.

scripts/verify-llvm-package.mjs already checks the bin entry and X_OK, but the release job runs it only on the darwin-arm64 tarball, so it can't catch this.

Suggested fix

  • Add the same bin entry to the Linux helper manifests (and win32 for consistency).
  • Run verify-llvm-package.mjs on every helper tarball, not just darwin-arm64.

Environment

scriptc 0.1.4, Ubuntu 26.04 x86_64, Node 24.21.0, npm 11.19.0.

Activity

  1. added a commit that references this issue on Sep 25, 2026
    aaec5df
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