Repository navigation
or-tools: use the registry's zlib, bzip2, abseil-cpp, protobuf, re2 and boost - #1541
Conversation
…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>
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 50 minutes for your next included review. View limit details
|
…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>
norrietaylor
left a comment
There was a problem hiding this comment.
Scope is wider than the title and the body. Three commits split bins into six outputs, name the libs libraries one by one, and add a shared-library check. The PR body does not describe them. They are small and coherent with the stated arch#183 goal.
Clobber none. git log on packages/or-tools shows the SCIP TPI patch (#238), the nproc/4 cap (#132) and the Eigen pin (#1146) all stay. The removal of the BZip2 mirror is intended.
Correctness The registry side agrees with the change. boost has a libs output and installs its CMake config. bzip2 installs bzlib.h and libbz2.so. abseil-cpp, protobuf and re2 ship CMake config. The repo already uses brace globs in outputs. No other package imports or-tools, so the removal of the bins output name breaks no subsetOf. One low: no check covers the binaries, although the libraries have one. The other findings are nits.
One line outside the changed lines is now stale. build.sh:127 says protoc needs LD_LIBRARY_PATH, but protoc now comes from the protobuf package.
Not checked, because each needs a build or the or-tools source, which is not in this checkout: that or-tools 9.15 compiles against protobuf 36.2 and abseil 20260817.0, that the project name is ortools for CMAKE_PROJECT_ortools_INCLUDE, that abseil ships absl/types/source_location.h, the list of installed binaries and libraries, and whether the installed SoPlex CMake config refers to Boost::multiprecision. The secrets check was a targeted search of the diff only. gitleaks did not run.
| sat_runner = { glob = "usr/bin/sat_runner" } | OutputBin, | ||
| scip = { glob = "usr/bin/scip" } | OutputBin, | ||
| solve = { glob = "usr/bin/solve" } | OutputBin, | ||
| vector_bin_packing = { glob = "usr/bin/vector_bin_packing" } | OutputBin, |
There was a problem hiding this comment.
low · The six per-binary outputs replace usr/bin/*, and nothing fails when or-tools installs a seventh binary. That binary drops out of the package without an error. build.sh:146-156 adds this exact check for shared libraries and gives this exact reason. The solvers are fetched live (#1146), so the installed set can change. Add the same loop over $OUTPUT_DIR/usr/bin/* in build.sh. I did not check the installed binary list, because that needs a build. This is the only output-coverage check in the repo, so the fix is local.
| zlib, | ||
| abseil-cpp, | ||
| subsetOf boost ["libs"], | ||
| bzip2, |
There was a problem hiding this comment.
nit · The runtime dep is the whole bzip2 package, so its eleven command-line tools come into every box that has or-tools. or-tools needs only libbz2.so. packages/boost/build.ncl:39 already uses subsetOf bzip2 ["libs"]. Use the same here. abseil-cpp and protobuf can stay whole, because the or-tools headers include their headers.
| # landed at the same paths as these packages' files with different contents | ||
| # (boost 1,309 files, abseil-cpp 480, protobuf 209, re2 5, zlib 4, bzip2 2: | ||
| # amd64 file lists of pkgs b8911794), so or-tools and any of them could not | ||
| # share a box under the registry spec's conflict rule (gominimal/arch#183). |
There was a problem hiding this comment.
nit · This comment tells the history of the change: what or-tools "used to" do, file counts at one commit, and the proposal that motivated it. That belongs in the PR body, where it already is. Line 40 does the same: "BZip2 came the same way until it became the bzip2 package below." Keep one line that says these are the registry packages or-tools links, which lines 54-55 already say. Delete the rest.
| boost, | ||
| bzip2, | ||
| protobuf, | ||
| re2, |
There was a problem hiding this comment.
nit · abseil-cpp, bzip2, protobuf and re2 are in build_deps and also in runtime_deps. The repo guide says every runtime_deps entry is injected into the build, so the build_deps copies do nothing. Keep boost here, because the runtime entry is only its libs subset and the build needs the headers and the CMake config. The existing zlib entry at line 53 has the same duplication.
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):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, withBUILD_ZLIB,BUILD_BZip2,BUILD_absl,BUILD_Protobuf,BUILD_re2andBUILD_Boostoff: or-tools finds the registry's packages.boostas itslibssubset: soplex uses multiprecision and serialization).build.sh: or-tools built none of the six itself, and none of their files were installed into this package.Risks, all untested
find_packagecalls ask for no version, so it will try; whether it compiles against protobuf 36 and the newer abseil is not known.masterfor its CMake support; the registry's bzip2 is 1.0.8, found through CMake's ownFindBZip2.Not in this PR
🤖 Generated with Claude Code