From aa90919fe9c78acf74371ce1e43757776c04b506 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 4 Sep 2017 17:07:20 -0700 Subject: Add 'static' Cabal flag, use it for linux statically linked. --- linux/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'linux/Dockerfile') diff --git a/linux/Dockerfile b/linux/Dockerfile index b725bbaa5..a8dc9bfd2 100644 --- a/linux/Dockerfile +++ b/linux/Dockerfile @@ -5,7 +5,7 @@ ADD https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%4 /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub RUN apk update RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev \ - dpkg fakeroot sed gawk grep + dpkg fakeroot sed gawk grep llvm linux-headers RUN stack update RUN stack config set system-ghc --global true RUN mkdir -p /etc/stack @@ -16,13 +16,15 @@ RUN git clone https://github.com/jgm/pandoc WORKDIR /usr/src/pandoc RUN stack install --stack-yaml stack.pkg.yaml --only-dependencies \ --flag 'pandoc:embed_data_files' \ - --test --ghc-options '-O2 -optc-Os -optl-static -fPIC' \ + --ghc-options '-fPIC -fllvm' \ pandoc pandoc-citeproc CMD git pull && \ git checkout -b work $TREE && \ stack install --stack-yaml stack.pkg.yaml \ - --local-bin-path /artifacts --flag 'pandoc:embed_data_files' \ - --test --ghc-options '-O2 -optc-Os -optl-static -fPIC' \ + --flag 'pandoc:static' \ + --flag 'pandoc:embed_data_files' \ + --ghc-options '-fPIC -fllvm' \ + --local-bin-path /artifacts \ pandoc pandoc-citeproc && \ bash linux/make_deb.sh && \ bash linux/make_tarball.sh -- cgit v1.2.3 From 2637df2bdfdffe55dc7363feac188d9144f18fea Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 4 Sep 2017 18:11:55 -0700 Subject: Revert use of llvm backend in static linux build. It was failing for reasons I couldn't diagnose. --- linux/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/Dockerfile') diff --git a/linux/Dockerfile b/linux/Dockerfile index a8dc9bfd2..c347d4ccc 100644 --- a/linux/Dockerfile +++ b/linux/Dockerfile @@ -5,7 +5,7 @@ ADD https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%4 /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub RUN apk update RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev \ - dpkg fakeroot sed gawk grep llvm linux-headers + dpkg fakeroot sed gawk grep linux-headers RUN stack update RUN stack config set system-ghc --global true RUN mkdir -p /etc/stack @@ -23,7 +23,7 @@ CMD git pull && \ stack install --stack-yaml stack.pkg.yaml \ --flag 'pandoc:static' \ --flag 'pandoc:embed_data_files' \ - --ghc-options '-fPIC -fllvm' \ + --ghc-options '-O2 -optc-Os -fPIC' \ --local-bin-path /artifacts \ pandoc pandoc-citeproc && \ bash linux/make_deb.sh && \ -- cgit v1.2.3 From d02518bf1b8e831136626f5909b8e45fcbfb2ad1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 4 Sep 2017 21:54:53 -0700 Subject: Make sure bash is available in linux package build environment. --- linux/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/Dockerfile') diff --git a/linux/Dockerfile b/linux/Dockerfile index c347d4ccc..91df3b8a2 100644 --- a/linux/Dockerfile +++ b/linux/Dockerfile @@ -5,7 +5,7 @@ ADD https://raw.githubusercontent.com/mitchty/alpine-ghc/master/mitch.tishmack%4 /etc/apk/keys/mitch.tishmack@gmail.com-55881c97.rsa.pub RUN apk update RUN apk add alpine-sdk git ca-certificates ghc cabal stack zlib-dev \ - dpkg fakeroot sed gawk grep linux-headers + dpkg fakeroot sed gawk grep bash linux-headers RUN stack update RUN stack config set system-ghc --global true RUN mkdir -p /etc/stack -- cgit v1.2.3 From 4170a184797ecacc5e9dc7462eb29c313598489f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 5 Sep 2017 08:36:13 -0700 Subject: Another try to get linux static linking working again. --- linux/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/Dockerfile') diff --git a/linux/Dockerfile b/linux/Dockerfile index 91df3b8a2..f75db2c89 100644 --- a/linux/Dockerfile +++ b/linux/Dockerfile @@ -16,14 +16,14 @@ RUN git clone https://github.com/jgm/pandoc WORKDIR /usr/src/pandoc RUN stack install --stack-yaml stack.pkg.yaml --only-dependencies \ --flag 'pandoc:embed_data_files' \ - --ghc-options '-fPIC -fllvm' \ + --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \ pandoc pandoc-citeproc CMD git pull && \ git checkout -b work $TREE && \ stack install --stack-yaml stack.pkg.yaml \ --flag 'pandoc:static' \ --flag 'pandoc:embed_data_files' \ - --ghc-options '-O2 -optc-Os -fPIC' \ + --ghc-options '-O2 -optc-Os -optl=-pthread -optl=-static -fPIC' \ --local-bin-path /artifacts \ pandoc pandoc-citeproc && \ bash linux/make_deb.sh && \ -- cgit v1.2.3