Skip to content

fix: Remove zconf.h from source repo#740

Closed
joeyparrish wants to merge 1 commit intomadler:developfrom
joeyparrish:remove_zconf
Closed

fix: Remove zconf.h from source repo#740
joeyparrish wants to merge 1 commit intomadler:developfrom
joeyparrish:remove_zconf

Conversation

@joeyparrish
Copy link
Copy Markdown

It has to be regenerated anyway, either through configure or CMake. Having it in the repo means that the CMake build will rename it, dirtying the repo when used as a submodule.

A simpler alternative to #519

It has to be regenerated anyway, either through configure or CMake.
Having it in the repo means that the CMake build will rename it,
dirtying the repo when used as a submodule.

A simpler alternative to madler#519
@joeyparrish
Copy link
Copy Markdown
Author

@Togtja, JFYI.

@AraHaan
Copy link
Copy Markdown
Contributor

AraHaan commented Dec 7, 2022

This would then make direct build from within visual studio file when one clones and directly invokes msbuild using contrib/vstudio/v143/zlibvc.sln (when my PR that adds the v143 folder is merged) for example.

@joeyparrish
Copy link
Copy Markdown
Author

@madler, could we please have feedback on this, or the alternative in #519?

@AraHaan
Copy link
Copy Markdown
Contributor

AraHaan commented Jul 15, 2023

As I said before, not everyone uses or likes CMake, also not everyone can run ./configure (Windows users) and build directly with Visual Studio and this change would actually break them as people expect to be able to clone and then instantly build zlib without any other manual steps to take. And by people I mean companies and individual developers.

@joeyparrish
Copy link
Copy Markdown
Author

@AraHaan, do you have an opinion on the alternative presented in PR #519?

@AraHaan
Copy link
Copy Markdown
Contributor

AraHaan commented Jul 18, 2023

Yeah, for Windows users I would recommend not using cmake for zlib and instead the solution files in contrib/vstudio (which allows for building x86, x64, ARM, and ARM64).

Besides Windows now also has WSL, which is Linux as well so they can also cross compile zlib for linux using WSL as well (using ./configure without needing a VM which can also cross compile x86, x64, ARM, and ARM64). Then for osx, one could start up even a cheap macbook pro early 2015 model and build zlib with it too (and cross compile for ARM64 as well because it is x64).

btw #732 shows how I done the above (and also used those artifacts from it to generate a nuget package for consuming it in .NET applications.

@joeyparrish
Copy link
Copy Markdown
Author

In my case, we're building everything statically in a large project, using CMake and git submodules. The status quo leaves a dirty submodule repo on every build, which is not acceptable. Using VS for zlib and installing it system-wide is also not a solution for me. We need to build everything statically, with CMake, in one project, where the top-level project refers to zlib's CMakeLists.txt.

A CMake option to disable renaming zconf.h (PR #519) seems to be something that could satisfy everyone's use cases in a backward-compatible way.

@AraHaan
Copy link
Copy Markdown
Contributor

AraHaan commented Jul 19, 2023

I thought that cmake now includes nuget support as well, I guess another option would be for #732 to be merged (but changed to support use cases where not only .NET applications need to be able to use it but also native projects as well (C/C++).

@Neustradamus
Copy link
Copy Markdown

@madler: Can you look this @joeyparrish PR?

Linked to:

@madler
Copy link
Copy Markdown
Owner

madler commented Jan 23, 2024

@joeyparrish @AraHaan already answered this.

@madler madler closed this Jan 23, 2024
@joeyparrish joeyparrish deleted the remove_zconf branch March 11, 2024 21:36
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.

4 participants