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

haskell.compiler.ghcjs has broken #208812

Closed
sternenseemann opened this issue Jan 2, 2023 · 15 comments · Fixed by #228749
Closed

haskell.compiler.ghcjs has broken #208812

sternenseemann opened this issue Jan 2, 2023 · 15 comments · Fixed by #228749
Labels

Comments

@sternenseemann
Copy link
Member

This is presumably a result of #202022, but is hard to determine. I have already fixed some build failures leading up to ghcjs (webdriver and optparse-applicative) and we are now left with the following failure I don't understand:

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/knhmxnsygz5v4dl5fhs827hnlgcbga6j-configured-ghcjs-src
source root is configured-ghcjs-src
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/19mli31i0k0fb93vbr994m4xak65yapl-ghcjs-aeson-2.0.patch
patching file ghcjs.cabal
Hunk #1 succeeded at 170 with fuzz 1.
patching file src-bin/Boot.hs
patching file src/Compiler/JMacro/Base.hs
patching file src/Gen2/Linker.hs
Hunk #3 succeeded at 526 (offset -1 lines).
patching file test/TestRunner.hs
applying patch /nix/store/1gdmj35whkam4bp7s1ck1f06sp020f9z-base-CTime-64-bit-with-ghcjs.patch
patching file lib/patches/base.patch
@nix { "action": "setPhase", "phase": "buildPhase" }
building
program ghc found at /nix/store/42i3xfwmadav6cp30mmcsfy2jznr9s7z-ghc-8.10.7/bin/ghc
program cabal found at /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal
program node found at /nix/store/7ppnyqmp1c92gkfrixbz99sw7q6ifkg1-nodejs-18.12.1/bin/node


===========================================================================

   Boot libraries installation for GHCJS

===========================================================================

   ghcjs-boot will install the libraries and runtime system for GHCJS


  boot program
  ------------

   ghcjs-boot program version   8.10.7                                                                          
                file location   /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/.ghcjs-boot-wrapped
                last modified   2023-01-02 21:14:56.499543172 UTC                                               
   
         boot source location   /build/configured-ghcjs-src/lib/boot                                            
            current directory   /build/configured-ghcjs-src/lib/boot                                            

  boot configuration
  ------------------

   installation directory   /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7                                
        global package DB   /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/package.conf.d
              GHC version   <unknown>                                                                               
                 location   /nix/store/42i3xfwmadav6cp30mmcsfy2jznr9s7z-ghc-8.10.7/bin/ghc                          
    cabal-install version   <unknown>                                                                               
                 location   /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal             
   

  packages
  --------

   stage 1a

   - integer-gmp
   - base
   - transformers

   ghcjs-prim:  ghcjs-prim

   stage 1b

   - array
   - deepseq
   - containers
   - bytestring
   - binary
   - filepath
   - time
   - unix
   - directory
   - pretty
   - mtl
   - ghc-boot-th
   - template-haskell
   - text
   - parsec
   - ghc-boot
   - ghc-compact
   - ghc-heap
   - ghci
   - process
   - ghc

   Cabal:  Cabal




===========================================================================

   Configured programs

===========================================================================

   program   version   location                                                                   
                                                                                                  
   ghc       -         /nix/store/42i3xfwmadav6cp30mmcsfy2jznr9s7z-ghc-8.10.7/bin/ghc             
   cabal     -         /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal
   node      -         /nix/store/7ppnyqmp1c92gkfrixbz99sw7q6ifkg1-nodejs-18.12.1/bin/node        


/build/configured-ghcjs-src/lib/boot$ rm_rf /build/.ghcjs/x86_64-linux-8.10.7-8.10.7/cache
preparing GHCJS library directory
(BootLocations {_blSourceDir = "/build/configured-ghcjs-src/lib/boot", _blBuildDir = "/build/configured-ghcjs-src/lib/boot", _blGhcjsTopDir = "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7", _blGlobalDB = "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/package.conf.d", _blEmsdk = "/nix/store/qs4smbrvsr7ly6gcgs1p3dmf37rlkgx2-emsdk"},BootPrograms {_bpGhc = Program {_pgmName = "ghc", _pgmSearch = "ghc", _pgmVersion = Nothing, _pgmLoc = Just "/nix/store/42i3xfwmadav6cp30mmcsfy2jznr9s7z-ghc-8.10.7/bin/ghc", _pgmArgs = []}, _bpCabal = Program {_pgmName = "cabal", _pgmSearch = "cabal", _pgmVersion = Nothing, _pgmLoc = Just "/nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal", _pgmArgs = []}, _bpNode = Program {_pgmName = "node", _pgmSearch = "node", _pgmVersion = Nothing, _pgmLoc = Just "/nix/store/7ppnyqmp1c92gkfrixbz99sw7q6ifkg1-nodejs-18.12.1/bin/node", _pgmArgs = []}})
/build/configured-ghcjs-src/lib/boot$ mkdir_p /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin
copying GHCJS executables
/build/configured-ghcjs-src/lib/boot$ cp /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/private-ghcjs-unlit -> /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/unlit
/build/configured-ghcjs-src/lib/boot$ cp /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/private-ghcjs-run -> /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/run
creating emscripten wrapper
installing wrapper for: ("emcc",Nothing,"/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin","/build/configured-ghcjs-src/lib/boot/input/wrappers","/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin")
adding RTS package
creating package databases
/build/configured-ghcjs-src/lib/boot$ rm_rf /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/package.conf.d
/build/configured-ghcjs-src/lib/boot$ /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs-pkg "init" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/package.conf.d"
/build/configured-ghcjs-src/lib/boot$ /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs-pkg "recache" "--global"
WARNING: settings file doesn't exist "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/settings"
cannot know target platform so guessing target == host (native compiler).
/build/configured-ghcjs-src/lib/boot$ /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs-pkg "recache" "--global" "--no-user-package-db"
/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7$ mkdir_p ghcjs-node
/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/ghcjs-node$ /nix/store/7ppnyqmp1c92gkfrixbz99sw7q6ifkg1-nodejs-18.12.1/bin/npm "rebuild"
rebuilt dependencies successfully
/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7$ current directory: /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7
/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7$ [ghc]: /nix/store/42i3xfwmadav6cp30mmcsfy2jznr9s7z-ghc-8.10.7/bin/ghc "-c" "empty.c"
RTS prepared
configuring package: ghc-prim
/build/configured-ghcjs-src/lib/boot/pkg/ghc-prim$ /nix/store/42i3xfwmadav6cp30mmcsfy2jznr9s7z-ghc-8.10.7/bin/ghc "Setup.hs"
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )

�[;1mSetup.hs:18:1: �[;1m�[35mwarning:�[0m�[0m�[;1m [�[;1m�[35m-Wdeprecations�[0m�[0m�[;1m]�[0m�[0m�[;1m
    Module `System.Cmd' is deprecated: Use "System.Process" instead�[0m�[0m
�[;1m�[34m   |�[0m�[0m
�[;1m�[34m18 |�[0m�[0m �[;1m�[35mimport System.Cmd�[0m�[0m
�[;1m�[34m   |�[0m�[0m�[;1m�[35m ^^^^^^^^^^^^^^^^^�[0m�[0m
�[0m�[0m�[0mLinking Setup ...
/build/configured-ghcjs-src/lib/boot/pkg/ghc-prim$ ./Setup "configure" "--global" "--ghcjs" "--builddir" "dist" "--with-compiler" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs" "--with-hc-pkg" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs-pkg" "--with-haddock" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/haddock" "--with-gcc" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc" "--prefix" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7" "--configure-option" "--host=js-unknown-ghcjs" "--ghcjs-options=-fwrite-ide-info" "--enable-debug-info" "--disable-library-stripping" "--disable-executable-stripping" "-fghci" "--enable-profiling" "--enable-shared"
Configuring ghc-prim-0.6.1...
/build/configured-ghcjs-src/lib/boot/pkg/ghc-prim$ ./Setup "build"
Preprocessing library for ghc-prim-0.6.1..
Building library for ghc-prim-0.6.1..
[1 of 9] Compiling GHC.Types        ( GHC/Types.hs, dist/build/GHC/Types.js_o, dist/build/GHC/Types.js_dyn_o )
[2 of 9] Compiling GHC.Prim.Ext     ( GHC/Prim/Ext.hs, dist/build/GHC/Prim/Ext.js_o, dist/build/GHC/Prim/Ext.js_dyn_o )
[3 of 9] Compiling GHC.Magic        ( GHC/Magic.hs, dist/build/GHC/Magic.js_o, dist/build/GHC/Magic.js_dyn_o )
[4 of 9] Compiling GHC.IntWord64    ( GHC/IntWord64.hs, dist/build/GHC/IntWord64.js_o, dist/build/GHC/IntWord64.js_dyn_o )
[5 of 9] Compiling GHC.CString      ( GHC/CString.hs, dist/build/GHC/CString.js_o, dist/build/GHC/CString.js_dyn_o )
[6 of 9] Compiling GHC.Tuple        ( GHC/Tuple.hs, dist/build/GHC/Tuple.js_o, dist/build/GHC/Tuple.js_dyn_o )
[7 of 9] Compiling GHC.PrimopWrappers ( GHC/PrimopWrappers.hs, dist/build/GHC/PrimopWrappers.js_o, dist/build/GHC/PrimopWrappers.js_dyn_o )
[8 of 9] Compiling GHC.Debug        ( GHC/Debug.hs, dist/build/GHC/Debug.js_o, dist/build/GHC/Debug.js_dyn_o )
[9 of 9] Compiling GHC.Classes      ( GHC/Classes.hs, dist/build/GHC/Classes.js_o, dist/build/GHC/Classes.js_dyn_o )
[1 of 9] Compiling GHC.Types        ( GHC/Types.hs, dist/build/GHC/Types.js_p_o )
[2 of 9] Compiling GHC.Prim.Ext     ( GHC/Prim/Ext.hs, dist/build/GHC/Prim/Ext.js_p_o )
[3 of 9] Compiling GHC.Magic        ( GHC/Magic.hs, dist/build/GHC/Magic.js_p_o )
[4 of 9] Compiling GHC.IntWord64    ( GHC/IntWord64.hs, dist/build/GHC/IntWord64.js_p_o )
[5 of 9] Compiling GHC.CString      ( GHC/CString.hs, dist/build/GHC/CString.js_p_o )
[6 of 9] Compiling GHC.Tuple        ( GHC/Tuple.hs, dist/build/GHC/Tuple.js_p_o )
[7 of 9] Compiling GHC.PrimopWrappers ( GHC/PrimopWrappers.hs, dist/build/GHC/PrimopWrappers.js_p_o )
[8 of 9] Compiling GHC.Debug        ( GHC/Debug.hs, dist/build/GHC/Debug.js_p_o )
[9 of 9] Compiling GHC.Classes      ( GHC/Classes.hs, dist/build/GHC/Classes.js_p_o )
/build/configured-ghcjs-src/lib/boot/pkg/ghc-prim$ ./Setup "copy"
Installing library in /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/js-ghcjs-ghcjs-8.10.7-ghc8_10_7/ghc-prim-0.6.1-7Cgvu6TLhQr9ma5lroclUe
/build/configured-ghcjs-src/lib/boot/pkg/ghc-prim$ ./Setup "register"
Registering library for ghc-prim-0.6.1..
installing package integer-gmp
configuring package: integer-gmp
/build/configured-ghcjs-src/lib/boot/pkg/integer-gmp$ /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal "v1-configure" "--global" "--ghcjs" "--builddir" "dist" "--with-compiler" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs" "--with-hc-pkg" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs-pkg" "--with-haddock" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/haddock" "--with-gcc" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc" "--prefix" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7" "--configure-option" "--host=js-unknown-ghcjs" "--ghcjs-options=-fwrite-ide-info" "--enable-debug-info" "--disable-library-stripping" "--disable-executable-stripping" "-fghci" "--enable-profiling" "--enable-shared"
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.8.1.0 supports
'ghc' version < 8.8):
/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs is based on
GHC version 8.10.7
Warning: No remote package servers have been specified. Usually you would have
one specified in the config file.
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
[__0] next goal: integer-gmp (user goal)
[__0] rejecting: integer-gmp-1.0.3.0 (only already installed instances can be
used)
[__0] fail (backjumping, conflict set: integer-gmp)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: integer-gmp
Trying configure anyway.
Configuring integer-gmp-1.0.3.0...
configure: WARNING: unrecognized options: --with-compiler, --with-hc-pkg
checking for js-ghcjs-gcc... /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc
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 the compiler supports GNU C... yes
checking whether /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc accepts -g... yes
checking for /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for __gmpz_powm in -lgmp... no
checking for __gmpz_powm in -lgmp3... no
checking whether to use in-tree GMP... yes
checking GMP version... 5.0.4
configure: creating ./config.status
config.status: creating integer-gmp.buildinfo
config.status: creating config.mk
config.status: creating include/HsIntegerGmp.h
configure: WARNING: unrecognized options: --with-compiler, --with-hc-pkg
/build/configured-ghcjs-src/lib/boot/pkg/integer-gmp$ /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal "v1-build"
Preprocessing library for integer-gmp-1.0.3.0..
Building library for integer-gmp-1.0.3.0..
[1 of 5] Compiling GHC.Integer.Type ( src/GHC/Integer/Type.hs, dist/build/GHC/Integer/Type.js_o, dist/build/GHC/Integer/Type.js_dyn_o )
[2 of 5] Compiling GHC.Integer.Logarithms ( src/GHC/Integer/Logarithms.hs, dist/build/GHC/Integer/Logarithms.js_o, dist/build/GHC/Integer/Logarithms.js_dyn_o )
[3 of 5] Compiling GHC.Integer.Logarithms.Internals ( src/GHC/Integer/Logarithms/Internals.hs, dist/build/GHC/Integer/Logarithms/Internals.js_o, dist/build/GHC/Integer/Logarithms/Internals.js_dyn_o )
[4 of 5] Compiling GHC.Integer      ( src/GHC/Integer.hs, dist/build/GHC/Integer.js_o, dist/build/GHC/Integer.js_dyn_o )
[5 of 5] Compiling GHC.Integer.GMP.Internals ( src/GHC/Integer/GMP/Internals.hs, dist/build/GHC/Integer/GMP/Internals.js_o, dist/build/GHC/Integer/GMP/Internals.js_dyn_o )
[1 of 5] Compiling GHC.Integer.Type ( src/GHC/Integer/Type.hs, dist/build/GHC/Integer/Type.js_p_o )
[2 of 5] Compiling GHC.Integer.Logarithms ( src/GHC/Integer/Logarithms.hs, dist/build/GHC/Integer/Logarithms.js_p_o )
[3 of 5] Compiling GHC.Integer.Logarithms.Internals ( src/GHC/Integer/Logarithms/Internals.hs, dist/build/GHC/Integer/Logarithms/Internals.js_p_o )
[4 of 5] Compiling GHC.Integer      ( src/GHC/Integer.hs, dist/build/GHC/Integer.js_p_o )
[5 of 5] Compiling GHC.Integer.GMP.Internals ( src/GHC/Integer/GMP/Internals.hs, dist/build/GHC/Integer/GMP/Internals.js_p_o )
/build/configured-ghcjs-src/lib/boot/pkg/integer-gmp$ /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal "v1-copy"
Installing library in /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/js-ghcjs-ghcjs-8.10.7-ghc8_10_7/integer-gmp-1.0.3.0-63uAhGZ1DDrBtoXgnrDqDZ
/build/configured-ghcjs-src/lib/boot/pkg/integer-gmp$ /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal "v1-register"
Registering library for integer-gmp-1.0.3.0..
installing package base
configuring package: base
/build/configured-ghcjs-src/lib/boot/pkg/base$ /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal "v1-configure" "--global" "--ghcjs" "--builddir" "dist" "--with-compiler" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs" "--with-hc-pkg" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs-pkg" "--with-haddock" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/haddock" "--with-gcc" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc" "--prefix" "/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7" "--configure-option" "--host=js-unknown-ghcjs" "--ghcjs-options=-fwrite-ide-info" "--enable-debug-info" "--disable-library-stripping" "--disable-executable-stripping" "-fghci" "--enable-profiling" "--enable-shared"
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.8.1.0 supports
'ghc' version < 8.8):
/nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/bin/ghcjs is based on
GHC version 8.10.7
Warning: No remote package servers have been specified. Usually you would have
one specified in the config file.
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
[__0] next goal: base (user goal)
[__0] rejecting: base-4.14.3.0 (only already installed instances can be used)
[__0] fail (backjumping, conflict set: base)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base
Trying configure anyway.
Configuring base-4.14.3.0...
configure: WARNING: unrecognized options: --with-compiler, --with-hc-pkg
checking for js-ghcjs-gcc... /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc
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 the compiler supports GNU C... yes
checking whether /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc accepts -g... yes
checking for /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for WINDOWS platform... NO
checking for long long... yes
checking for ctype.h... yes
checking for errno.h... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking for limits.h... yes
checking for signal.h... yes
checking for sys/file.h... yes
checking for sys/resource.h... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/syscall.h... yes
checking for sys/time.h... yes
checking for sys/timeb.h... yes
checking for sys/timers.h... no
checking for sys/times.h... yes
checking for sys/types.h... (cached) yes
checking for sys/utsname.h... yes
checking for sys/wait.h... yes
checking for termios.h... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking for utime.h... yes
checking for windows.h... no
checking for winsock.h... no
checking for langinfo.h... yes
checking for poll.h... yes
checking for sys/epoll.h... yes
checking for sys/event.h... no
checking for sys/eventfd.h... yes
checking for sys/socket.h... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for wctype.h... yes
checking for iswspace... yes
checking for lstat... yes
checking for clock_gettime in -lrt... yes
checking for clock_gettime... yes
checking for getclock... no
checking for getrusage... yes
checking for times... yes
checking for _chsize... no
checking for ftruncate... yes
checking for epoll_ctl... no
checking for eventfd... no
checking for kevent... no
checking for kevent64... no
checking for kqueue... no
checking for poll... yes
checking for /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc options needed to detect all undeclared functions... none needed
checking whether F_OFD_SETLK is declared... yes
checking for flock... yes
checking for unsetenv... yes
checking how to run the C preprocessor... /nix/store/a45p8r1i0nmcw3pmxqmh0h1kfa0arh5d-ghcjs-8.10.7/lib/ghcjs-8.10.7/bin/emcc -E
checking for grep that handles long lines and -e... /nix/store/bcvccw6y9bfil6xrl5j7psza7hnd16ry-gnugrep-3.7/bin/grep
checking for egrep... /nix/store/bcvccw6y9bfil6xrl5j7psza7hnd16ry-gnugrep-3.7/bin/grep -E
checking return type of unsetenv... int
checking Haskell type for char... Int8
checking Haskell type for signed char... Int8
checking Haskell type for unsigned char... Word8
checking Haskell type for short... Int16
checking Haskell type for unsigned short... Word16
checking Haskell type for int... Int32
checking Haskell type for unsigned int... Word32
checking Haskell type for long... Int32
checking Haskell type for unsigned long... Word32
checking Haskell type for long long... Int64
checking Haskell type for unsigned long long... Word64
checking Haskell type for bool... Word8
checking Haskell type for float... Float
checking Haskell type for double... Double
checking Haskell type for ptrdiff_t... Int32
checking Haskell type for size_t... Word32
checking Haskell type for wchar_t... Int32
checking Haskell type for sig_atomic_t... Int32
checking Haskell type for clock_t... Int32
checking Haskell type for time_t... Int64
checking Haskell type for useconds_t... Word32
checking Haskell type for suseconds_t... Int32
checking Haskell type for dev_t... Word32
checking Haskell type for ino_t... Word64
checking Haskell type for mode_t... Word32
checking Haskell type for off_t... Int64
checking Haskell type for pid_t... Int32
checking Haskell type for gid_t... Word32
checking Haskell type for uid_t... Word32
checking Haskell type for cc_t... Word8
checking Haskell type for speed_t... Word32
checking Haskell type for tcflag_t... Word32
checking Haskell type for nlink_t... Word32
checking Haskell type for ssize_t... Int32
checking Haskell type for rlim_t... Word64
checking Haskell type for blksize_t... Int32
checking Haskell type for blkcnt_t... Int32
checking Haskell type for clockid_t... Int32
checking Haskell type for fsblkcnt_t... Word32
checking Haskell type for fsfilcnt_t... Word32
checking Haskell type for id_t... Word32
checking Haskell type for key_t... Int32
checking Haskell type for timer_t... Ptr ()
checking Haskell type for socklen_t... Word32
checking Haskell type for nfds_t... Word32
checking Haskell type for intptr_t... Int32
checking Haskell type for uintptr_t... Word32
checking Haskell type for intmax_t... Int64
checking Haskell type for uintmax_t... Word64
checking value of E2BIG... 1
checking value of EACCES... 2
checking value of EADDRINUSE... 3
checking value of EADDRNOTAVAIL... 4
checking value of EADV... 122
checking value of EAFNOSUPPORT... 5
checking value of EAGAIN... 6
checking value of EALREADY... 7
checking value of EBADF... 8
checking value of EBADMSG... 9
checking value of EBADRPC... -1
checking value of EBUSY... 10
checking value of ECHILD... 12
checking value of ECOMM... 124
checking value of ECONNABORTED... 13
checking value of ECONNREFUSED... 14
checking value of ECONNRESET... 15
checking value of EDEADLK... 16
checking value of EDESTADDRREQ... 17
checking value of EDIRTY... -1
checking value of EDOM... 18
checking value of EDQUOT... 19
checking value of EEXIST... 20
checking value of EFAULT... 21
checking value of EFBIG... 22
checking value of EFTYPE... -1
checking value of EHOSTDOWN... 142
checking value of EHOSTUNREACH... 23
checking value of EIDRM... 24
checking value of EILSEQ... 25
checking value of EINPROGRESS... 26
checking value of EINTR... 27
checking value of EINVAL... 28
checking value of EIO... 29
checking value of EISCONN... 30
checking value of EISDIR... 31
checking value of ELOOP... 32
checking value of EMFILE... 33
checking value of EMLINK... 34
checking value of EMSGSIZE... 35
checking value of EMULTIHOP... 36
checking value of ENAMETOOLONG... 37
checking value of ENETDOWN... 38
checking value of ENETRESET... 39
checking value of ENETUNREACH... 40
checking value of ENFILE... 41
checking value of ENOBUFS... 42
checking value of ENODATA... 116
checking value of ENODEV... 43
checking value of ENOENT... 44
checking value of ENOEXEC... 45
checking value of ENOLCK... 46
checking value of ENOLINK... 47
checking value of ENOMEM... 48
checking value of ENOMSG... 49
checking value of ENONET... 119
checking value of ENOPROTOOPT... 50
checking value of ENOSPC... 51
checking value of ENOSR... 118
checking value of ENOSTR... 100
checking value of ENOSYS... 52
checking value of ENOTBLK... 105
checking value of ENOTCONN... 53
checking value of ENOTDIR... 54
checking value of ENOTEMPTY... 55
checking value of ENOTSOCK... 57
checking value of ENOTTY... 59
checking value of ENXIO... 60
checking value of EOPNOTSUPP... 138
checking value of EPERM... 63
checking value of EPFNOSUPPORT... 139
checking value of EPIPE... 64
checking value of EPROCLIM... -1
checking value of EPROCUNAVAIL... -1
checking value of EPROGMISMATCH... -1
checking value of EPROGUNAVAIL... -1
checking value of EPROTO... 65
checking value of EPROTONOSUPPORT... 66
checking value of EPROTOTYPE... 67
checking value of ERANGE... 68
checking value of EREMCHG... 128
checking value of EREMOTE... 121
checking value of EROFS... 69
checking value of ERPCMISMATCH... -1
checking value of ERREMOTE... -1
checking value of ESHUTDOWN... 140
checking value of ESOCKTNOSUPPORT... 137
checking value of ESPIPE... 70
checking value of ESRCH... 71
checking value of ESRMNT... 123
checking value of ESTALE... 72
checking value of ETIME... 117
checking value of ETIMEDOUT... 73
checking value of ETOOMANYREFS... 141
checking value of ETXTBSY... 74
checking value of EUSERS... 136
checking value of EWOULDBLOCK... 6
checking value of EXDEV... 75
checking value of ENOCIGAR... -1
checking value of ENOTSUP... 138
checking value of SIGINT... 2
checking value of O_BINARY... 0
checking for library containing iconv... none required
checking for library containing locale_charset... no
checking for struct MD5Context... yes
checking size of struct MD5Context... 88
configure: creating ./config.status
config.status: creating base.buildinfo
config.status: creating include/HsBaseConfig.h
config.status: creating include/EventConfig.h
configure: WARNING: unrecognized options: --with-compiler, --with-hc-pkg
/build/configured-ghcjs-src/lib/boot/pkg/base$ /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal "v1-build"
Preprocessing library for base-4.14.3.0..
Building library for base-4.14.3.0..
[  1 of 239] Compiling GHC.Exception.Type[boot] ( GHC/Exception/Type.hs-boot, dist/build/GHC/Exception/Type.js_o-boot, dist/build/GHC/Exception/Type.js_dyn_o )
[  2 of 239] Compiling GHC.IO[boot]     ( GHC/IO.hs-boot, dist/build/GHC/IO.js_o-boot, dist/build/GHC/IO.js_dyn_o )
[  3 of 239] Compiling GHC.Maybe        ( GHC/Maybe.hs, dist/build/GHC/Maybe.js_o, dist/build/GHC/Maybe.js_dyn_o )
[  4 of 239] Compiling GHC.Base[boot]   ( GHC/Base.hs-boot, dist/build/GHC/Base.js_o-boot, dist/build/GHC/Base.js_dyn_o )
[  5 of 239] Compiling GHC.Natural      ( GHC/Natural.hs, dist/build/GHC/Natural.js_o, dist/build/GHC/Natural.js_dyn_o )
[  6 of 239] Compiling GHC.Real[boot]   ( GHC/Real.hs-boot, dist/build/GHC/Real.js_o-boot, dist/build/GHC/Real.js_dyn_o )
[  7 of 239] Compiling Data.Semigroup.Internal[boot] ( Data/Semigroup/Internal.hs-boot, dist/build/Data/Semigroup/Internal.js_o-boot, dist/build/Data/Semigroup/Internal.js_dyn_o )
[  8 of 239] Compiling GHC.Stack.Types  ( GHC/Stack/Types.hs, dist/build/GHC/Stack/Types.js_o, dist/build/GHC/Stack/Types.js_dyn_o )
[  9 of 239] Compiling GHC.Exception[boot] ( GHC/Exception.hs-boot, dist/build/GHC/Exception.js_o-boot, dist/build/GHC/Exception.js_dyn_o )
[ 10 of 239] Compiling GHC.Err          ( GHC/Err.hs, dist/build/GHC/Err.js_o, dist/build/GHC/Err.js_dyn_o )
[ 11 of 239] Compiling GHC.Base         ( GHC/Base.hs, dist/build/GHC/Base.js_o, dist/build/GHC/Base.js_dyn_o )
[ 12 of 239] Compiling GHC.Stack.CCS[boot] ( dist/build/GHC/Stack/CCS.hs-boot, dist/build/GHC/Stack/CCS.js_o-boot, dist/build/GHC/Stack/CCS.js_dyn_o )
[ 13 of 239] Compiling GHC.Profiling    ( GHC/Profiling.hs, dist/build/GHC/Profiling.js_o, dist/build/GHC/Profiling.js_dyn_o )
[ 14 of 239] Compiling GHC.Num          ( GHC/Num.hs, dist/build/GHC/Num.js_o, dist/build/GHC/Num.js_dyn_o )
[ 15 of 239] Compiling GHC.MVar         ( GHC/MVar.hs, dist/build/GHC/MVar.js_o, dist/build/GHC/MVar.js_dyn_o )
[ 16 of 239] Compiling GHC.IO.Unsafe    ( GHC/IO/Unsafe.hs, dist/build/GHC/IO/Unsafe.js_o, dist/build/GHC/IO/Unsafe.js_dyn_o )
[ 17 of 239] Compiling GHC.IO.Handle.Lock.Windows ( dist/build/GHC/IO/Handle/Lock/Windows.hs, dist/build/GHC/IO/Handle/Lock/Windows.js_o, dist/build/GHC/IO/Handle/Lock/Windows.js_dyn_o )
[ 18 of 239] Compiling GHC.IO.Encoding.CodePage ( GHC/IO/Encoding/CodePage.hs, dist/build/GHC/IO/Encoding/CodePage.js_o, dist/build/GHC/IO/Encoding/CodePage.js_dyn_o )
[ 19 of 239] Compiling GHC.GHCi         ( GHC/GHCi.hs, dist/build/GHC/GHCi.js_o, dist/build/GHC/GHCi.js_dyn_o )
[ 20 of 239] Compiling GHC.Float.RealFracMethods ( GHC/Float/RealFracMethods.hs, dist/build/GHC/Float/RealFracMethods.js_o, dist/build/GHC/Float/RealFracMethods.js_dyn_o )
[ 21 of 239] Compiling GHC.Float.ConversionUtils ( GHC/Float/ConversionUtils.hs, dist/build/GHC/Float/ConversionUtils.js_o, dist/build/GHC/Float/ConversionUtils.js_dyn_o )
[ 22 of 239] Compiling GHC.Constants    ( GHC/Constants.hs, dist/build/GHC/Constants.js_o, dist/build/GHC/Constants.js_dyn_o )
[ 23 of 239] Compiling GHC.ConsoleHandler ( GHC/ConsoleHandler.hs, dist/build/GHC/ConsoleHandler.js_o, dist/build/GHC/ConsoleHandler.js_dyn_o )
[ 24 of 239] Compiling Data.Tuple       ( Data/Tuple.hs, dist/build/Data/Tuple.js_o, dist/build/Data/Tuple.js_dyn_o )
[ 25 of 239] Compiling Data.Functor     ( Data/Functor.hs, dist/build/Data/Functor.js_o, dist/build/Data/Functor.js_dyn_o )
[ 26 of 239] Compiling Data.Function    ( Data/Function.hs, dist/build/Data/Function.js_o, dist/build/Data/Function.js_dyn_o )
[ 27 of 239] Compiling Data.Eq          ( Data/Eq.hs, dist/build/Data/Eq.js_o, dist/build/Data/Eq.js_dyn_o )
[ 28 of 239] Compiling Data.Coerce      ( Data/Coerce.hs, dist/build/Data/Coerce.js_o, dist/build/Data/Coerce.js_dyn_o )
[ 29 of 239] Compiling Data.Functor.Utils ( Data/Functor/Utils.hs, dist/build/Data/Functor/Utils.js_o, dist/build/Data/Functor/Utils.js_dyn_o )
[ 30 of 239] Compiling Data.Bool        ( Data/Bool.hs, dist/build/Data/Bool.js_o, dist/build/Data/Bool.js_dyn_o )
[ 31 of 239] Compiling Data.Type.Bool   ( Data/Type/Bool.hs, dist/build/Data/Type/Bool.js_o, dist/build/Data/Type/Bool.js_dyn_o )
[ 32 of 239] Compiling Control.Monad.Fail ( Control/Monad/Fail.hs, dist/build/Control/Monad/Fail.js_o, dist/build/Control/Monad/Fail.js_dyn_o )
[ 33 of 239] Compiling Data.Maybe       ( Data/Maybe.hs, dist/build/Data/Maybe.js_o, dist/build/Data/Maybe.js_dyn_o )
[ 34 of 239] Compiling GHC.List         ( GHC/List.hs, dist/build/GHC/List.js_o, dist/build/GHC/List.js_dyn_o )
[ 35 of 239] Compiling GHC.Show         ( GHC/Show.hs, dist/build/GHC/Show.js_o, dist/build/GHC/Show.js_dyn_o )
[ 36 of 239] Compiling GHC.ST           ( GHC/ST.hs, dist/build/GHC/ST.js_o, dist/build/GHC/ST.js_dyn_o )
[ 37 of 239] Compiling GHC.STRef        ( GHC/STRef.hs, dist/build/GHC/STRef.js_o, dist/build/GHC/STRef.js_dyn_o )
[ 38 of 239] Compiling GHC.Char         ( GHC/Char.hs, dist/build/GHC/Char.js_o, dist/build/GHC/Char.js_dyn_o )
[ 39 of 239] Compiling GHC.Enum         ( GHC/Enum.hs, dist/build/GHC/Enum.js_o, dist/build/GHC/Enum.js_dyn_o )
[ 40 of 239] Compiling GHC.Real         ( GHC/Real.hs, dist/build/GHC/Real.js_o, dist/build/GHC/Real.js_dyn_o )
[ 41 of 239] Compiling GHC.Ix           ( GHC/Ix.hs, dist/build/GHC/Ix.js_o, dist/build/GHC/Ix.js_dyn_o )
[ 42 of 239] Compiling GHC.Arr          ( GHC/Arr.hs, dist/build/GHC/Arr.js_o, dist/build/GHC/Arr.js_dyn_o )
[ 43 of 239] Compiling Data.Bits        ( Data/Bits.hs, dist/build/Data/Bits.js_o, dist/build/Data/Bits.js_dyn_o )
[ 44 of 239] Compiling GHC.Unicode      ( GHC/Unicode.hs, dist/build/GHC/Unicode.js_o, dist/build/GHC/Unicode.js_dyn_o )
[ 45 of 239] Compiling GHC.Weak         ( GHC/Weak.hs, dist/build/GHC/Weak.js_o, dist/build/GHC/Weak.js_dyn_o )
[ 46 of 239] Compiling GHC.Word         ( GHC/Word.hs, dist/build/GHC/Word.js_o, dist/build/GHC/Word.js_dyn_o )
[ 47 of 239] Compiling GHC.Float        ( GHC/Float.hs, dist/build/GHC/Float.js_o, dist/build/GHC/Float.js_dyn_o )
[ 48 of 239] Compiling Numeric.Natural  ( Numeric/Natural.hs, dist/build/Numeric/Natural.js_o, dist/build/Numeric/Natural.js_dyn_o )
[ 49 of 239] Compiling Text.ParserCombinators.ReadP ( Text/ParserCombinators/ReadP.hs, dist/build/Text/ParserCombinators/ReadP.js_o, dist/build/Text/ParserCombinators/ReadP.js_dyn_o )
[ 50 of 239] Compiling Text.ParserCombinators.ReadPrec ( Text/ParserCombinators/ReadPrec.hs, dist/build/Text/ParserCombinators/ReadPrec.js_o, dist/build/Text/ParserCombinators/ReadPrec.js_dyn_o )
[ 51 of 239] Compiling Text.Read.Lex    ( Text/Read/Lex.hs, dist/build/Text/Read/Lex.js_o, dist/build/Text/Read/Lex.js_dyn_o )
[ 52 of 239] Compiling GHC.Read         ( GHC/Read.hs, dist/build/GHC/Read.js_o, dist/build/GHC/Read.js_dyn_o )
[ 53 of 239] Compiling Numeric          ( Numeric.hs, dist/build/Numeric.js_o, dist/build/Numeric.js_dyn_o )
[ 54 of 239] Compiling GHC.Ptr          ( GHC/Ptr.hs, dist/build/GHC/Ptr.js_o, dist/build/GHC/Ptr.js_dyn_o )
[ 55 of 239] Compiling GHC.Stable       ( GHC/Stable.hs, dist/build/GHC/Stable.js_o, dist/build/GHC/Stable.js_dyn_o )
[ 56 of 239] Compiling Foreign.StablePtr ( Foreign/StablePtr.hs, dist/build/Foreign/StablePtr.js_o, dist/build/Foreign/StablePtr.js_dyn_o )
[ 57 of 239] Compiling GHC.Pack         ( GHC/Pack.hs, dist/build/GHC/Pack.js_o, dist/build/GHC/Pack.js_dyn_o )
[ 58 of 239] Compiling GHC.Fingerprint.Type ( GHC/Fingerprint/Type.hs, dist/build/GHC/Fingerprint/Type.js_o, dist/build/GHC/Fingerprint/Type.js_dyn_o )
[ 59 of 239] Compiling GHC.Fingerprint[boot] ( GHC/Fingerprint.hs-boot, dist/build/GHC/Fingerprint.js_o-boot, dist/build/GHC/Fingerprint.js_dyn_o )
[ 60 of 239] Compiling GHC.Int          ( GHC/Int.hs, dist/build/GHC/Int.js_o, dist/build/GHC/Int.js_dyn_o )
[ 61 of 239] Compiling GHC.Storable     ( GHC/Storable.hs, dist/build/GHC/Storable.js_o, dist/build/GHC/Storable.js_dyn_o )
[ 62 of 239] Compiling Foreign.Storable ( Foreign/Storable.hs, dist/build/Foreign/Storable.js_o, dist/build/Foreign/Storable.js_dyn_o )
[ 63 of 239] Compiling Data.Int         ( Data/Int.hs, dist/build/Data/Int.js_o, dist/build/Data/Int.js_dyn_o )
[ 64 of 239] Compiling GHC.IO.IOMode    ( GHC/IO/IOMode.hs, dist/build/GHC/IO/IOMode.js_o, dist/build/GHC/IO/IOMode.js_dyn_o )
[ 65 of 239] Compiling Foreign.Ptr      ( Foreign/Ptr.hs, dist/build/Foreign/Ptr.js_o, dist/build/Foreign/Ptr.js_dyn_o )
[ 66 of 239] Compiling Data.Word        ( Data/Word.hs, dist/build/Data/Word.js_o, dist/build/Data/Word.js_dyn_o )
[ 67 of 239] Compiling GHC.Clock        ( dist/build/GHC/Clock.hs, dist/build/GHC/Clock.js_o, dist/build/GHC/Clock.js_dyn_o )
[ 68 of 239] Compiling Foreign.C.Types  ( Foreign/C/Types.hs, dist/build/Foreign/C/Types.js_o, dist/build/Foreign/C/Types.js_dyn_o )
[ 69 of 239] Compiling Data.Type.Equality ( Data/Type/Equality.hs, dist/build/Data/Type/Equality.js_o, dist/build/Data/Type/Equality.js_dyn_o )
[ 70 of 239] Compiling Data.Type.Coercion ( Data/Type/Coercion.hs, dist/build/Data/Type/Coercion.js_o, dist/build/Data/Type/Coercion.js_dyn_o )
[ 71 of 239] Compiling Control.Category ( Control/Category.hs, dist/build/Control/Category.js_o, dist/build/Control/Category.js_dyn_o )
[ 72 of 239] Compiling Data.Proxy       ( Data/Proxy.hs, dist/build/Data/Proxy.js_o, dist/build/Data/Proxy.js_dyn_o )
[ 73 of 239] Compiling Data.Ord         ( Data/Ord.hs, dist/build/Data/Ord.js_o, dist/build/Data/Ord.js_dyn_o )
[ 74 of 239] Compiling Data.Either      ( Data/Either.hs, dist/build/Data/Either.js_o, dist/build/Data/Either.js_dyn_o )
[ 75 of 239] Compiling Text.Read        ( Text/Read.hs, dist/build/Text/Read.js_o, dist/build/Text/Read.js_dyn_o )
[ 76 of 239] Compiling Data.Char        ( Data/Char.hs, dist/build/Data/Char.js_o, dist/build/Data/Char.js_dyn_o )
[ 77 of 239] Compiling Data.OldList     ( Data/OldList.hs, dist/build/Data/OldList.js_o, dist/build/Data/OldList.js_dyn_o )
[ 78 of 239] Compiling GHC.OldList      ( GHC/OldList.hs, dist/build/GHC/OldList.js_o, dist/build/GHC/OldList.js_dyn_o )
[ 79 of 239] Compiling Text.Show        ( Text/Show.hs, dist/build/Text/Show.js_o, dist/build/Text/Show.js_dyn_o )
[ 80 of 239] Compiling Unsafe.Coerce    ( Unsafe/Coerce.hs, dist/build/Unsafe/Coerce.js_o, dist/build/Unsafe/Coerce.js_dyn_o )
[ 81 of 239] Compiling GHC.TypeNats     ( GHC/TypeNats.hs, dist/build/GHC/TypeNats.js_o, dist/build/GHC/TypeNats.js_dyn_o )
[ 82 of 239] Compiling GHC.TypeLits     ( GHC/TypeLits.hs, dist/build/GHC/TypeLits.js_o, dist/build/GHC/TypeLits.js_dyn_o )
[ 83 of 239] Compiling GHC.Generics     ( GHC/Generics.hs, dist/build/GHC/Generics.js_o, dist/build/GHC/Generics.js_dyn_o )
[ 84 of 239] Compiling Data.Semigroup.Internal ( Data/Semigroup/Internal.hs, dist/build/Data/Semigroup/Internal.js_o, dist/build/Data/Semigroup/Internal.js_dyn_o )
[ 85 of 239] Compiling Data.Monoid      ( Data/Monoid.hs, dist/build/Data/Monoid.js_o, dist/build/Data/Monoid.js_dyn_o )
[ 86 of 239] Compiling Data.Foldable    ( Data/Foldable.hs, dist/build/Data/Foldable.js_o, dist/build/Data/Foldable.js_dyn_o )
[ 87 of 239] Compiling Data.Functor.Const ( Data/Functor/Const.hs, dist/build/Data/Functor/Const.js_o, dist/build/Data/Functor/Const.js_dyn_o )
[ 88 of 239] Compiling Data.Typeable.Internal ( Data/Typeable/Internal.hs, dist/build/Data/Typeable/Internal.js_o, dist/build/Data/Typeable/Internal.js_dyn_o )
GHC error in desugarer lookup in Ghci1:
  attempting to use module `base:Data.Typeable.Internal' (./Data/Typeable/Internal.hs) which is not loaded
GHC error in desugarer lookup in Ghci1:
  Can't find interface-file declaration for type constructor or class Typeable
    Probable cause: bug in .hi-boot file, or inconsistent .hi file
    Use -ddump-if-trace to get an idea of which file caused the error
GHC error in desugarer lookup in Ghci1:
  Can't find interface-file declaration for type constructor or class Typeable
    Probable cause: bug in .hi-boot file, or inconsistent .hi file
    Use -ddump-if-trace to get an idea of which file caused the error
[ 89 of 239] Compiling Type.Reflection  ( Type/Reflection.hs, dist/build/Type/Reflection.js_o, dist/build/Type/Reflection.js_dyn_o )
[ 90 of 239] Compiling Data.Typeable    ( Data/Typeable.hs, dist/build/Data/Typeable.js_o, dist/build/Data/Typeable.js_dyn_o )
[ 91 of 239] Compiling GHC.Exception.Type ( GHC/Exception/Type.hs, dist/build/GHC/Exception/Type.js_o, dist/build/GHC/Exception/Type.js_dyn_o )
[ 92 of 239] Compiling GHC.Exception    ( GHC/Exception.hs, dist/build/GHC/Exception.js_o, dist/build/GHC/Exception.js_dyn_o )
[ 93 of 239] Compiling GHC.IO.Handle.Lock.Common ( GHC/IO/Handle/Lock/Common.hs, dist/build/GHC/IO/Handle/Lock/Common.js_o, dist/build/GHC/IO/Handle/Lock/Common.js_dyn_o )
[ 94 of 239] Compiling GHC.IO.Exception[boot] ( GHC/IO/Exception.hs-boot, dist/build/GHC/IO/Exception.js_o-boot, dist/build/GHC/IO/Exception.js_dyn_o )
[ 95 of 239] Compiling GHC.IO           ( GHC/IO.hs, dist/build/GHC/IO.js_o, dist/build/GHC/IO.js_dyn_o )
[ 96 of 239] Compiling GHC.IORef        ( GHC/IORef.hs, dist/build/GHC/IORef.js_o, dist/build/GHC/IORef.js_dyn_o )
[ 97 of 239] Compiling GHC.ForeignPtr   ( GHC/ForeignPtr.hs, dist/build/GHC/ForeignPtr.js_o, dist/build/GHC/ForeignPtr.js_dyn_o )
[ 98 of 239] Compiling Foreign.ForeignPtr.Imp ( Foreign/ForeignPtr/Imp.hs, dist/build/Foreign/ForeignPtr/Imp.js_o, dist/build/Foreign/ForeignPtr/Imp.js_dyn_o )
[ 99 of 239] Compiling Foreign.ForeignPtr.Unsafe ( Foreign/ForeignPtr/Unsafe.hs, dist/build/Foreign/ForeignPtr/Unsafe.js_o, dist/build/Foreign/ForeignPtr/Unsafe.js_dyn_o )
[100 of 239] Compiling Foreign.ForeignPtr.Safe ( Foreign/ForeignPtr/Safe.hs, dist/build/Foreign/ForeignPtr/Safe.js_o, dist/build/Foreign/ForeignPtr/Safe.js_dyn_o )
[101 of 239] Compiling Foreign.ForeignPtr ( Foreign/ForeignPtr.hs, dist/build/Foreign/ForeignPtr.js_o, dist/build/Foreign/ForeignPtr.js_dyn_o )
[102 of 239] Compiling GHC.IO.Buffer    ( GHC/IO/Buffer.hs, dist/build/GHC/IO/Buffer.js_o, dist/build/GHC/IO/Buffer.js_dyn_o )
[103 of 239] Compiling GHC.IO.Encoding.Types ( GHC/IO/Encoding/Types.hs, dist/build/GHC/IO/Encoding/Types.js_o, dist/build/GHC/IO/Encoding/Types.js_dyn_o )
[104 of 239] Compiling Data.IORef       ( Data/IORef.hs, dist/build/Data/IORef.js_o, dist/build/Data/IORef.js_dyn_o )
[105 of 239] Compiling GHC.IOArray      ( GHC/IOArray.hs, dist/build/GHC/IOArray.js_o, dist/build/GHC/IOArray.js_dyn_o )
[106 of 239] Compiling GHC.IO.Encoding[boot] ( GHC/IO/Encoding.hs-boot, dist/build/GHC/IO/Encoding.js_o-boot, dist/build/GHC/IO/Encoding.js_dyn_o )
[107 of 239] Compiling GHC.IO.Device    ( GHC/IO/Device.hs, dist/build/GHC/IO/Device.js_o, dist/build/GHC/IO/Device.js_dyn_o )
[108 of 239] Compiling GHC.IO.BufferedIO ( GHC/IO/BufferedIO.hs, dist/build/GHC/IO/BufferedIO.js_o, dist/build/GHC/IO/BufferedIO.js_dyn_o )
[109 of 239] Compiling GHC.IO.Handle.Types ( GHC/IO/Handle/Types.hs, dist/build/GHC/IO/Handle/Types.js_o, dist/build/GHC/IO/Handle/Types.js_dyn_o )
[110 of 239] Compiling GHC.IO.Handle.Lock.NoOp ( GHC/IO/Handle/Lock/NoOp.hs, dist/build/GHC/IO/Handle/Lock/NoOp.js_o, dist/build/GHC/IO/Handle/Lock/NoOp.js_dyn_o )
[111 of 239] Compiling GHC.IO.Handle.FD[boot] ( GHC/IO/Handle/FD.hs-boot, dist/build/GHC/IO/Handle/FD.js_o-boot, dist/build/GHC/IO/Handle/FD.js_dyn_o )
[112 of 239] Compiling GHC.IO.Handle[boot] ( GHC/IO/Handle.hs-boot, dist/build/GHC/IO/Handle.js_o-boot, dist/build/GHC/IO/Handle.js_dyn_o )
[113 of 239] Compiling GHC.IO.Exception ( GHC/IO/Exception.hs, dist/build/GHC/IO/Exception.js_o, dist/build/GHC/IO/Exception.js_dyn_o )
[114 of 239] Compiling GHC.IO.Encoding.Failure ( GHC/IO/Encoding/Failure.hs, dist/build/GHC/IO/Encoding/Failure.js_o, dist/build/GHC/IO/Encoding/Failure.js_dyn_o )
[115 of 239] Compiling GHC.IO.Encoding.UTF8 ( GHC/IO/Encoding/UTF8.hs, dist/build/GHC/IO/Encoding/UTF8.js_o, dist/build/GHC/IO/Encoding/UTF8.js_dyn_o )
[116 of 239] Compiling GHC.IO.Encoding.UTF32 ( GHC/IO/Encoding/UTF32.hs, dist/build/GHC/IO/Encoding/UTF32.js_o, dist/build/GHC/IO/Encoding/UTF32.js_dyn_o )
[117 of 239] Compiling GHC.IO.Encoding.UTF16 ( GHC/IO/Encoding/UTF16.hs, dist/build/GHC/IO/Encoding/UTF16.js_o, dist/build/GHC/IO/Encoding/UTF16.js_dyn_o )
[118 of 239] Compiling GHC.IO.Encoding.Latin1 ( GHC/IO/Encoding/Latin1.hs, dist/build/GHC/IO/Encoding/Latin1.js_o, dist/build/GHC/IO/Encoding/Latin1.js_dyn_o )
[119 of 239] Compiling Foreign.Marshal.Error ( Foreign/Marshal/Error.hs, dist/build/Foreign/Marshal/Error.js_o, dist/build/Foreign/Marshal/Error.js_dyn_o )
[120 of 239] Compiling Foreign.Marshal.Alloc ( Foreign/Marshal/Alloc.hs, dist/build/Foreign/Marshal/Alloc.js_o, dist/build/Foreign/Marshal/Alloc.js_dyn_o )
[121 of 239] Compiling Foreign.Marshal.Utils ( Foreign/Marshal/Utils.hs, dist/build/Foreign/Marshal/Utils.js_o, dist/build/Foreign/Marshal/Utils.js_dyn_o )
[122 of 239] Compiling Foreign.Marshal.Array ( Foreign/Marshal/Array.hs, dist/build/Foreign/Marshal/Array.js_o, dist/build/Foreign/Marshal/Array.js_dyn_o )
[123 of 239] Compiling GHC.Foreign      ( GHC/Foreign.hs, dist/build/GHC/Foreign.js_o, dist/build/GHC/Foreign.js_dyn_o )
[124 of 239] Compiling Foreign.C.String ( Foreign/C/String.hs, dist/build/Foreign/C/String.js_o, dist/build/Foreign/C/String.js_dyn_o )
[125 of 239] Compiling Foreign.Marshal.Unsafe ( Foreign/Marshal/Unsafe.hs, dist/build/Foreign/Marshal/Unsafe.js_o, dist/build/Foreign/Marshal/Unsafe.js_dyn_o )
[126 of 239] Compiling Foreign.Concurrent ( Foreign/Concurrent.hs, dist/build/Foreign/Concurrent.js_o, dist/build/Foreign/Concurrent.js_dyn_o )
[127 of 239] Compiling Foreign.C.Error  ( Foreign/C/Error.hs, dist/build/Foreign/C/Error.js_o, dist/build/Foreign/C/Error.js_dyn_o )
[128 of 239] Compiling Foreign.C        ( Foreign/C.hs, dist/build/Foreign/C.js_o, dist/build/Foreign/C.js_dyn_o )
[129 of 239] Compiling Foreign.Marshal.Pool ( Foreign/Marshal/Pool.hs, dist/build/Foreign/Marshal/Pool.js_o, dist/build/Foreign/Marshal/Pool.js_dyn_o )
[130 of 239] Compiling Foreign.Marshal.Safe ( Foreign/Marshal/Safe.hs, dist/build/Foreign/Marshal/Safe.js_o, dist/build/Foreign/Marshal/Safe.js_dyn_o )
[131 of 239] Compiling Foreign.Marshal  ( Foreign/Marshal.hs, dist/build/Foreign/Marshal.js_o, dist/build/Foreign/Marshal.js_dyn_o )
[132 of 239] Compiling Foreign.Safe     ( Foreign/Safe.hs, dist/build/Foreign/Safe.js_o, dist/build/Foreign/Safe.js_dyn_o )
[133 of 239] Compiling Foreign          ( Foreign.hs, dist/build/Foreign.js_o, dist/build/Foreign.js_dyn_o )
[134 of 239] Compiling System.Posix.Types ( System/Posix/Types.hs, dist/build/System/Posix/Types.js_o, dist/build/System/Posix/Types.js_dyn_o )
[135 of 239] Compiling System.Posix.Internals ( System/Posix/Internals.hs, dist/build/System/Posix/Internals.js_o, dist/build/System/Posix/Internals.js_dyn_o )
Parse error in FFI pattern: h$base_st_mtime($1_1,$1_2)
invalid expression FFI pattern. Expression FFI patterns can only be used for synchronous FFI  imports with result size 0 or 1.
h$base_st_mtime($1_1,$1_2)
CallStack (from HasCallStack):
  error, called at src/Gen2/Generator.hs:2231:11 in ghcjs-8.10.7-BgvMpWEmfNCLlTXTYn7Tam:Gen2.Generator
fatal: program /nix/store/k0jmrlhkzyy3gdanpd21idsad39a08fa-cabal-install-3.8.1.0/bin/cabal returned a nonzero exit code

cc @dfordivam @Gabriella439

@Gabriella439
Copy link
Contributor

So I don't exactly know how to fix it, but I can add what I do know

The error is coming from ghcjs compiling the base package, specifically this line of the System.Posix.Internal module which provides a ghcjs shim for the st_mtime function

https://github.com/ghc/ghc/blob/a5bd0eb8dd1d03c54e1b0b476ebbc4cc886d6f19/libraries/base/System/Posix/Internals.hs#L557

foreign import javascript unsafe "(($1_1,$1_2) => { return h$base_st_mtime($1_1,$1_2); })"    st_mtime :: Ptr CStat -> IO CTime

… and the error message is coming from here:

https://github.com/ghcjs/ghcjs/blob/ghc-8.10/src/Gen2/Generator.hs#L2197

I suspect that it might be related to /nix/store/1gdmj35whkam4bp7s1ck1f06sp020f9z-base-CTime-64-bit-with-ghcjs.patch in the logs, but I can't seem to find where that patch is coming from or what its contents are

@sternenseemann
Copy link
Member Author

I suspect that it might be related to /nix/store/1gdmj35whkam4bp7s1ck1f06sp020f9z-base-CTime-64-bit-with-ghcjs.patch in the logs, but I can't seem to find where that patch is coming from or what its contents are

This is not the case. The patch is ghcjs/ghcjs@b7711fb which I tried applying since it changed the offending line, but it doesn't change the result of the compilation, i.e. the error is the same with and without this patch.

@Gabriella439
Copy link
Contributor

Yeah, this is kind of confusing for me because my understanding from reading the code is that this should only trigger that error message if either:

  • The foreign import is marked async (which it is not)
  • The JavaScript code destructures the result into two or more return values

(which is also what the error message says)

However, the line number from the error message doesn't quite match up with the source code I linked to, so there is a possible discrepancy. Is there a way you could get the Generator.hs source code used to build the ghc that is building ghcjs?

@sternenseemann
Copy link
Member Author

@Gabriella439 nix-build -E 'with import ./. {}; srcOnly (haskell.compiler.ghcjs.overrideAttrs { dontInstall = false; })' should do the trick.

@sternenseemann
Copy link
Member Author

sternenseemann commented Jan 7, 2023

@Gabriella439 git bisect gives a big clue:

3a46b46 is the first bad commit

commit 3a46b467ace6c1f571e37269055bbbcb0b150cc3
Author: Will Cohen <[email protected]>
Date:   Tue Jul 19 14:40:30 2022 -0400

    emscripten: 3.1.15 -> 3.1.17

 pkgs/development/compilers/emscripten/default.nix  | 4 ++--
 pkgs/development/compilers/emscripten/package.json | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

So my first hunch that is was the 9.2 migration was totally wrong.

Maybe it's:

The type of time_t was restored 64-bit after being converted to 32-bit in 3.1.11. (emscripten-core/emscripten#17401)

@sternenseemann
Copy link
Member Author

ghcjs:

foreign import javascript unsafe "h$base_st_mtime($1_1,$1_2)" st_mtime :: Ptr CStat -> IO CTime

ghc master:

foreign import javascript unsafe "(($1_1,$1_2) => { return h$base_st_mtime($1_1,$1_2); })"    st_mtime :: Ptr CStat -> IO CTime

@Gabriella439
Copy link
Contributor

Gabriella439 commented Jan 7, 2023

@brandonchinn178
Copy link

Hi, not very familiar with Nix. Is there a workaround to get this working for now? And is there a fix planned?

@sternenseemann
Copy link
Member Author

You can use a nixpkgs commit prior to ghcjs breaking.

Not sure if someone plans on looking into a patch to solve this (likely a version of ghcjs/ghcjs@b7711fb that actually works).

@avanov
Copy link

avanov commented Jan 22, 2023

The documentation for that function is lacking, and the length checking of the JS expression was introduced about 10 years ago and it's not clear right now why "Expression FFI patterns can only be used for synchronous FFI imports with result size 0 or 1" should be a limit for a Int64 return value. Otherwise the function doesn't look particularly tricky to fix.

@brandonchinn178
Copy link

@sternenseemann Thanks. Again, as a complete Nix noob, is there a way to specify the nixpkgs commit on the command line? Currently, I'm doing

nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
nix-env -iA nixpkgs.haskell.compiler.ghcjs

@avanov
Copy link

avanov commented Jan 22, 2023

@brandonchinn178 substitute the nixpkgs snapshot with your own checkout hash:

nix-shell -p haskell.compiler.ghcjs -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/eb4d3bc796ebb891833d53ec22baa6a666fb4960.tar.gz

you almost never need nix-env -iA, despite what nix documentation uses in examples. nix-shell -p <pkg-name> creates a shell with the provided package(s) that get removed from your $PATH upon exit.

@RaitoBezarius
Copy link
Member

Does anyone know if upgrading further emscripten can help here, or is it definitely broken for all further versions of emscripten?

(1) Would usually the solution to fix ghcjs?
(2) Did someone open a bug report in emscripten upstream?
(3) Do we want to introduce the older known working emscripten?

@sternenseemann
Copy link
Member Author

@RaitoBezarius I don't think emscripten is going to revert time_t to 32bit any time soon… I think it should be easy to patch ghcjs given that we can get ahold of someone that understands the ghcjs ffi syntax and knows how to adjust this.

I was hoping that @dfordivam / @obsidian-systems-maintenance could look into it, since they reintroduced ghcjs and provided the additional patches we are using. Since they use NixOS stable channels, maybe they have a renewed interest in fixing this.

Personally I'm fine with just having ghcjs be broken on release. If it has downstream users, they will eventually get to fixing it and we can backport that. For nixpkgs ghcjs is a leaf package, so no big deal.

@ncfavier
Copy link
Member

@sternenseemann the patch you found does work, you just need to apply it before the configure phase!

#228749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

6 participants