openbsd - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

HateUsernames007

How to get stack to use compiled ghc?

I'm working on openbsd and have gotten stack compiled/installed but can only use the ported ghc 8.6.4 installed on the system with

install-ghc: false
system-ghc: true
skip-ghc-check: true

because there are no pre-compiled ghc for openbsd.

Finally yesterday, I have been able to compile ghc but have found no instructions on how to get stack to use what I have compiled. I have tried a symbolic link to .stack/programs/x86_64-openbsd/ghc-8.8.1 . Is there anything I can do with the .stack/config.yaml for it to use my compiled ghc?

I have removed the system-ghc and skip-ghc-check config.

Peter J. Jones

Is it possible that stack isn't reading the config (permission issue or the like)? There are also matching command line arguments you can try to keep stack from trying to build GHC. I also never want stack to build a GHC so I have this:

$ cat ~/.stack/config.yaml
nix: {enable: false}
system-ghc: true
HateUsernames007

I have changed the config.yaml and stack behaves differently with the changes.

looking at the stack issue https://github.com/commercialhaskell/stack/issues/416#issuecomment-291756246

following the instructions i have run gmake binary-dist to make ghc-8.81-x86_64-unknown-openbsd.tar.xz

added to config.yaml

setup-info:
  ghc:
    openbsd64-maj6-min7:
      8.8.1:
        url: 'home/user/ghc/ghc-8.81-x86_64-unknown-openbsd.tar.xz'

run stack setup

however, I get the problem of gcc version, so time to sort that out now

Any chance of getting a binary installer for OpenBSD (current, AMD64) or instructions on how to get it working from source? I develop Haskell on OpenBSD and would like to use stack.