Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use zlib-clib on Windows, unless pkg-config is available #70

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

Bodigrim
Copy link
Contributor

Closes #65.

zlib/zlib.cabal Outdated
--
-- On Windows zlib is shipped with GHC starting from 7.10
-- at mingw/lib/libz.a. Yet linking against it proves unreliable:
-- while GHC always links against mingw/lib whatever the PATH,
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit misleading, since GHC won't consult your PATH at link time, only at runtime. It might be better to phrase this as:

On Windows, zlib is shipped as part of GHC's mingw/lib directory, which GHC always includes in its linker search path. However, there is no guarantee that zlib1.dll (the corresponding shared library) will be available on the user's PATH at runtime, making it risky to depend upon (see #65 for what can go wrong). Thus, we resort to zlib-clib unless pkg-config is available.

Or something like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I'll use the suggested wording.

@Bodigrim Bodigrim force-pushed the bundle-zlib-clib-on-windows branch from 6ce8114 to a7b7d2e Compare April 21, 2024 20:16
@Bodigrim Bodigrim merged commit 7df81e6 into master Apr 21, 2024
56 checks passed
@Bodigrim Bodigrim deleted the bundle-zlib-clib-on-windows branch April 21, 2024 20:23
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.

Runtime failure on Windows on version 0.7.0.0
2 participants