Skip to content

Dynamic linking does not work on Windows #2048

Closed
@Tarmean

Description

@Tarmean

I'm usually compiling haskell-language-server on Windows 10 with stack. Running stack build to build 8.10.4 on commit 45fdb25 or later results in compiler errors like:

hie-compat                       > src-ghc810\Compat\HieAst.hs:20:8: error:
hie-compat                       >     Could not find module `Prelude'
hie-compat                       >     Perhaps you haven't installed the "dyn" libraries for package `base-4.14.1.0'?
hie-compat                       >     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
hie-compat                       >    |
hie-compat                       > 20 | module Compat.HieAst ( mkHieFile, enrichHie ) where

From looking at the issue tracker it seems that dynamic linking doesn't work on Windows, but instead of silently being ignored it seems to break the build - at least on the GHC 8.10.4 version installed by stack.
There seems to be some related discussion here? haskell/haskell-ide-engine#1171 (comment)

Removing the

$targets:
- --enable-executable-dynamic

line from the respective stack.yaml fixes the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous integrationbuild tool: stackos: windowstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions