Code Monkey home page Code Monkey logo

Comments (29)

Bodigrim avatar Bodigrim commented on June 12, 2024 1

@fendor please give me a reproducer in a form of CI job.

from zlib.

Bodigrim avatar Bodigrim commented on June 12, 2024 1

@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.

Bodigrim avatar Bodigrim commented on June 12, 2024

@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.

L0neGamer avatar L0neGamer commented on June 12, 2024

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.

Bodigrim avatar Bodigrim commented on June 12, 2024

That's very weird. Can you contribute a reproducer expressed as a CI job?

from zlib.

Bodigrim avatar Bodigrim commented on June 12, 2024

Also, what's the Cabal version you are using?

from zlib.

L0neGamer avatar L0neGamer commented on June 12, 2024

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.

L0neGamer avatar L0neGamer commented on June 12, 2024

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.

Bodigrim avatar Bodigrim commented on June 12, 2024

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.

L0neGamer avatar L0neGamer commented on June 12, 2024

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.

Bodigrim avatar Bodigrim commented on June 12, 2024

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.

L0neGamer avatar L0neGamer commented on June 12, 2024

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.

fendor avatar fendor commented on June 12, 2024

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.

fendor avatar fendor commented on June 12, 2024

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.

Bodigrim avatar Bodigrim commented on June 12, 2024

@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.

fendor avatar fendor commented on June 12, 2024

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.

fendor avatar fendor commented on June 12, 2024

I agree. I am looking into it a little bit.

from zlib.

fendor avatar fendor commented on June 12, 2024

Tracking this issue in ghc: https://gitlab.haskell.org/ghc/ghc/-/issues/24531

from zlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.