Skip to content

Add libzip 1.11.4 build support#170

Merged
timosachsenberg merged 1 commit intomasterfrom
add-libzip
Feb 26, 2026
Merged

Add libzip 1.11.4 build support#170
timosachsenberg merged 1 commit intomasterfrom
add-libzip

Conversation

@timosachsenberg
Copy link
Contributor

@timosachsenberg timosachsenberg commented Feb 26, 2026

Summary

  • Add libzip 1.11.4 as a contrib dependency (alternative to minizip-ng)
  • Build script disables unnecessary features (crypto, LZMA, ZSTD, tools, docs)
  • Supports MSVC (Debug+Release), Linux, and macOS builds
  • Source archive uploaded to contrib-sources 3.6.0 release

Companion to OpenMS/OpenMS PR that replaces minizip-ng with libzip for ZIP64 archive support.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added libzip as a new optional library in the contrib build and BUILD_TYPE selections.
    • Replaced the previous minizip_ng option with libzip across the build flow and archive handling.
    • Added cross-platform fetch/configure/build/install support for libzip with improved logging and error handling.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6346602 and ab5c2f7.

📒 Files selected for processing (2)
  • CMakeLists.txt
  • libraries.cmake/libzip.cmake

📝 Walkthrough

Walkthrough

Adds libzip as an optional contrib library: updates CMakeLists with LIBZIP options and archive metadata, replaces minizip-ng references, includes a new libraries.cmake/libzip.cmake that defines OPENMS_CONTRIB_BUILD_LIBZIP to fetch, configure, build, and install libzip with platform-specific logging and error handling.

Changes

Cohort / File(s) Summary
Build configuration
CMakeLists.txt
Replaced MINIZIP_NG with LIBZIP in BUILD_TYPE and VALID_BUILD_TYPES, added LIBZIP_DIR, ARCHIVE_LIBZIP* metadata, removed minizip-ng blocks, included libraries.cmake/libzip.cmake, and added LIBZIP clean/build/copy logic.
LIBZIP build macro
libraries.cmake/libzip.cmake
New macro OPENMS_CONTRIB_BUILD_LIBZIP() that downloads/extracts libzip, configures platform-specific CMake args, builds (Debug+Release on MSVC; Release on Unix), installs/copies outputs, and logs failures with detailed messages.

Possibly related issues

  • Add minizip-ng OpenMS#8791 — The PR removes minizip-ng and adds libzip; this conflicts with an issue requesting minizip-ng in contrib, so it is directly related.

Possibly related PRs

Poem

🐇 I hopped through CMake's meadow bright,
Found zip that needed gentle light.
Libzip fetched, then built with care,
Logs and builds dancing in the air.
Now archives hum with rabbit cheer! 🎩

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add libzip 1.11.4 build support' directly and concisely summarizes the main change: adding build support for libzip 1.11.4 as a contrib dependency across multiple platforms.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-libzip

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

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
libraries.cmake/libzip.cmake (1)

152-155: Minor inconsistency in error messaging.

The build failure message on line 155 doesn't include the log file reference that the configure failure message has on line 134. For consistency and easier debugging, consider adding the log file path.

Suggested improvement
   if(NOT LIBZIP_BUILD_SUCCESS EQUAL 0)
     message(STATUS "Output: ${LIBZIP_BUILD_OUT}")
     message(STATUS "Error: ${LIBZIP_BUILD_ERR}")
-    message(FATAL_ERROR "Building libzip lib (Release) .. failed")
+    message(FATAL_ERROR "Building libzip lib (Release) .. failed. Check the log file for details: ${LOGFILE}")
   else()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libraries.cmake/libzip.cmake` around lines 152 - 155, Update the fatal build
error message in the libzip build block so it includes the build log path like
the earlier configure failure message does; specifically, change the
message(FATAL_ERROR "Building libzip lib (Release) .. failed") to append the
build log variable used elsewhere (e.g., the same log variable referenced for
configure failures such as LIBZIP_CONFIGURE_LOG or the build log variable
defined in the file) so that the fatal error includes the log file path
alongside LIBZIP_BUILD_OUT and LIBZIP_BUILD_ERR for consistent, easier
debugging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@libraries.cmake/libzip.cmake`:
- Around line 152-155: Update the fatal build error message in the libzip build
block so it includes the build log path like the earlier configure failure
message does; specifically, change the message(FATAL_ERROR "Building libzip lib
(Release) .. failed") to append the build log variable used elsewhere (e.g., the
same log variable referenced for configure failures such as LIBZIP_CONFIGURE_LOG
or the build log variable defined in the file) so that the fatal error includes
the log file path alongside LIBZIP_BUILD_OUT and LIBZIP_BUILD_ERR for
consistent, easier debugging.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38b1d78 and 6346602.

📒 Files selected for processing (2)
  • CMakeLists.txt
  • libraries.cmake/libzip.cmake

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timosachsenberg timosachsenberg merged commit 3420d62 into master Feb 26, 2026
1 check passed
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