Skip to content

pak 0.11.2 ignores installed packages on R-devel macOS arm64 and rebuilds them from source #926

Closed

Description

@thisisnic

I drafted this with Claude but reviewed before posting and had it run a load of stuff to try to reproduce so I think this is accurate.


🤖 :

With pak 0.11.2 on R-devel (4.7.0) macOS arm64, pak ignores packages that are already installed and builds them from source. For us this means the Matrix that ships with R gets rebuilt, which fails with 'libintl.h' file not found.

We see it in Apache Arrow's nightly test-r-m1-san job, which uses setup-r@v2 with r-version: devel and then setup-r-dependencies@v2:

  • Last passing run (2026-11-08, pak 0.11.1): the lockfile has Matrix as "type": "installed"
  • Failing run (2026-11-15, pak 0.11.2): the lockfile has Matrix as "type": "standard", followed by Building Matrix 1.7-6. It has failed every night since 2026-11-09.

The cause looks like a platform name mismatch. Since r-lib/pkgcache#144, the current platform on R-devel macOS arm64 is aarch64-apple-darwin23-macos.binary.arm64 (code). Installed packages still get their platform from Built, which is aarch64-apple-darwin23. platform_is_ok() needs an exact match on macOS, so the installed copy is ruled out. Linux has a prefix rule for this case; macOS does not.

Not reproduced on a Mac, but it does reproduce on Linux with pak 0.11.2 by forcing the platform. A package whose Built platform is aarch64-apple-darwin23 resolves as:

  • "type": "installed" with PKG_CURRENT_PLATFORM=aarch64-apple-darwin23
  • "type": "standard" with PKG_CURRENT_PLATFORM=aarch64-apple-darwin23-macos.binary.arm64

Activity

  1. added a commit that references this issue on Nov 16, 2026
    45e53c1
  2. gaborcsardi commented on Nov 16, 2026

    @gaborcsardi
    Member

    This should be fix in the devel ("nightly") build later today. Can you use that? Let me know if you still see problems.

  3. thisisnic commented on Nov 17, 2026

    @thisisnic
    Author

    Can confirm it works. Thanks for fixing this so quickly!

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