Code Monkey home page Code Monkey logo

Comments (10)

Bodigrim avatar Bodigrim commented on June 12, 2024

Sorry but this is not actionable without a reproducer, ideally in a form of CI job.

from zlib.

ii8 avatar ii8 commented on June 12, 2024

Here is how to reproduce it using docker, to do it as a CI job I'll have to do some reading first and it seems to take a very long time for anything to run.

Create a file called Dockerfile with these contents:

FROM alpine:latest

RUN apk upgrade --no-cache && \
    apk add --no-cache binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz sudo zlib-dev

RUN adduser -D -s /bin/ash dude
RUN echo 'dude ALL = NOPASSWD: ALL' > /etc/sudoers.d/dude && chmod 0440 /etc/sudoers.d/dude
USER dude
WORKDIR /home/dude

ARG BOOTSTRAP_HASKELL_NONINTERACTIVE=1
ARG BOOTSTRAP_HASKELL_GHC_VERSION=9.4.4
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
ENV PATH="$PATH:/home/dude/.ghcup/bin"

RUN stack new zlibtest
WORKDIR /home/dude/zlibtest
RUN echo 'resolver: nightly-2023-02-14' > stack.yaml
RUN sed -i '/^dependencies:$/a - wai-app-static' package.yaml

Then, in the directory with this file run these two commands:

docker build -t testimg .
docker run -it testimg stack build

from zlib.

Bodigrim avatar Bodigrim commented on June 12, 2024

FWIW I don't have a Linux machine to run docker. Could you try to minimise your reproducer? Does it fail if you use cabal instead of stack? If you use different version of GHC? If you build just zlib, not wai-app-static?

from zlib.

ii8 avatar ii8 commented on June 12, 2024

Yes I have tried just cabal and it comes up with a segmentation fault instead, I'll post the error in a bit, I meant to mention that earlier but got distracted.

A different version of GHC (9.2.5) causes a different error, this one: https://gitlab.haskell.org/ghc/ghc/-/issues/19421 claimed to have been fixed in newer GHC versions which is why I'm using the newer one.

Building just zlib on it's own works fine.

It's very odd, I've tried a lot of different ways to build this but each time there is a new different problem.

from zlib.

Bodigrim avatar Bodigrim commented on June 12, 2024

One more thing to try is GHC 9.6.0 alpha3, it's available through ghcup prereleases channel.

If there are segmentation faults in Cabal build, this is probably better to be upstreamed directly to https://gitlab.haskell.org/ghc/ghc/-/issues, because whatever zlib does, ghc should not segfault.

from zlib.

ii8 avatar ii8 commented on June 12, 2024

Here is the error when I run

sudo docker run -it testimg cabal install wai-app-static

Very much not helpful, but I said I'd post it so here it is.

Starting     wai-app-static-3.1.7.4 (lib)
Building     wai-app-static-3.1.7.4 (lib)
cabal: Failed to build wai-app-static-3.1.7.4 (which is required by exe:warp
from wai-app-static-3.1.7.4). The build process segfaulted (i.e. SIGSEGV).

from zlib.

ii8 avatar ii8 commented on June 12, 2024

GHC 9.6.0 has a different problem as well:

unix-compat > /tmp/stack-abadd9188bb9e9f8/unix-compat-0.6/src/System/PosixCompat/User.hsc:20:7: error: [GHC-76037]
unix-compat >     Not in scope: type constructor or class ‘GroupEntry’
unix-compat >    |                        
unix-compat > 20 |     , GroupEntry(..)   
unix-compat >    |       ^^^^^^^^^^^^^^   

from zlib.

ii8 avatar ii8 commented on June 12, 2024

https://gitlab.haskell.org/ghc/ghc/-/issues/23043

from zlib.

mpilgrem avatar mpilgrem commented on June 12, 2024

@ii8, regarding unknown symbol 'inflateReset', I think I experienced something similar trying to build the stack package on Alpine Linux/x86_64 and that it went away after I commanded sudo apk add zlib-static.

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.