fix: Suppress obsolete -single_module linker warning on macOS#433
Merged
fix: Suppress obsolete -single_module linker warning on macOS#433
Conversation
On newer macOS toolchains (Apple clang 21+, SDK 26.4+), libuv's bundled configure script triggers an `ld: warning: -single_module is obsolete` warning during a libtool probe that tests for the flag. The probe's grep leaks the warning to stdout, which ends up in R CMD check's install log and gets flagged as a significant warning. Pre-setting `lt_cv_apple_cc_single_mod=no` skips the probe entirely. This is safe because: - It's the same value configure would arrive at on affected systems (the probe detects the warning and sets it to `no` anyway) - On older macOS, `-single_module` has been the default linker behavior for years, so omitting the flag is a no-op - Pre-setting autoconf cache variables is a standard technique for working around configure probes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR suppresses a macOS-specific ld: warning: -single_module is obsolete warning emitted during the bundled libuv ./configure probe, preventing it from leaking into 00install.out and triggering an R CMD check WARNING for httpuv builds on newer Apple toolchains.
Changes:
- Pre-seed libuv’s autoconf cache variable
lt_cv_apple_cc_single_mod=nowhen invoking./configureto skip the-single_moduleprobe.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
shikokuchuo
approved these changes
Mar 12, 2026
Member
shikokuchuo
left a comment
There was a problem hiding this comment.
My understanding is that on non-mac platforms, pre-setting this variable would be a no-op, hence all good!
cpsievert
added a commit
that referenced
this pull request
Mar 17, 2026
cpsievert
added a commit
that referenced
this pull request
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a WARNING from
R CMD checkon newer macOS toolchains (Apple clang 21+, SDK 26.4+), as seen on Brian Ripley's M1 Mac CRAN check machine:Root cause
libuv's bundled
configurescript (via libtool) probes for-single_modulelinker flag support by compiling a test program with-Wl,-single_module. On newer macOS, the linker accepts the flag but emitsld: warning: -single_module is obsolete. The configure script actually handles this correctly — it greps stderr for "single_module" and setslt_cv_apple_cc_single_mod=no. But thegrepcommand itself prints the matched line to stdout, which leaks into00install.outand gets flagged byR CMD checkas a significant warning.Fix
Pre-set
lt_cv_apple_cc_single_mod=noon the libuv configure command line. This causes configure to use the cached value and skip the probe entirely, so the problematic linker invocation never happens.This is safe because:
noanyway)-single_modulehas been the default linker behavior for years, so omitting the flag is a no-opTest plan
R CMD INSTALLwithUSE_BUNDLED_LIBUV=truesucceedsR CMD checkpasses withStatus: OK(no WARNING)single_moduledoes not appear in00install.out🤖 Generated with Claude Code