Skip to content

Issues around th warning (This HLS binary does not support Template Haskell) and build hls with dynamic linking #2659

Closed
@jneira

Description

@jneira

After adding the warning about TH a bunch of issues have come up:

  • The instructions to build in the troubleshooting guide were incomplete, it did not include specific commands for stack or ghcup compile hls: i tried to fix that with Post 1.6.0.0 fixes and prepare 1.6.1.0 bug fix release #2647
  • Users with env where th was working fine has been compelled to build hls from source only to take ride of the warning (but well, we should have expected this i guess).
  • If you build hls with --enable-executable-dynamic (which links dynamically only the system libs) instead of --ghc-options="-dynamic" (which additionally links dynamically all haskell deps) the warning does not go away. However i thought the first option was sufficient to workaround th problems (maybe i am wrong but i infer that from comments like this)
  • As reported in irc, stack install haskell-language-server --ghc-options="dynamic" seems to not work out of the box. It seems you have to build it both statically and dynamically (i am trying to reproduce)
  • An user in macOS has got this error trying cabal install pkg:haskell-language-server --ghc-options="-dynamic":
src/Distribution/Extra/Doctest.hs:34:8: error:
    Could not find module ‘Prelude’
    Perhaps you haven't installed the "p_dyn" libraries for package ‘base-4.14.3.0’?
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
34 | module Distribution.Extra.Doctest (

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..type: supportUser support tickets, questions, help with setup etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions