Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build GHC 8.4.2 for android #40194

Closed
ElvishJerricco opened this issue May 9, 2018 · 11 comments
Closed

Can't build GHC 8.4.2 for android #40194

ElvishJerricco opened this issue May 9, 2018 · 11 comments

Comments

@ElvishJerricco
Copy link
Contributor

ElvishJerricco commented May 9, 2018

Issue description

GHC 8.4.2 does not build for the android prebuilt cross compilation target. EDIT: Some further clarification, there are some commits on my https://github.com/ElvishJerricco/nixpkgs/tree/android-prebuilt-ghc branch necessary to even try this for android.

Steps to reproduce

# android.nix
import <nixpkgs> {
  localSystem.system = "x86_64-linux";
  crossSystem = (import <nixpkgs/lib>).systems.examples.aarch64-android-prebuilt;
}
$ git clone -b android-prebuilt-ghc https://github.com/ElvishJerricco/nixpkgs nixpkgs
$ nix-build android.nix -A haskell.packages.integer-simple.ghc842.ghc -I nixpkgs=$(pwd)/nixpkgs

Build log:

[...snip...]

----------------------------------------------------------------------
Configure completed successfully.

   Building GHC version  : 8.4.2
          Git commit id  : 28595b7ab619d9a812cce23a546d7deabb486372

   Build platform        : x86_64-unknown-linux
   Host platform         : x86_64-unknown-linux
   Target platform       : aarch64-unknown-linux-android

   Bootstrapping using   : /nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc
      which is version   : 8.2.1

   Using (for bootstrapping) : gcc
   Using gcc                 : /nix/store/qa7vj8jswpvpq2bc6ik87218l8nlk0hl-aarch64-unknown-linux-android-ndk-gcc-binutils-wrapper/bin/aarch64-unknown-linux-android-cc
      which is version       : 4.9
   Building a cross compiler : YES
   Unregisterised            : NO
   hs-cpp       : /nix/store/qa7vj8jswpvpq2bc6ik87218l8nlk0hl-aarch64-unknown-linux-android-ndk-gcc-binutils-wrapper/bin/aarch64-unknown-linux-android-cc
   hs-cpp-flags : -E -undef -traditional
   ar           : aarch64-unknown-linux-android-ar
   ld           : /nix/store/m5chlhpnadri6c06kmws888xlrfk1hx7-aarch64-unknown-linux-android-ndk-gcc-binutils-wrapper/bin/aarch64-unknown-linux-android-ld
   nm           : /nix/store/j7lsny5ac86mzl41v42f6nkpcckikf78-ndk-gcc-binutils/bin/aarch64-unknown-linux-android-nm
   libtool      : 
   objdump      : aarch64-unknown-linux-android-objdump
   ranlib       : /nix/store/j7lsny5ac86mzl41v42f6nkpcckikf78-ndk-gcc-binutils/bin/aarch64-unknown-linux-android-ranlib
   windres      : 
   dllwrap      : 
   genlib       : 
   Happy        : /nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy (1.19.9)
   Alex         : /nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex (3.2.4)
   Perl         : /nix/store/cxdmh98g0lvl1dyq304c1lq7f90dh01f-perl-5.24.3/bin/perl
   sphinx-build : 
   xelatex      : 

   Using LLVM tools
      clang : 
      llc   : llc
      opt   : opt

   HsColour was not found; documentation will not contain source links

   Tools to build Sphinx HTML documentation available: NO
   Tools to build Sphinx PDF documentation available: NO
----------------------------------------------------------------------

For a standard build of GHC (fully optimised with profiling), type (g)make.

To make changes to the default build configuration, copy the file
mk/build.mk.sample to mk/build.mk, and edit the settings in there.

For more information on how to configure your GHC build, see
   http://ghc.haskell.org/trac/ghc/wiki/Building

@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j4 -l4 SHELL=/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash
+ test -f mk/config.mk.old
+ cp -p mk/config.mk mk/config.mk.old
touch -r mk/config.mk.old mk/config.mk
+ test -f mk/project.mk.old
+ cp -p mk/project.mk mk/project.mk.old
touch -r mk/project.mk.old mk/project.mk
+ test -f compiler/ghc.cabal.old
+ cp -p compiler/ghc.cabal compiler/ghc.cabal.old
touch -r compiler/ghc.cabal.old compiler/ghc.cabal
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
mkdir -p inplace/bin
mkdir -p inplace/lib
"rm" -f inplace/bin/mkdirhier  
echo '#!/bin/sh'  		 >> inplace/bin/mkdirhier
cat utils/mkdirhier/mkdirhier.sh >> inplace/bin/mkdirhier
chmod +x inplace/bin/mkdirhier
"rm" -f libraries/transformers/dist-boot/build/libHS.a libraries/transformers/dist-boot/build/libHS.a.contents  
echo         >> libraries/transformers/dist-boot/build/libHS.a.contents
/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash: libraries/transformers/dist-boot/build/libHS.a.contents: No such file or directory
utils/hsc2hs/ghc.mk:24: utils/hsc2hs/dist-install/package-data.mk: No such file or directory
make[1]: *** [libraries/transformers/ghc.mk:4: libraries/transformers/dist-boot/build/libHS.a] Error 1
make: *** [Makefile:123: all] Error 2

Technical details

The integer-simple build of the compiler is used because of a different issue with gmp, which we can solve at a later date. I believe this is irrelevant to this issue.

haskell.packages.integer-simple.ghcHEAD.ghc builds fine. I had to bump ghcHEAD because it was ironically behind ghc842. But it built fine both before and after this bump. So this may just be a problem with the source distribution of 8.4.2?

Note that it doesn't even seem to try to build ghc-cabal before trying to build the boot libraries, unless you build with --cores 1 (my default is --cores 4). Can't imagine why that would be. If you do build with --cores 1, you get a different but seemingly related error:

[...snip...]

----------------------------------------------------------------------
Configure completed successfully.

   Building GHC version  : 8.4.2
          Git commit id  : 28595b7ab619d9a812cce23a546d7deabb486372

   Build platform        : x86_64-unknown-linux
   Host platform         : x86_64-unknown-linux
   Target platform       : aarch64-unknown-linux-android

   Bootstrapping using   : /nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc
      which is version   : 8.2.1

   Using (for bootstrapping) : gcc
   Using gcc                 : /nix/store/qa7vj8jswpvpq2bc6ik87218l8nlk0hl-aarch64-unknown-linux-android-ndk-gcc-binutils-wrapper/bin/aarch64-unknown-linux-android-cc
      which is version       : 4.9
   Building a cross compiler : YES
   Unregisterised            : NO
   hs-cpp       : /nix/store/qa7vj8jswpvpq2bc6ik87218l8nlk0hl-aarch64-unknown-linux-android-ndk-gcc-binutils-wrapper/bin/aarch64-unknown-linux-android-cc
   hs-cpp-flags : -E -undef -traditional
   ar           : aarch64-unknown-linux-android-ar
   ld           : /nix/store/m5chlhpnadri6c06kmws888xlrfk1hx7-aarch64-unknown-linux-android-ndk-gcc-binutils-wrapper/bin/aarch64-unknown-linux-android-ld
   nm           : /nix/store/j7lsny5ac86mzl41v42f6nkpcckikf78-ndk-gcc-binutils/bin/aarch64-unknown-linux-android-nm
   libtool      : 
   objdump      : aarch64-unknown-linux-android-objdump
   ranlib       : /nix/store/j7lsny5ac86mzl41v42f6nkpcckikf78-ndk-gcc-binutils/bin/aarch64-unknown-linux-android-ranlib
   windres      : 
   dllwrap      : 
   genlib       : 
   Happy        : /nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy (1.19.9)
   Alex         : /nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex (3.2.4)
   Perl         : /nix/store/cxdmh98g0lvl1dyq304c1lq7f90dh01f-perl-5.24.3/bin/perl
   sphinx-build : 
   xelatex      : 

   Using LLVM tools
      clang : 
      llc   : llc
      opt   : opt

   HsColour was not found; documentation will not contain source links

   Tools to build Sphinx HTML documentation available: NO
   Tools to build Sphinx PDF documentation available: NO
----------------------------------------------------------------------

For a standard build of GHC (fully optimised with profiling), type (g)make.

To make changes to the default build configuration, copy the file
mk/build.mk.sample to mk/build.mk, and edit the settings in there.

For more information on how to configure your GHC build, see
   http://ghc.haskell.org/trac/ghc/wiki/Building

@nix { "action": "setPhase", "phase": "buildPhase" }
building
build flags: -j1 -l1 SHELL=/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash
+ test -f mk/config.mk.old
+ cp -p mk/config.mk mk/config.mk.old
touch -r mk/config.mk.old mk/config.mk
+ test -f mk/project.mk.old
+ cp -p mk/project.mk mk/project.mk.old
touch -r mk/project.mk.old mk/project.mk
+ test -f compiler/ghc.cabal.old
+ cp -p compiler/ghc.cabal compiler/ghc.cabal.old
touch -r compiler/ghc.cabal.old compiler/ghc.cabal
===--- building phase 0
make --no-print-directory -f ghc.mk phase=0 phase_0_builds
mkdir -p inplace/bin
mkdir -p inplace/lib
"rm" -f inplace/bin/mkdirhier  
echo '#!/bin/sh'  		 >> inplace/bin/mkdirhier
cat utils/mkdirhier/mkdirhier.sh >> inplace/bin/mkdirhier
chmod +x inplace/bin/mkdirhier
"inplace/bin/mkdirhier" utils/ghc-cabal/dist/build/tmp//.
"inplace/bin/mkdirhier" bootstrapping/.
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" -H32m -O -Wall \
       -optc-Wall -optc-fno-stack-protector \
        \
       -hide-all-packages \
       -package ghc-prim -package base -package array -package transformers -package time -package containers -package bytestring -package deepseq -package process -package pretty -package directory -package unix \
       --make utils/ghc-cabal/Main.hs -o utils/ghc-cabal/dist/build/tmp/ghc-cabal \
       -no-user-package-db \
       -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations \
       -DCABAL_VERSION=2,2,0,1 \
       -DCABAL_PARSEC \
       -DBOOTSTRAPPING \
       -odir  bootstrapping \
       -hidir bootstrapping \
       libraries/Cabal/Cabal/Distribution/Parsec/Lexer.hs \
       -ilibraries/Cabal/Cabal \
       -ilibraries/binary/src \
       -ilibraries/filepath \
       -ilibraries/hpc \
       -ilibraries/mtl \
       -ilibraries/text \
       libraries/text/cbits/cbits.c \
       -Ilibraries/text/include \
       -ilibraries/parsec/src \
        \
       
[  1 of 270] Compiling Control.Monad.Cont.Class ( libraries/mtl/Control/Monad/Cont/Class.hs, bootstrapping/Control/Monad/Cont/Class.o )
[...snip...]
[270 of 270] Compiling Main             ( utils/ghc-cabal/Main.hs, bootstrapping/Main.o )
Linking utils/ghc-cabal/dist/build/tmp/ghc-cabal ...
"touch" utils/ghc-cabal/dist/build/tmp/ghc-cabal
"cp" utils/ghc-cabal/dist/build/tmp/ghc-cabal inplace/bin/ghc-cabal
"inplace/bin/mkdirhier" compiler/stage1/build//.
"rm" -f compiler/stage1/build/Config.hs  
Creating compiler/stage1/build/Config.hs ... 
done.
"inplace/bin/ghc-cabal" configure libraries/binary dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring binary-0.8.5.1...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/binary/dist-boot/inplace-pkg-config
binary-0.8.5.1: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/binary/dist-boot/doc/html/binary/binary.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/text dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Warning: text.cabal:4:1: The field "bug-reports" is specified more than once
at positions 4:1, 42:1
Warning: text.cabal:4:1: The field "bug-reports" is specified more than once
at positions 4:1, 42:1
Configuring text-1.2.3.0...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/text/dist-boot/inplace-pkg-config
text-1.2.3.0: Warning: include-dirs: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/text/dist-boot/build/include doesn't exist or isn't a directory
text-1.2.3.0: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/text/dist-boot/doc/html/text/text.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/transformers dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring transformers-0.5.5.0...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/transformers/dist-boot/inplace-pkg-config
transformers-0.5.5.0: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/transformers/dist-boot/doc/html/transformers/transformers.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/mtl dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring mtl-2.2.2...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/mtl/dist-boot/inplace-pkg-config
mtl-2.2.2: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/mtl/dist-boot/doc/html/mtl/mtl.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/parsec dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring parsec-3.1.13.0...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/parsec/dist-boot/inplace-pkg-config
parsec-3.1.13.0: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/parsec/dist-boot/doc/html/parsec/parsec.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/Cabal/Cabal dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --flag parsec --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring Cabal-2.2.0.1...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/Cabal/Cabal/dist-boot/inplace-pkg-config
Cabal-2.2.0.1: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/Cabal/Cabal/dist-boot/doc/html/Cabal/Cabal.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/hpc dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring hpc-0.6.0.3...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/hpc/dist-boot/inplace-pkg-config
hpc-0.6.0.3: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/hpc/dist-boot/doc/html/hpc/hpc.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/ghc-boot-th dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring ghc-boot-th-8.4.2...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/ghc-boot-th/dist-boot/inplace-pkg-config
ghc-boot-th-8.4.2: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/ghc-boot-th/dist-boot/doc/html/ghc-boot-th/ghc-boot-th.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/ghc-boot dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring ghc-boot-8.4.2...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/ghc-boot/dist-boot/inplace-pkg-config
ghc-boot-8.4.2: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/ghc-boot/dist-boot/doc/html/ghc-boot/ghc-boot.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/template-haskell dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring template-haskell-2.13.0.0...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/template-haskell/dist-boot/inplace-pkg-config
template-haskell-2.13.0.0: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/template-haskell/dist-boot/doc/html/template-haskell/template-haskell.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/ghci dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring ghci-8.4.2...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/ghci/dist-boot/inplace-pkg-config
ghci-8.4.2: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/ghci/dist-boot/doc/html/ghci/ghci.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure libraries/terminfo dist-boot --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Warning: terminfo.cabal:4:1: The field "category" is specified more than once
at positions 4:1, 10:1
Warning: terminfo.cabal:4:1: The field "category" is specified more than once
at positions 4:1, 10:1
Configuring terminfo-0.4.1.1...
configure: WARNING: unrecognized options: --with-compiler
checking for aarch64-unknown-linux-android-gcc... /nix/store/487kalv9jm8g5fs3bm5yhby63mcpnbfv-gcc-wrapper-7.3.0/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /nix/store/487kalv9jm8g5fs3bm5yhby63mcpnbfv-gcc-wrapper-7.3.0/bin/gcc accepts -g... yes
checking for /nix/store/487kalv9jm8g5fs3bm5yhby63mcpnbfv-gcc-wrapper-7.3.0/bin/gcc option to accept ISO C89... none needed
checking for setupterm in -ltinfow... no
checking for setupterm in -ltinfo... yes
configure: creating ./config.status
config.status: creating terminfo.buildinfo
configure: WARNING: unrecognized options: --with-compiler
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf libraries/terminfo/dist-boot/inplace-pkg-config
terminfo-0.4.1.1: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/terminfo/dist-boot/doc/html/terminfo/terminfo.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure compiler stage1 --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --flags=stage1 --ghc-option=-DSTAGE=1 --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --enable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header  " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy" --disable-library-for-ghci
Configuring ghc-8.4.2...
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg" update -v0 --force --package-db=libraries/bootstrapping.conf compiler/stage1/inplace-pkg-config
ghc-8.4.2: Warning: include-dirs: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/compiler/stage1/build/parser doesn't exist or isn't a directory
ghc-8.4.2: Warning: include-dirs: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/compiler/stage1/build/utils doesn't exist or isn't a directory
ghc-8.4.2: Warning: include-dirs: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/compiler/stage1/build/stage1 doesn't exist or isn't a directory
ghc-8.4.2: Warning: haddock-interfaces: /tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/compiler/stage1/doc/html/ghc/ghc.haddock doesn't exist or isn't a file
"inplace/bin/ghc-cabal" configure ghc stage1 --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --flags=stage1 --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring ghc-bin-8.4.2...
Warning: 'data-dir: ..' is a relative path outside of the source tree. This
will not work when generating a tarball with 'sdist'.
"inplace/bin/mkdirhier" utils/ghc-pkg/dist/build//.
"rm" -f utils/ghc-pkg/dist/build/Version.hs  
echo "module Version where"                    >> utils/ghc-pkg/dist/build/Version.hs
echo "version, targetOS, targetARCH :: String" >> utils/ghc-pkg/dist/build/Version.hs
echo "version    = \"8.4.2\""      >> utils/ghc-pkg/dist/build/Version.hs
echo "targetOS   = \"linux_android\""        >> utils/ghc-pkg/dist/build/Version.hs
echo "targetARCH = \"aarch64\""      >> utils/ghc-pkg/dist/build/Version.hs
"inplace/bin/ghc-cabal" configure utils/ghc-pkg dist --with-ghc="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" --with-ghc-pkg="/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc-pkg"  --package-db=/tmp/nix-build-aarch64-unknown-linux-android-ghc-8.4.2.drv-1/ghc-8.4.2/libraries/bootstrapping.conf --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline" --configure-option=LDFLAGS="  " --configure-option=CPPFLAGS="   " --gcc-options="-Wall -fno-stack-protector    -Werror=unused-but-set-variable -Wno-error=inline   " --configure-option=--with-curses-libraries="/nix/store/v4fkzi98745wi8psjdvfsp8nn6ygx9ww-ncurses-6.1/lib" --configure-option=--host=aarch64-unknown-linux-android   --constraint "binary == 0.8.5.1"   --constraint "text == 1.2.3.0"   --constraint "transformers == 0.5.5.0"   --constraint "mtl == 2.2.2"   --constraint "parsec == 3.1.13.0"   --constraint "Cabal == 2.2.0.1"   --constraint "hpc == 0.6.0.3"   --constraint "ghc-boot-th == 8.4.2"   --constraint "ghc-boot == 8.4.2"   --constraint "template-haskell == 2.13.0.0"   --constraint "ghci == 8.4.2"   --constraint "terminfo == 0.4.1.1" --with-gcc="gcc" --with-ld="ld.gold" --with-ar="/nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/ar" --with-alex="/nix/store/sh35vzs8ia83a8285p1fygpnp3xpkad4-alex-3.2.4/bin/alex" --with-happy="/nix/store/r9shf3rjjyf06yn9jx16pyjby07xz4gk-happy-1.19.9/bin/happy"
Configuring ghc-pkg-6.9...
"inplace/bin/mkdirhier" utils/ghc-pkg/dist/build/tmp//.
"/nix/store/2awzayqw28x00pahr9qqn163sdkwy8zx-ghc-8.2.1-binary/bin/ghc" -o utils/ghc-pkg/dist/build/tmp/ghc-pkg -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O -Wall   -package-db libraries/bootstrapping.conf  -hide-all-packages -i -iutils/ghc-pkg/. -iutils/ghc-pkg/dist/build -Iutils/ghc-pkg/dist/build -iutils/ghc-pkg/dist/build/ghc-pkg/autogen -Iutils/ghc-pkg/dist/build/ghc-pkg/autogen     -optP-include -optPutils/ghc-pkg/dist/build/ghc-pkg/autogen/cabal_macros.h    -no-user-package-db -rtsopts        -odir utils/ghc-pkg/dist/build -hidir utils/ghc-pkg/dist/build -stubdir utils/ghc-pkg/dist/build     -static  -H32m -O -Wall   -package-db libraries/bootstrapping.conf  -hide-all-packages -i -iutils/ghc-pkg/. -iutils/ghc-pkg/dist/build -Iutils/ghc-pkg/dist/build -iutils/ghc-pkg/dist/build/ghc-pkg/autogen -Iutils/ghc-pkg/dist/build/ghc-pkg/autogen     -optP-include -optPutils/ghc-pkg/dist/build/ghc-pkg/autogen/cabal_macros.h    -no-user-package-db -rtsopts        -no-auto-link-packages -no-hs-main     
ghc: no input files
Usage: For basic information, try the `--help' option.
utils/hsc2hs/ghc.mk:24: utils/hsc2hs/dist-install/package-data.mk: No such file or directory
make[1]: *** [utils/ghc-pkg/ghc.mk:70: utils/ghc-pkg/dist/build/tmp/ghc-pkg] Error 1
make: *** [Makefile:123: all] Error 2
@angerman
Copy link
Contributor

angerman commented May 9, 2018

I've just hit htis as well.

@ElvishJerricco
Copy link
Contributor Author

@angerman Yea, it seems to happen on several cross targets. Not sure if it's all or only some.

@ElvishJerricco
Copy link
Contributor Author

FWIW, I get exactly the same error if I switch to a git checkout at ghc/ghc@28595b7 rather than the source dist (though it required adding autoreconfHook to the inputs and ./boot to preConfigure).

@angerman
Copy link
Contributor

angerman commented May 9, 2018

@ElvishJerricco right, but that is to be expected. The source dist is build from that commit.

@angerman
Copy link
Contributor

angerman commented May 9, 2018

@ElvishJerricco did you by any chance try to build it outside of nix with the same result?

@angerman
Copy link
Contributor

angerman commented May 9, 2018

@ElvishJerricco do you have a known good commit as close by as possbile?

@ElvishJerricco
Copy link
Contributor Author

@angerman Sort of. But my process was designed to exactly mimic nix-build. i.e. nix-shell android.nix -A haskell.packages.integer-simple.ghc842.ghc --run 'configurePhase && buildPhase'.

The nearest known good commit I can point you too is the revision that ghcHEAD is currently based on (ghc/ghc@e1d4140, which is ironically older than 8.4.2)

@angerman
Copy link
Contributor

angerman commented May 9, 2018

So we are essentially looking at something like this ghc/ghc@e1d4140...28595b7

@ElvishJerricco
Copy link
Contributor Author

ElvishJerricco commented May 9, 2018

Well, if I replace the src in the 8.4.2 expression with ee2acdf, it fails in the same way... Maybe it's a difference between the nix expressions? Derp, was messing with the wrong revs

@ElvishJerricco
Copy link
Contributor Author

Alright, so the ghcHEAD commit isn't in the 8.4.2 commit's history, so I had to work in a different pattern from their common ancestor.

$ git merge-base e1d4140be4d2a1508015093b69e1ef53516e1eb6 28595b7ab619d9a812cce23a546d7deabb486372
595f60fd55cc0305883c8a0b382a4b9718a0e0d8

ghc/ghc@595f60f is also broken in the same way, so the fix came on master (as an ancestor of ghc/ghc@e1d4140) after 8.4 was cut. Thus, I did a bisect on ghc/ghc@595f60f...e1d4140, and found ghc/ghc@1ecbe9c as the commit that fixed it.

$ git show 1ecbe9ccb10f42dc5b133ffb2c7b1e9247b1ba52
commit 1ecbe9ccb10f42dc5b133ffb2c7b1e9247b1ba52
Author: Sergei Trofimovich <slyfox@gentoo.org>
Date:   Tue Dec 5 07:51:16 2017 +0000

    utils/hsc2hs: update submodule
    
    This pulls single change to fix building of cross-compilers:
    * ghc.mk: Use the same conditional install logic from unlit
    
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    
    Reviewers: bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4248

diff --git a/utils/hsc2hs b/utils/hsc2hs
index 9483ad1006..738f3666c8 160000
--- a/utils/hsc2hs
+++ b/utils/hsc2hs
@@ -1 +1 @@
-Subproject commit 9483ad10064fbbb97ab525280623826b1ef63959
+Subproject commit 738f3666c878ee9e79c3d5e819ef8b3460288edf

So I guess this is no surprise :P

@Ericson2314
Copy link
Member

Fixed by #40210. Thanks both of you!!

Ericson2314 added a commit that referenced this issue May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants