Skip to content

[FIX,BUILD] install ONNX Runtime with its SONAME symlinks - #10465

Merged
jpfeuffer merged 1 commit into
OpenMS:developfrom
jpfeuffer:ort-install-soname
Oct 9, 2026
Merged

jpfeuffer merged 1 commit into
OpenMS:developfrom
jpfeuffer:ort-install-soname

Conversation

@jpfeuffer

@jpfeuffer jpfeuffer commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem

With WITH_ONNX=ON, src/openms/CMakeLists.txt installs only ORT_LIB_PATH. For a non-vcpkg ONNX Runtime this path is the unversioned symlink libonnxruntime.so / libonnxruntime.dylib, and install() copies symlinks as symlinks. As a result, the installed tree, including the DEB, SDK and Docker images:

  • gets a dangling link: libonnxruntime.dylib -> ../Cellar/onnxruntime/1.30.0_1/lib/libonnxruntime.dylib on Homebrew, or libonnxruntime.so -> libonnxruntime.so.1 from the ORT release tarball;
  • lacks the SONAME file that libOpenMS actually records (libonnxruntime.so.1 / libonnxruntime.1.dylib), so an installed libOpenMS cannot load ONNX Runtime.

Fix

Resolve the real library (file(REAL_PATH)) and install every libonnxruntime.so* / libonnxruntime.*dylib in its directory. That is the real file plus its relative version symlinks, with 0755 permissions in component Dependencies. Windows is unchanged (a single DLL).

Verified

  • macOS (Homebrew ORT 1.30.0): cmake -DCMAKE_INSTALL_COMPONENT=Dependencies -P src/openms/cmake_install.cmake now installs libonnxruntime.1.30.0.dylib, libonnxruntime.1.dylib -> …1.30.0.dylib, libonnxruntime.dylib -> libonnxruntime.1.dylib. Before the fix it installed only a dangling libonnxruntime.dylib -> ../Cellar/….
  • Linux layout (ORT 1.30.0 tarball chain, mocked): installs .so -> .so.1 -> .so.1.30.0.

