Search code examples
javascripthaskellcabalghcjsghcjs-dom

problem with the installation of ghcjs-dom: out of memory installing jsaddle-dom


I have tried to install ghcjs-dom both with cabal or stack and I can't exclude jsaddle-dom. In particular, by making "stack build", it tries to install also jsaddle-dom, but my OS goes out of memory during the process. How can i fix it? The ReadMe tells to do the following:

enter image description here

but I can't do it.

Compiling with cabal (cabal build) the error is:

enter image description here

While if I compile (stack build) with stack the error is:

enter image description here

My .cabal has the following build-depends:

 build-depends:
      base >=4.7 && <5
    , ghcjs-dom ==0.9.4.0
    , haskell-src-exts >=1.23.1
    , mtl >=2.2.2

Solution

  • I solved the problem: the linker needs a lot of Ram to build jsaddle, so the solution is to increase the swap memory (15 Gb needed).