Wire-server make error
OS version of Ubuntu 16.04
I'm trying to run the
cd build/alpine && make
The process hangs on
Step 18/18 : RUN apk add --no-cache git && mkdir -p /src && cd /src && g it clone https://github.com/wireapp/wire-server.git && cd wire-server && stack update && cd services/proxy && stack build --pedantic --test --depend encies-only && cd - && cd services/brig && stack build --pedantic --test --d ependencies-only && cd - && cd services/galley && stack build --pedantic --t est --dependencies-only && cd - && cd services/cannon && stack build --pedan tic --test --dependencies-only && cd - && cd services/cargohold && stack bui ld --pedantic --test --dependencies-only && cd - && cd services/gundeck && s tack build --pedantic --test --dependencies-only && cd -
---> Running in e717d19ac451
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
OK: 1269 MiB in 149 packages
Cloning into 'wire-server'...
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Updating index
And so it can stand and day and two days
I ran into the same issue. The solution is to add the following line to build/alpine/Dockerfile.builder
echo -e "package-indices:\n- name: HackageOrig\n download-prefix: https://hackage.haskell.org/package/\n http: https://hackage.haskell.org/01-index.tar.gz" >> ~/.stack/config.yaml && \
Make sure to insert it just above the stack update line.
( Found in https://github.com/commercialhaskell/stack/issues/2509#issuecomment-240844481 )
@ThomasR thanks, we've also seen this issue on some environments. Do you want to make a PR and add those config options to https://github.com/wireapp/wire-server/blob/develop/build/alpine/ghc/config.yaml ?
@ThomasR Thank you, it helped! But there was the following error, which can not be solved (((
-- While building custom Setup.hs for package configurator-0.3.0.0 using:
/root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure (-6)
Logs have been written to: /src/wire-server/services/proxy/.stack-work/logs/configurator-0.3.0.0.log
Configuring configurator-0.3.0.0...
Preprocessing library for configurator-0.3.0.0..
Building library for configurator-0.3.0.0..
[1 of 5] Compiling Data.Configurator.Types.Internal ( Data/Configurator/Types/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/Configurator/Types/Internal.o )
[2 of 5] Compiling Data.Configurator.Types ( Data/Configurator/Types.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/Configurator/Types.o )
[3 of 5] Compiling Data.Configurator.Parser ( Data/Configurator/Parser.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/Configurator/Parser.o )
/tmp/stack24/configurator-0.3.0.0/Data/Configurator/Parser.hs:19:1: warning: [-Wunused-imports]
The import of ‘Control.Applicative’ is redundant
except perhaps to import instances from ‘Control.Applicative’
To import instances alone, use: import Control.Applicative()
|
19 | import Control.Applicative
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
[4 of 5] Compiling Data.Configurator.Instances ( Data/Configurator/Instances.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/Configurator/Instances.o )
/tmp/stack24/configurator-0.3.0.0/Data/Configurator/Instances.hs:6:1: warning: [-Wunused-imports]
The import of ‘Control.Applicative’ is redundant
except perhaps to import instances from ‘Control.Applicative’
To import instances alone, use: import Control.Applicative()
|
6 | import Control.Applicative
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
[5 of 5] Compiling Data.Configurator ( Data/Configurator.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/Configurator.o )
ghc: internal error: Unable to commit 1048576 bytes of memory
(GHC version 8.2.2 for x86_64_alpine_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
-- While building custom Setup.hs for package th-desugar-1.7 using:
/root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.0.1.0 build --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure (-6)
Logs have been written to: /src/wire-server/services/proxy/.stack-work/logs/th-desugar-1.7.log
Configuring th-desugar-1.7...
Preprocessing library for th-desugar-1.7..
Building library for th-desugar-1.7..
[1 of 8] Compiling Language.Haskell.TH.Desugar.Util ( Language/Haskell/TH/Desugar/Util.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Language/Haskell/TH/Desugar/Util.o )
[2 of 8] Compiling Language.Haskell.TH.Desugar.Reify ( Language/Haskell/TH/Desugar/Reify.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Language/Haskell/TH/Desugar/Reify.o )
[3 of 8] Compiling Language.Haskell.TH.Desugar.Core ( Language/Haskell/TH/Desugar/Core.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Language/Haskell/TH/Desugar/Core.o )
ghc: internal error: Unable to commit 1048576 bytes of memory
(GHC version 8.2.2 for x86_64_alpine_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
@jschaul Sorry, I'm not familiar with the ghc ecosystem. Not sure what to do there.
@ThomasR I created a PR for the changes you suggested, thank you again.
@sd166 it looks like you are running out of memory:
ghc: internal error: Unable to commit 1048576 bytes of memory
can you try allocating more memory to your docker instance?