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

No compiler found, expected minor version match with ghc-8.10.4 (x86_64-tinfo6) #35

Closed
stereobooster opened this issue Mar 23, 2021 · 2 comments

Comments

@stereobooster
Copy link

Hi. Thanks for maintaining this repo. I have following Dockerfile:

## Dockerfile for a haskell environment
FROM haskell:8

# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
    && apt-get -y install --no-install-recommends apt-utils 2>&1

# Install haskell ide engine dependencies
RUN apt-get -y install libicu-dev libtinfo-dev libgmp-dev zlib1g-dev
RUN stack config set system-ghc --global true
RUN stack install --system-ghc hls

# Clean up
RUN apt-get autoremove -y \
    && apt-get clean -y \
    && rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog

# Set the default shell to bash rather than sh
ENV SHELL /bin/bash

When I build image I get this error:

 => CACHED [4/7] RUN stack config set system-ghc --global true                                                                                                                                         0.0s
 => ERROR [5/7] RUN stack install --system-ghc hls                                                                                                                                                     2.0s
------
 > [5/7] RUN stack install --system-ghc hls:
#8 0.443 Writing implicit global project config file to: /root/.stack/global-project/stack.yaml
#8 0.444 Note: You can change the snapshot via the resolver field there.
#8 1.138 Using latest snapshot resolver: lts-17.7
#8 1.905 No compiler found, expected minor version match with ghc-8.10.4 (x86_64-tinfo6) (based on resolver setting in /root/.stack/global-project/stack.yaml).
#8 1.905 To install the correct GHC into /root/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag. To use your system GHC installation, run "stack config set system-ghc --global true", or use the "--system-ghc" flag.
------

I can workaround this issue by installing 8.4.10 ghc via stack, but it would be nice if this would work out of the box.

@AlistairB
Copy link
Contributor

Hi,

I just did a quick test and this is failing with a different error. Regardless, I believe you error was because you only requested haskell:8 and probably had 8.8 cached. If you instead specify haskell:8.10 all the GHC versions should match and you will get past this point.

Cheers

@stereobooster
Copy link
Author

Hey,

thanks for an advice. I was able to workaround it (when I opened ticket), it just wasn't a bit unclear why it doesn't work out of the box.

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

No branches or pull requests

2 participants