Skip to content

or-tools: use the registry's zlib, bzip2, abseil-cpp, protobuf, re2 and boost - #1541

Draft
bryan-minimal wants to merge 6 commits into
mainfrom
or-tools-system-deps
Draft

bryan-minimal wants to merge 6 commits into
mainfrom
or-tools-system-deps

Conversation

@bryan-minimal

Copy link
Copy Markdown
Member

Draft: not built anywhere yet. The build on this PR is the first test.

Problem

or-tools is built with BUILD_DEPS=ON, so it compiles and installs its own copy of every dependency. Six of those are packages of this registry, and or-tools' copies land at the same paths with different contents. From the amd64 file lists of pkgs b891179 (every package tarball read, 2026-11-17):

or-tools against paths that differ
boost 1,309
abseil-cpp 480
protobuf 209
re2 5
zlib 4
bzip2 2

That is 8 of the 36 package pairs in the catalog that hold different files at one path. Under the conflict rule of the registry proposal (gominimal/arch#183, model section 12), or-tools could not share a box with any of them. Today the file that is linked first wins, silently.

Change

  • BUILD_DEPS=OFF, with BUILD_ZLIB, BUILD_BZip2, BUILD_absl, BUILD_Protobuf, BUILD_re2 and BUILD_Boost off: or-tools finds the registry's packages.
  • Still built by or-tools, because the registry has no package for them: Eigen (from the pinned mirror, as before), HiGHS, SCIP, soplex and the COIN-OR solvers.
  • The six packages become build deps and runtime deps (boost as its libs subset: soplex uses multiprecision and serialization).
  • The mirrored BZip2 source and its patch step are removed.
  • Two fail-closed checks in build.sh: or-tools built none of the six itself, and none of their files were installed into this package.

Risks, all untested

  • Versions. or-tools 9.15 pins abseil 20250814.1, protobuf v33.1, re2 2025-08-12, boost 1.87 and zlib 1.3.1. The registry has abseil 20260817.0, protobuf 36.2, re2 2025-11-05, boost 1.92 and zlib 1.4. Its find_package calls ask for no version, so it will try; whether it compiles against protobuf 36 and the newer abseil is not known.
  • Patches. or-tools applies its own patches to abseil, protobuf, re2 and boost when it builds them. With the registry's packages those are not applied. I did not read what each patch does.
  • bzip2. or-tools used BZip2 master for its CMake support; the registry's bzip2 is 1.0.8, found through CMake's own FindBZip2.
  • Runtime deps. The list is my reading, not a result. The missing-runtime_deps check on this PR is the test.

Not in this PR

🤖 Generated with Claude Code

…nd boost

or-tools built and installed its own copies of six libraries the registry
already packages, at the same paths with different contents. It now builds
against the packages (BUILD_DEPS=OFF) and still builds the solvers and
Eigen itself, which the registry does not package.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

bryan-minimal and others added 5 commits November 17, 2026 08:07
…ckage

or-tools' SoPlex patch stops at configure unless Boost::multiprecision and
Boost::serialization exist, and only or-tools' own Boost build defines them.
Define both from the registry's boost through CMAKE_PROJECT_ortools_INCLUDE.

Diagnosis by the pkgmgr-rs-a2 session from the build log of 6c622f3.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
or-tools 9.15 defines absl::SourceLocation itself for the abseil it pins.
The abseil package (20260817) has the real one, so the name was ambiguous
in every file that includes absl/status/status.h. The or-tools header now
forwards to abseil's.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The "enumerate bins" check wants each binary named: fzn-cp-sat, highs,
sat_runner, scip, solve, vector_bin_packing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
libortools*.so* was in both `libortools` and `libs`. Listing from the arm64
artifact of run 617e8987 (by the pkgmgr-rs-a2 session); amd64 not checked.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Whether minimal refuses a file that matches no output is not known, so
build.sh checks the installed libraries against the two output globs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

1 participant