Skip to content

GH-51482: [R] allow building with shared snappy - #51490

Merged
thisisnic merged 3 commits into
apache:mainfrom
thisisnic:GH-51482-shared-snappy
Nov 12, 2026
Merged

thisisnic merged 3 commits into
apache:mainfrom
thisisnic:GH-51482-shared-snappy

Conversation

@thisisnic

@thisisnic thisisnic commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

Couldn't build with shared snappy

What changes are included in this PR?

Allow it to be specified; default is OFF

Are these changes tested?

Will run CI

Are there any user-facing changes?

No

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #51482 has been automatically assigned in GitHub to PR creator.

@thisisnic

Copy link
Copy Markdown
Member Author

@jonkeane - Mind taking a look at this one? Is there any reason we might not want to do this or fine as long as it works on CI?

@thisisnic
thisisnic marked this pull request as ready for review October 27, 2026 17:40
Copilot AI balanced review requested due to automatic review settings October 27, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow configuration change addresses the requested use case while preserving existing defaults and WebAssembly behavior, with no unresolved findings.

No open issues 🎉

What changed in this PR

Enables R source builds to use a system-provided shared Snappy library, addressing #51482 while retaining static linking by default.

Changes:

  • Allows ARROW_SNAPPY_USE_SHARED to override the default OFF setting.
  • Explicitly keeps shared Snappy disabled for WebAssembly builds.
  • Documents the override and its runtime library requirement.
File Description
r/​vignettes/​install.Rmd Documents shared Snappy configuration and runtime requirements.
r/​tools/​nixlibs.R Preserves static Snappy linking for WebAssembly.
r/​inst/​build_arrow_static.sh Passes the configurable Snappy linking option to CMake.

Review effort: Balanced

@jonkeane jonkeane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok to try this — we originally added this because on a CRAN machine snappy installed by homebrew was being linked to and that caused issues (I can't remember if their snappy was too old or too new or what, but that we added the OFF because of that).

This change doesn't change the default away from OFF (right?), just adds the option for someone to override the linking if they want, so we're ok

@thisisnic
thisisnic merged commit dd619ad into apache:main Nov 12, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants