Skip to content

GH-55357: [C++] Fix ORC overwritting CMAKE_MODULE_PATH when dependency not found - #55415

Open
raulcd wants to merge 1 commit into
apache:mainfrom
raulcd:GH-55357
Open

raulcd wants to merge 1 commit into
apache:mainfrom
raulcd:GH-55357

Conversation

@raulcd

@raulcd raulcd commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

When a dependency is not found on ORC its find_dependency returns without resetting previous CMAKE_MODULE_PATH:
https://github.com/apache/orc/blob/32046606774da481182dce2956f336dc8e79a579/c%2B%2B/orcConfig.cmake.in#L45-L55

What changes are included in this PR?

Maintain our CMAKE_MODULE_PATH before calling ORC.

Are these changes tested?

Not on our CI but this has been tested on downstream arrow-cpp-feedstock here:
conda-forge/arrow-cpp-feedstock#2100

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

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

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

@raulcd
raulcd marked this pull request as ready for review November 5, 2026 12:21
Copilot AI balanced review requested due to automatic review settings November 5, 2026 12:21

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

No active review issues are reported for the change preserving Arrow’s CMake module search path during ORC discovery.

No open issues 🎉

What changed in this PR

Preserves Arrow’s CMake module search path when ORC dependency discovery fails, preventing later lookups such as AWS SDK discovery from losing access to Arrow’s find modules.

Changes:

  • Saves and restores CMAKE_MODULE_PATH around find_package(orc), then removes the temporary variable.
  • Documents why ORC’s early return requires this workaround.
File Description
cpp/​cmake_modules/​FindorcAlt.cmake Preserves the module search path across ORC discovery.

Review effort: Balanced

@h-vetinari

Copy link
Copy Markdown
Contributor

Thanks a lot for debugging this. I think this is good as an intermediate fix; better would be for orc to fix this for itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants