Update ZLib 3rdparty library to use ZLib-ng and Minizip-ng so patching is not necessary#7022
Draft
dbs4261 wants to merge 15 commits intoisl-org:mainfrom
Draft
Update ZLib 3rdparty library to use ZLib-ng and Minizip-ng so patching is not necessary#7022dbs4261 wants to merge 15 commits intoisl-org:mainfrom
dbs4261 wants to merge 15 commits intoisl-org:mainfrom
Conversation
# Conflicts: # 3rdparty/vtk/vtk_build.cmake
… its place. (The removes the patch to zlib required for it to use integrated minizip)
|
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
| PACKAGE ZLIB | ||
| TARGETS ZLIB::ZLIB | ||
| ) | ||
| list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM Open3D::3rdparty_zlib) |
There was a problem hiding this comment.
I think You should set USE_SYSTEM_ZLIB to OFF if the package can't be found.
Contributor
Author
|
Good call, I'll make that update
…On Tue, Oct 29, 2024, 21:39 Meet Gandhi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In 3rdparty/find_dependencies.cmake
<#7022 (comment)>:
> @@ -853,6 +853,25 @@ if (BUILD_LIBREALSENSE)
endif()
endif()
+if(USE_SYSTEM_ZLIB)
+ open3d_find_package_3rdparty_library(3rdparty_zlib
+ PACKAGE ZLIB
+ TARGETS ZLIB::ZLIB
+ )
+ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS_FROM_SYSTEM Open3D::3rdparty_zlib)
I think You should set USE_SYSTEM_ZLIB to OFF if the package can't be
found.
—
Reply to this email directly, view it on GitHub
<#7022 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABW54TMKOAU44GVRLK7LFHDZ6BPGPAVCNFSM6AAAAABQNDMACKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMBTGU4DQOJQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
ssheorey
requested changes
Dec 5, 2024
Member
ssheorey
left a comment
There was a problem hiding this comment.
Thanks @dbs4261. Looks good in general. We can merge after:
- addressing @meetgandhi-dev 's comment
- CI passes. Please check the Ubuntu (OFF, OFF) failing workflow - libpng seems to be looking for some zlib functions.
https://github.com/isl-org/Open3D/actions/runs/11466322539/job/31906749596?pr=7022
quentin-leboutet
added a commit
to quentin-leboutet/Open3D
that referenced
this pull request
Apr 11, 2025
Closed
|
@dbs4261 I like the effort to make build properly working on most recent MacOS. Do you need some assistance getting this MR running? Not too deep into the lib, but would be willing to try to contribute to get this merged if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Motivation and Context
Open3D has used a patched version of ZLib that was patched to also build minizip. This causes problems when including Open3D in a larger project if some other dependency provides a version of ZLib that isn't patched before Open3D's provider is called. The current approach of WITH_MINIZIP is not descriptive enough, firstly because it can only be used with a system installed minizip package, and secondly the option is not connected to using a system version of ZLib. With this change, external dependency providers like the system package manager or VCPKG could provide one or both of these dependencies. If only a system zlib is provided, minizip will be built from source. This patch uses the NG versions of these libraries in comparability mode purely because the updated cmake build system is easier to integrate with. Existing builds using the WITH_MINIZIP option will not break as minizip will be provided by default, however the unused option will produce a warning from cmake.
Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
This patch changes the ZLib provider to provide the ZLib-ng library in compatibility mode without any patch. Additionally it adds a Minizip-ng provider also in compatibility mode. Both of these providers are now optional, and can instead use
find_package(...)if USE_SYSTEM_ZLIB and USE_SYSTEM_MINIZIP are turned on respectively.