[GH-ISSUE #119] Use system minizip when possible #99

Closed
opened 2026-05-05 11:40:07 -06:00 by gitea-mirror · 13 comments
Owner

Originally created by @ohmyarch on GitHub (Aug 12, 2017).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/119

Originally assigned to: @jmcnamara on GitHub.

When system-wide installed minizip can be found, use it instead of bundled one.

Originally created by @ohmyarch on GitHub (Aug 12, 2017). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/119 Originally assigned to: @jmcnamara on GitHub. When system-wide installed minizip can be found, use it instead of bundled one.
gitea-mirror 2026-05-05 11:40:07 -06:00
Author
Owner

@jmcnamara commented on GitHub (Aug 12, 2017):

Why do you want this feature?

<!-- gh-comment-id:321986338 --> @jmcnamara commented on GitHub (Aug 12, 2017): Why do you want this feature?
Author
Owner

@ohmyarch commented on GitHub (Aug 12, 2017):

Why do you use system zlib?

<!-- gh-comment-id:321989372 --> @ohmyarch commented on GitHub (Aug 12, 2017): Why do you use system zlib?
Author
Owner

@jmcnamara commented on GitHub (Aug 12, 2017):

Because zlib is very common and available almost everywhere. Minizip isn't.

<!-- gh-comment-id:321990151 --> @jmcnamara commented on GitHub (Aug 12, 2017): Because zlib is very common and available almost everywhere. Minizip isn't.
Author
Owner

@ohmyarch commented on GitHub (Aug 12, 2017):

I don't think so. Minizip is also a common package and can be installed via a single command in many cases, for example:

 pacman -S minizip
brew install minizip

I am not asking you to remove the bundled version. I just think that it's usually better to use the system library. Using system (shared) libraries can save disk space and memory. Besides, system libraries can be always up-to-date in some rolling release distro.

If you think it's unnecessary, just close this issue.

<!-- gh-comment-id:321995611 --> @ohmyarch commented on GitHub (Aug 12, 2017): I don't think so. Minizip is also a common package and can be installed via a single command in many cases, for example: ```zsh pacman -S minizip ``` ```zsh brew install minizip ``` I am not asking you to remove the bundled version. I just think that it's usually better to use the system library. Using system (shared) libraries can save disk space and memory. Besides, system libraries can be always up-to-date in some rolling release distro. If you think it's unnecessary, just close this issue.
Author
Owner

@jmcnamara commented on GitHub (Aug 12, 2017):

Thanks for the explanation. When I started this project 3 years ago I didn't see many packaged versions of minizip. In general I would prefer not to have to bundle it.

I'll add this feature to the Make build system. Adding it to the CMake system may take a bit longer.

<!-- gh-comment-id:321996675 --> @jmcnamara commented on GitHub (Aug 12, 2017): Thanks for the explanation. When I started this project 3 years ago I didn't see many packaged versions of minizip. In general I would prefer not to have to bundle it. I'll add this feature to the Make build system. Adding it to the CMake system may take a bit longer.
Author
Owner

@jmcnamara commented on GitHub (Aug 14, 2017):

I've added this to the master branch for the Makefile build system. It can be invoked as follows:

USE_SYSTEM_MINIZIP=1 make
<!-- gh-comment-id:322319160 --> @jmcnamara commented on GitHub (Aug 14, 2017): I've added this to the master branch for the Makefile build system. It can be invoked as follows: USE_SYSTEM_MINIZIP=1 make
Author
Owner

@jmcnamara commented on GitHub (Aug 14, 2017):

@Alexhuszagh When you get a chance can you look at adding support for system minizip to the CMake system as well.

<!-- gh-comment-id:322319371 --> @jmcnamara commented on GitHub (Aug 14, 2017): @Alexhuszagh When you get a chance can you look at adding support for system minizip to the CMake system as well.
Author
Owner

@jmcnamara commented on GitHub (Aug 17, 2017):

@ohmyarch Did you get a chance to try this?

<!-- gh-comment-id:323021407 --> @jmcnamara commented on GitHub (Aug 17, 2017): @ohmyarch Did you get a chance to try this?
Author
Owner

@jmcnamara commented on GitHub (Oct 22, 2017):

@Alexhuszagh, this is one you could have a look at as well. However, it isn't high priority so if you don't want to add it to the CMake build that is okay.

<!-- gh-comment-id:338498540 --> @jmcnamara commented on GitHub (Oct 22, 2017): @Alexhuszagh, this is one you could have a look at as well. However, it isn't high priority so if you don't want to add it to the CMake build that is okay.
Author
Owner

@Alexhuszagh commented on GitHub (Oct 22, 2017):

@jmcnamara Sorry I just saw this. I should be able to get around to it early next week.

<!-- gh-comment-id:338501470 --> @Alexhuszagh commented on GitHub (Oct 22, 2017): @jmcnamara Sorry I just saw this. I should be able to get around to it early next week.
Author
Owner

@Alexhuszagh commented on GitHub (Oct 23, 2017):

@jmcnamara This should be patched in my downstream fork. It relies on the changes made in #131, however, if need be, I can make the changes atop the current CMakeLists. If these changes are satisfactory, I will submit a PR.

<!-- gh-comment-id:338827845 --> @Alexhuszagh commented on GitHub (Oct 23, 2017): @jmcnamara This should be patched in my [downstream fork](https://github.com/Alexhuszagh/libxlsxwriter/tree/minizip). It relies on the changes made in #131, however, if need be, I can make the changes atop the current CMakeLists. If these changes are satisfactory, I will submit a PR.
Author
Owner

@jmcnamara commented on GitHub (Oct 24, 2017):

@ohmyarch can you try the fix on master for this. See also #133

<!-- gh-comment-id:339073153 --> @jmcnamara commented on GitHub (Oct 24, 2017): @ohmyarch can you try the fix on master for this. See also #133
Author
Owner

@ohmyarch commented on GitHub (Oct 31, 2017):

ldd /usr/lib/libxlsxwriter.so

linux-vdso.so.1 (0x00007ffda713f000)
libminizip.so.1 => /usr/lib/libminizip.so.1 (0x00007f14b3212000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f14b2e5b000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f14b2c44000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f14b365c000)

It works. 🎉👍

<!-- gh-comment-id:340704565 --> @ohmyarch commented on GitHub (Oct 31, 2017): <pre> ldd /usr/lib/libxlsxwriter.so linux-vdso.so.1 (0x00007ffda713f000) <b>libminizip.so.1 => /usr/lib/libminizip.so.1 (0x00007f14b3212000)</b> libc.so.6 => /usr/lib/libc.so.6 (0x00007f14b2e5b000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f14b2c44000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f14b365c000) </pre> It works. 🎉👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#99
No description provided.