Found while adding ONNX Runtime to the Docker image (#10462), which no longer needs a cp -a workaround.

Summary by CodeRabbit

  • Bug Fixes
    • On non-Windows platforms, installations now include the ONNX Runtime library’s matching versioned files and symlinks, with read and execute permissions.

The install rule copied only ORT_LIB_PATH, usually the unversioned
libonnxruntime.so/.dylib symlink. install() copies symlinks as symlinks,
so the installed tree got a dangling link (e.g. to ../Cellar/... on
Homebrew, or to libonnxruntime.so.1 from the ORT release tarball) and
lacked the SONAME file (libonnxruntime.so.1 / libonnxruntime.1.dylib)
that libOpenMS records, i.e. an installed libOpenMS could not load ONNX
Runtime. Install the real library together with its version symlinks.

Co-authored-by: Copilot App <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c3837bd5-5709-49f1-8783-0d1de2fc503b
📥 Commits

Reviewing files that changed from the base of the PR and between 0e769f5 and 460c931.

📒 Files selected for processing (1)
  • src/openms/CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

When ORT_LIB_PATH is set on non-Windows platforms, installation resolves its real path and installs matching .dylib or .so files from the same directory. The Windows installation branch is unchanged.

Changes

ONNX Runtime Library Installation

Layer / File(s) Summary
Resolve and install runtime libraries
src/openms/CMakeLists.txt
The non-Windows install rule resolves ORT_LIB_PATH and installs matching library files with read and execute permissions. The Windows branch is unchanged.

Suggested reviewers: timosachsenberg

Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 460c9

The non-Windows install rule addresses the missing SONAME files. No concrete additional installation risk is established, so the change is ready for normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: installing ONNX Runtime together with its SONAME symlinks. The [FIX,BUILD] prefix accurately identifies the change type.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the library path,
Then follows where its true file lies.
The versioned links join the install,
With read and execute set right.
The Windows branch stays as it was,
And bun hops off beneath the skies.

Comment @coderabbitai help to get the list of available commands.

@jpfeuffer
jpfeuffer merged commit d0b06c0 into OpenMS:develop Oct 9, 2026
32 checks passed
jpfeuffer added a commit to jpfeuffer/OpenMS that referenced this pull request Oct 9, 2026
Build the OpenMS images with -DWITH_ONNX=ON against the official ONNX
Runtime 1.30.0 release (MIT, SHA256-pinned per architecture). make install
puts libonnxruntime (with its SONAME links, OpenMS#10465) and the PeptDeep ONNX
models (share/OpenMS/models, Apache-2.0) into /opt/OpenMS, so the library,
tools and tools-thirdparty stages can run ProSE -Search:peptdeep:enable.
The build checks that libOpenMS links ONNX Runtime and that the models are
installed. containerdeploy gets a run_tests input for manual dispatches.

The Bruker TDF-SDK is not shipped: its licence (section 5.2) forbids
combining it with GPL software, which the tools-thirdparty image contains.
Bruker .d files are read without it (MzCalibration table m/z, OpenMS#10469).

Co-authored-by: Copilot App <[email protected]>
timosachsenberg pushed a commit that referenced this pull request Oct 10, 2026
Build the OpenMS images with -DWITH_ONNX=ON against the official ONNX
Runtime 1.30.0 release (MIT, SHA256-pinned per architecture). make install
puts libonnxruntime (with its SONAME links, #10465) and the PeptDeep ONNX
models (share/OpenMS/models, Apache-2.0) into /opt/OpenMS, so the library,
tools and tools-thirdparty stages can run ProSE -Search:peptdeep:enable.
The build checks that libOpenMS links ONNX Runtime and that the models are
installed. containerdeploy gets a run_tests input for manual dispatches.

The Bruker TDF-SDK is not shipped: its licence (section 5.2) forbids
combining it with GPL software, which the tools-thirdparty image contains.
Bruker .d files are read without it (MzCalibration table m/z, #10469).

Co-authored-by: Copilot App <[email protected]>
timosachsenberg added a commit that referenced this pull request Oct 15, 2026
Combines the entries of the open CHANGELOG pull requests #10387, #10483,
#10511, #10535, #10555 and #10580 into one change on top of develop, and
covers #10252 and #10267, whose edits develop already carries.

- OpenMS Library: PeptDeepLibraryPredictor (#10380),
  OpenSwathLibraryPreparation (#10373), BedRModFile (#10529), FLASH
  averagine/cosine fix (#10543), WebAssembly-found fixes (#10558),
  MzMLSqliteHandler array length check (#10471), Percolator data race
  (#10474). #10471 and #10543 were each proposed by two of the PRs; they
  appear once.
- TOPP tools: OpenDIA as a new tool (#10373), qualified by the review on
  #10387 (peptidoform inference needs workflow:working_format sqlite), and
  the NucleicAcidSearchEngine options of #10526, #10529-#10532, moved from
  the top of the release block into the tool's section together with the
  NucleicAcidSearchEngine bullet that sat there outside any section.
- Restore the ProteomicsLFQ -feat_dir entry (#10481, #10486) and the three
  FileInfo entries (#10497, #10498, #10499) that the merge of #10470
  dropped, and remove the second copy of the -write_cwl entry it added
  (cited #10459, tab indentation replaced by spaces).
- Build System: ONNX Runtime versioned files and symlinks (#10465).
- 3.6.0: #10255 made WITH_WNETALIGN opt-in; it did not change the ONNX
  Runtime requirement (review on #10267).


Claude-Session: https://claude.ai/code/session_01QfTdEQjN4tBfS49WcriPYu

Co-authored-by: Claude <[email protected]>
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.

2 participants