Comments (29)
@fendor please give me a reproducer in a form of CI job.
from zlib.
@fendor I think ultimately it's either Cabal or GHC responsibility: if extra-libraries: z
is not available or is no good to link with, they should tell so loudly instead of producing segfaulting artefacts.
from zlib.
@L0neGamer is it possible to reproduce the issue with other versions of GHC, newer than 9.2.8?
We have a CI job for Windows + GHC 9.2.8 which seems to succeed, so I'm at loss what's up.
from zlib.
Sorry I wasn't clear, when I said 9.2.8+ I meant that version and onwards. Also tested on .4.8 and .6.4
from zlib.
That's very weird. Can you contribute a reproducer expressed as a CI job?
from zlib.
Also, what's the Cabal version you are using?
from zlib.
cabal --version
-> 3.10.2.1
I'm not sure how I'd do the CI job thing but I can try look into it? It'd probably be best for someone else to though.
from zlib.
Looking at the CI jobs, the only two relating to windows I can immediately see is one that builds and one that runs with bundled-c-zlib enabled, which is likely the issue here.
Can confirm that running cabal run -c 'zlib +bundled-c-zlib'
results in the correct behaviour (that is, Test
prints).
from zlib.
Well, but the job without bundled-c-zlib
also succeeds in CI environment, right? If it runs tests, it means that it linked successfully.
from zlib.
True. I don't know enough how this stuff works or what the windows environment looks like; if you've reading material or a suggestion of where to read up I can have a go at some stage.
from zlib.
The thing is that zlib
links fine on a Windows machine I have access to. So I cannot investigate any further without a portable reproducer.
It might be worth to raise the issue at https://gitlab.haskell.org/ghc/ghc/-/issues: it's GHC's responsibility to link correctly (or abort compilation if it's impossible to do so).
from zlib.
I'll look into raising it over there soon; at the very least maybe I'll be able to get a reproducer for here from them.
from zlib.
I was also bitten by this on my windows 10 machine. I was able to reproduce the issue while building cabal HEAD. GHC 9.4.8 and cabal 3.10.2.1.
from zlib.
No windows runner supported by github (it is just windows-2019 and windows-2022) seems to be able to reproduce the issue right now.
from zlib.
@fendor you can also try flipping pkg-config
flag: I suspect GHA runners are likely to have it pre-installed, but your local environment probably does not.
Otherwise file a GHC issue please.
from zlib.
With the pkg-config flag:
$ cabal repl exes --constraint="zlib +pkg-config" Resolving dependencies...
Error: cabal-3.10.2.1.exe: Could not resolve dependencies:
[__0] trying: zlib-ghc-windows-0.1 (user goal)
[__1] trying: zlib-0.7.0.0 (dependency of zlib-ghc-windows)
[__2] trying: zlib:-bundled-c-zlib
[__3] rejecting: zlib:+pkg-config (conflict: pkg-config package zlib-any, not
found in the pkg-config database)
[__3] rejecting: zlib:-pkg-config (constraint from command line flag requires
opposite flag selection)
[__3] fail (backjumping, conflict set: zlib, zlib:bundled-c-zlib,
zlib:pkg-config)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: zlib, zlib-ghc-windows,
zlib:bundled-c-zlib, zlib:pkg-config
Try running with --minimize-conflict-set to improve the error message.
I will file a ghc issue either way.
from zlib.
I agree. I am looking into it a little bit.
from zlib.
Tracking this issue in ghc: https://gitlab.haskell.org/ghc/ghc/-/issues/24531
from zlib.
Related Issues (20)
- c code bundled in zlib is vulnerable HOT 1
- GHC 8.10.1 support HOT 1
- Upstream error when building with GHC 8.10.2, on Windows 10 HOT 1
- stack fails to build this as a dependency for at least all stackage LTS versions greater than or equals 15.1 HOT 3
- Cannot find foreign library (Ubuntu, with zlib1g-dev installed) HOT 2
- ghc.exe: could not execute: C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/mingw/bin/ld.exe HOT 1
- Support for bytestring 0.11 HOT 4
- Increase Cabal upper bound to <3.3 HOT 1
- Release version of zlib for GHC 9.0
- [s390x] testsuite fails on Fedora 36 HOT 3
- Support bytestring chunks bigger than 4Gb HOT 2
- Build failure on GHC 8.x (macOS 10.14): ld: unknown option: -no_fixup_chains HOT 6
- unknown symbol `inflateReset' HOT 10
- RLE is useful HOT 1
- tasty-1.5 not accepted HOT 1
- `hsc2hs` not declared as build tool dependency HOT 2
- Drop GHC 6 ? HOT 1
- Enable non-blocking-ffi by default, provide blocking FFI as an option HOT 1
- Potential issue building on Windows HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zlib.