Skip to content

[staging-next] apache-orc: 2.2.1 -> 2.3.0, fix build with protobuf 34#499475

Merged
dotlambda merged 4 commits intoNixOS:staging-nextfrom
whispersofthedawn:p/apache-orc
Mar 13, 2026
Merged

[staging-next] apache-orc: 2.2.1 -> 2.3.0, fix build with protobuf 34#499475
dotlambda merged 4 commits intoNixOS:staging-nextfrom
whispersofthedawn:p/apache-orc

Conversation

@whispersofthedawn
Copy link
Contributor

@whispersofthedawn whispersofthedawn commented Mar 13, 2026

Changelog: https://github.com/apache/orc/releases/tag/v2.3.0

In order to make this update, we have to update Orc's CMake declarations in order to correctly link abseil libraries. I'm not a CMake expert or even knower, but I think this is reasonably correct.

The build is also currently failing on staging-next due to Protobuf 34 adding [[nodiscard]] to many serialization functions, to which we handle the error in the place where it occurs. (I'll see if I can upstream this change later.)

We also added the PROTOBUF_HOME variable to arrow-cpp, the in-tree dependent for apache-orc, as it needs it in order to find the orc libraries and correctly pass the CMake configure step. I'm not familiar enough with CMake to figure out how the error messages it emits correspond to this fix, but it leads to a successful build.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci bot requested review from cpcloud, tobim and veprbl March 13, 2026 05:48
@nixpkgs-ci nixpkgs-ci bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. labels Mar 13, 2026
@dotlambda
Copy link
Member

Are there upstream issues we can link to for the two patches?

Orc's CMake declarations do not correctly attempt to link in abseil, so
we add the relevant library they need. Without these, we get errors
like:

```
<store path>/bin/ld: <store path>/lib/libabsl_raw_hash-set.so.2601.0.0:
error adding symbols: DSO missing from command line
```
Protobuf 34 adds `[[nodiscard]]` to several serialization functions. In
order to avoid these warnings causing build failures, we add handling
for this failure case
The CMake declarations for apache-orc expect the presence of
`PROTOBUF_HOME` in order to consider the library found, in addition to
the currently specified zstd and lz4 locations. We add it accordingly.
@whispersofthedawn
Copy link
Contributor Author

Are there upstream issues we can link to for the two patches?

Not yet. I couldn't find any pre-existing ones, and I haven't done it yet. I plan to write up issues, as well as a PR for the Protobuf fix, but that's going to be a task for another day as I don't presently have the capacity for that.

Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

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

LGTM

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Mar 13, 2026
@dotlambda dotlambda added this pull request to the merge queue Mar 13, 2026
Merged via the queue into NixOS:staging-next with commit 1a58c70 Mar 13, 2026
31 of 34 checks passed
@whispersofthedawn whispersofthedawn deleted the p/apache-orc branch March 13, 2026 19:36
@whispersofthedawn
Copy link
Contributor Author

whispersofthedawn commented Mar 15, 2026

It looks like this fixed the build on Linux, but not on Darwin. I can't fix this because I don't have access to a Darwin machine, but here are the logs in case someone can: https://hydra.nixos.org/build/324063460

If we don't want to play this cat-and-mouse game of squashing Protobuf [[nodiscard]] errors, we can just downgrade this error to a warning or stop building with STOP_BUILD_ON_WARNING set to true.

(Note: I've just mentioned the Protobuf issue on the upstream upgrade PR: apache/orc#2564 (comment). I don't expect it to turn into a fix immediately, though.)

@vcunat
Copy link
Member

vcunat commented Mar 15, 2026

I honestly believe that this kind of warnings should not stop distro builds. They should be hard errors only in upstream builds.

@vcunat
Copy link
Member

vcunat commented Mar 15, 2026

With f228261 it builds on aarch64-darwin for me again.

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

Labels

8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 501-1000 This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501-1000 This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants