Skip to content

Fix macOS cross-compilation in PPM; add missing yaml dummy package#874

Merged
gaborcsardi merged 4 commits into
r-lib:mainfrom
glin:fix/cross-compile-libpaths
May 1, 2026
Merged

Fix macOS cross-compilation in PPM; add missing yaml dummy package#874
gaborcsardi merged 4 commits into
r-lib:mainfrom
glin:fix/cross-compile-libpaths

Conversation

@glin
Copy link
Copy Markdown
Contributor

@glin glin commented Apr 30, 2026

PPM currently fails to build pak for macOS due to this cross-compilation specific issue with yaml:

Compiling keyring
ERROR: dependency ‘yaml’ is not available for package ‘keyring’
Perhaps try a variation of:
install.packages('yaml')
Error in install_one(pkg, lib = paste0(lib, "-", pkg)) : FAILED
Calls: install_embedded_main -> install_all -> install_one
Execution halted
installing via 'install.libs.R' to /tmp/tmp.d18VRfR2Bv/00LOCK-pak/00new/pak
Error in eval(ei, envir) : Compilation failed.
* removing ‘/tmp/tmp.d18VRfR2Bv/pak’

It appears that yaml was just missing from the set of dummy libraries added for cross-compilation, so this adds it using the same pattern as the other dummy packages.

Also adds a test to catch missing dummy libraries in the future, but it's kind of a hack. I'm happy to leave it out or try a different way of testing this if you have any good ideas.

glin and others added 4 commits April 30, 2026 17:11
During cross-compilation, install_dummies() installs minimal stub packages
to satisfy R's dependency checks without needing to load shared libraries.
yaml was missing from the set of dummies, causing keyring (which Imports
yaml) to fail during cross-compilation because R couldn't find yaml on
the library path.

Add a dummy yaml package following the same pattern as the other dummies
(cli, curl, desc, filelock, jsonlite, lpSolve, pkgbuild, pkgcache, ps,
zip).
@gaborcsardi
Copy link
Copy Markdown
Member

Thanks! Previously this was tested implicitly because the nightly aarch64 linux builds were cross-compiled. But not any more.

@gaborcsardi gaborcsardi merged commit 5ec8eb8 into r-lib:main May 1, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants