alpmestan / ghc.nix

Nix (shell) expression for working on GHC
https://haskell.org/ghc/
BSD 3-Clause "New" or "Revised" License
143 stars 51 forks source link

Introduce wasi-cross devShell #166

Closed bgamari closed 1 year ago

bgamari commented 1 year ago

This introduces a new devShell, wasi-cross, which enables withWasmSDK.

bgamari commented 1 year ago

@TerrorJack, perhaps you want to update any documentation that might reference ghc.nix to refer to this new devShell?

TerrorJack commented 1 year ago

Sure, I'll update accordingly. This PR lgtm now.

bgamari commented 1 year ago

FWIW, I have confirmed that this works and passes the testsuite on x86_64-linux:

$ nix develop ../ghc.nix#wasi-cross
$ hadrian/build-cabal -j9 --docs=none
$ hadrian/build-cabal -j9 test --docs=none
yvan-sraka commented 1 year ago

I tried this workflow and got an error:

Error, file does not exist and no rule available:
  ffitarget.h
Build failed.
TerrorJack commented 1 year ago

@yvan-sraka I tried the same workflow using the latest branch and ghc revision on x86_64 nixos and it works. Would you share the commands you use to spawn the shell and were you building in a fresh ghc checkout?

yvan-sraka commented 1 year ago

@yvan-sraka I tried the same workflow using the latest branch and ghc revision on x86_64 nixos and it works. Would you share the commands you use to spawn the shell and were you building in a fresh ghc checkout?

Full page of logs :wink: … ``` yvan@X230 ~ % uname -a Linux X230 6.1.31 #1-NixOS SMP PREEMPT_DYNAMIC Tue May 30 13:03:33 UTC 2023 x86_64 GNU/Linux ``` ``` yvan@X230 ~ % cd ghc direnv: loading ~/ghc/.envrc direnv: using nix direnv: nix-direnv: using cached dev shell Recommended ./configure arguments (found in $CONFIGURE_ARGS: or use the configure_ghc command): --with-gmp-includes=/nix/store/x659jhd70y08f46bgz0cclkjl78652gw-gmp-with-cxx-6.2.1-dev/include --with-gmp-libraries=/nix/store/0ssnwyy41aynhav7jr4dz1y01lfzi86f-gmp-with-cxx-6.2.1/lib --with-curses-includes=/nix/store/9jmgsy8bll4ya21v4yvv96mr2ky1cc52-ncurses-6.4-dev/include --with-curses-libraries=/nix/store/4g9phbpakh51bbw2n391vipz9r5z56kw-ncurses-6.4/lib --with-libnuma-includes=/nix/store/s7wg6dwgfq2mddcy1xw9zgl94c09dj5g-numactl-2.0.16/include --with-libnuma-libraries=/nix/store/s7wg6dwgfq2mddcy1xw9zgl94c09dj5g-numactl-2.0.16/lib --with-libdw-includes=/nix/store/064sjbh3l2b0hicr5lv0y9wxgpmjj7rs-elfutils-0.189-dev/include --with-libdw-libraries=/nix/store/i6rd6pzq2hmk7v2jilf1w9aga458falb-elfutils-0.189/lib --enable-dwarf-unwind direnv: export +ACLOCAL_PATH +ALEX +AR +AS +CC +CONFIGURE_ARGS +CONFIG_SHELL +CXX +DETERMINISTIC_BUILD +EMSDK +EMSDK_LLVM +EM_CACHE +FONTCONFIG_FILE +GHC +GHCPKG +HAPPY +HOST_PATH +IN_NIX_SHELL +LD_LIBRARY_PATH +LLC +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_BUILD_CORES +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE +NIX_GHC +NIX_GHCPKG +NIX_GHC_DOCDIR +NIX_GHC_LIBDIR +NIX_HARDENING_ENABLE +NIX_LDFLAGS +NIX_SSL_CERT_FILE +NIX_STORE +NM +OBJCOPY +OBJDUMP +OPT +PERL5LIB +PYTHONHASHSEED +PYTHONNOUSERSITE +PYTHONPATH +RANLIB +READELF +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +SYSTEM_CERTIFICATE_PATH +_PYTHON_HOST_PLATFORM +_PYTHON_SYSCONFIGDATA_NAME +__structuredAttrs +buildInputs +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +hardeningDisable +installPhase +mesonFlags +name +nativeBuildInputs +out +outputs +patches +phases +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~LOCALE_ARCHIVE ~PATH ~XDG_DATA_DIRS ``` ``` yvan@X230 ~/ghc (git)-[tags/ghc-9.6.2-release] % nix develop ~/"ghc.nix#wasi-cross" Recommended ./configure arguments (found in $CONFIGURE_ARGS: or use the configure_ghc command): --with-gmp-includes=/nix/store/x659jhd70y08f46bgz0cclkjl78652gw-gmp-with-cxx-6.2.1-dev/include --with-gmp-libraries=/nix/store/0ssnwyy41aynhav7jr4dz1y01lfzi86f-gmp-with-cxx-6.2.1/lib --with-curses-includes=/nix/store/9jmgsy8bll4ya21v4yvv96mr2ky1cc52-ncurses-6.4-dev/include --with-curses-libraries=/nix/store/4g9phbpakh51bbw2n391vipz9r5z56kw-ncurses-6.4/lib --with-libnuma-includes=/nix/store/s7wg6dwgfq2mddcy1xw9zgl94c09dj5g-numactl-2.0.16/include --with-libnuma-libraries=/nix/store/s7wg6dwgfq2mddcy1xw9zgl94c09dj5g-numactl-2.0.16/lib --with-libdw-includes=/nix/store/064sjbh3l2b0hicr5lv0y9wxgpmjj7rs-elfutils-0.189-dev/include --with-libdw-libraries=/nix/store/i6rd6pzq2hmk7v2jilf1w9aga458falb-elfutils-0.189/lib --enable-dwarf-unwind ``` ``` ghc.nix ~ ./boot Booting . Booting libraries/base/ Booting libraries/directory/ Booting libraries/ghc-bignum/ Booting libraries/process/ Booting libraries/terminfo/ Booting libraries/time/ Booting libraries/unix/ configure.ac:9: warning: The macro `AC_HELP_STRING' is obsolete. configure.ac:9: You should run autoupdate. ./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from... ./lib/autoconf/general.m4:1553: AC_ARG_WITH is expanded from... configure.ac:9: the top level configure.ac:90: warning: The macro `AC_CONFIG_HEADER' is obsolete. configure.ac:90: You should run autoupdate. ./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from... configure.ac:90: the top level configure.ac:92: warning: The macro `AC_CONFIG_HEADER' is obsolete. configure.ac:92: You should run autoupdate. ./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from... configure.ac:92: the top level configure.ac:488: warning: The macro `AC_PROG_CC_C99' is obsolete. configure.ac:488: You should run autoupdate. ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from... m4/fp_set_cflags_c99.m4:7: FP_SET_CFLAGS_C99 is expanded from... configure.ac:488: the top level configure.ac:489: warning: The macro `AC_PROG_CC_C99' is obsolete. configure.ac:489: You should run autoupdate. ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from... m4/fp_set_cflags_c99.m4:7: FP_SET_CFLAGS_C99 is expanded from... configure.ac:489: the top level configure.ac:490: warning: The macro `AC_PROG_CC_C99' is obsolete. configure.ac:490: You should run autoupdate. ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from... m4/fp_set_cflags_c99.m4:7: FP_SET_CFLAGS_C99 is expanded from... configure.ac:490: the top level configure.ac:491: warning: The macro `AC_PROG_CC_C99' is obsolete. configure.ac:491: You should run autoupdate. ./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from... m4/fp_set_cflags_c99.m4:7: FP_SET_CFLAGS_C99 is expanded from... configure.ac:491: the top level configure.ac:1010: warning: The macro `AC_TRY_RUN' is obsolete. configure.ac:1010: You should run autoupdate. ./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from... lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from... lib/m4sugar/m4sh.m4:699: AS_IF is expanded from... ./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from... ./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from... m4/fp_check_timer_create.m4:5: FP_CHECK_TIMER_CREATE is expanded from... configure.ac:1010: the top level ``` ``` ghc.nix ~ configure_ghc checking for gfind... no checking for find... /nix/store/4qrbfa42xyicny7vlgbbqxz07kcsjbx2-findutils-4.9.0/bin/find checking for sort... /nix/store/ahkfdxq8mcpsb5kvdvgqr1wv8zjngbh4-coreutils-9.1/bin/sort checking for GHC Git commit id... inferred 7e70df17aee2e39bc599b43e59a52bb30064df4d checking for ghc... /nix/store/6svllmp4wh12anw1ixgf26spdkyfyd7d-ghc-9.2.4-with-packages/bin/ghc checking version of ghc... 9.2.4 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... wasm32-unknown-wasi build platform inferred as: x86_64-unknown-linux host platform inferred as: x86_64-unknown-linux configure: GHC build : x86_64-unknown-linux configure: GHC host : x86_64-unknown-linux configure: GHC target : wasm32-unknown-wasi checking for sh... /nix/store/rhvbjmcfnkg8i2dxpzr114cp1ws7f667-bash-5.2-p15/bin/sh checking whether target supports a registerised ABI... yes checking whether target supports tables next to code... no checking for path to top of build tree... /home/yvan/ghc checking for wasm32-wasi-gcc... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang checking for wasm32-wasi-g++... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang++ checking for wasm32-wasi-nm... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-nm checking for wasm32-wasi-ar... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ar checking for wasm32-wasi-ranlib... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ranlib checking for wasm32-wasi-objdump... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-objdump checking for wasm32-wasi-dllwrap... no checking for dllwrap... no checking for wasm32-wasi-windres... no checking for windres... no checking for wasm32-wasi-genlib... no checking for genlib... no checking for wasm32-wasi-cc... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang 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... yes checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang accepts -g... yes checking for /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang option to enable C11 features... none needed checking whether the compiler supports GNU C++... yes checking whether /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang++ accepts -g... yes checking for /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang++ option to enable C++11 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 for vfork.h... no checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking how to run the C preprocessor... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang -E checking for wasm32-wasi-ld... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/wasm-ld checking for ld.gold object merging bug (binutils 22266)... checking whether ld is GNU ld... NO ./configure: line 9868: FP_PROG_LD_BUILD_ID: command not found checking whether ld understands -no_compact_unwind... no checking whether ld understands -filelist... no checking for wasm32-wasi-nm... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-nm checking for wasm32-wasi-ranlib... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ranlib checking for wasm32-wasi-strip... /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-strip checking for wasm32-wasi-otool... no checking for wasm32-wasi-install_name_tool... no checking for wasm32-wasi-clang... no checking for gawk... gawk checking for wasm32-wasi-llc-15... /nix/store/l2s5lh7pjygm2kv5kzia30yq038j7iin-llvm-10.0.1/bin/llc checking /nix/store/l2s5lh7pjygm2kv5kzia30yq038j7iin-llvm-10.0.1/bin/llc version (10.0.1) is between 11 and 16... no configure: We only support llvm 11 upto 16 (non-inclusive) (found 10.0.1). checking for wasm32-wasi-opt-15... /nix/store/l2s5lh7pjygm2kv5kzia30yq038j7iin-llvm-10.0.1/bin/opt checking /nix/store/l2s5lh7pjygm2kv5kzia30yq038j7iin-llvm-10.0.1/bin/opt version (10.0.1) is between 11 and 16... no configure: We only support llvm 11 upto 16 (non-inclusive) (found 10.0.1). configure: Creating links for headers shared by the RTS and compiler configure: done. configure: Creating links for in-tree file handling routines configure: Routines in place. Packages can now be build normally. configure: Creating links for ghci wrapper configure: done. checking whether #! works in shell scripts... yes configure: $CC is not gcc; assuming it's a reasonably new C compiler checking whether CC supports -no-pie... no checking whether C compiler supports __atomic_ builtins... yes checking whether -latomic is needed for sub-word-sized atomic operations... no checking whether -latomic is needed for 64-bit atomic operations... no checking for extra options to pass gcc when compiling via C... checking whether C compiler has an LLVM back end... yes checking Setting up CFLAGS, LDFLAGS, IGNORE_LINKER_LD_FLAGS and CPPFLAGS... done checking Setting up CONF_CC_OPTS_STAGE0, CONF_GCC_LINKER_OPTS_STAGE0, CONF_LD_LINKER_OPTS_STAGE0 and CONF_CPP_OPTS_STAGE0... done checking Setting up CONF_CC_OPTS_STAGE1, CONF_GCC_LINKER_OPTS_STAGE1, CONF_LD_LINKER_OPTS_STAGE1 and CONF_CPP_OPTS_STAGE1... done checking Setting up CONF_CC_OPTS_STAGE2, CONF_GCC_LINKER_OPTS_STAGE2, CONF_LD_LINKER_OPTS_STAGE2 and CONF_CPP_OPTS_STAGE2... done checking whether /nix/store/7wkshj58fcsl1f3zyi67qsxgl1p8nki1-gcc-wrapper-12.2.0/bin/cc supports --target... no checking whether /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang supports --target... yes checking whether /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang supports --target... yes checking C++ standard library flavour... libc++ checking for linkage against 'c++ c++abi'... success checking for .subsections_via_symbols... no checking whether your assembler supports .ident directive... yes checking for GNU non-executable stack support... no checking for a working context diff... diff -U 1 checking for a BSD-compatible install... /nix/store/ahkfdxq8mcpsb5kvdvgqr1wv8zjngbh4-coreutils-9.1/bin/install -c checking whether /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ar is GNU ar... no checking for ar arguments... qcls checking whether /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ar supports @file... yes checking whether /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ar supports -L... yes checking for wasm32-wasi-ranlib... (cached) /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ranlib checking whether ln -s works... yes checking for gsed... no checking for sed... /nix/store/gy82r5cf12hgkmhzifsyx3fp6cnf6j2l-gnused-4.9/bin/sed checking for time... /run/current-system/sw/bin/time checking for gnutar... no checking for gtar... no checking for tar... /nix/store/czy796d2241296bdy45w87cmaiig50zr-gnutar-1.34/bin/tar checking for gpatch... no checking for patch... /nix/store/x4ckkjsxfl4ihl82v0bzsyxs4ay2d5b5-patch-2.7.6/bin/patch checking for autoreconf... /nix/store/3bvdlza5sxy6kjs9y7v0kbx4gxgp0wg8-autoconf-2.71/bin/autoreconf checking for dtrace... /nix/store/gp4scy25xyzjy641vlrp0lsczdyxciy5-systemtap-6.1.31-4.8/bin/dtrace checking for HsColour... no checking for sphinx-build... /nix/store/rvvl4as7l4wk4521z71sd3x4kqys00sw-python3.10-sphinx-5.3.0/bin/sphinx-build checking for version of sphinx-build... 5.3.0 checking for xelatex... /nix/store/cwd0y99pdbhkby34jiwcilgiv7gvh03q-texlive-combined-2022/bin/xelatex checking for makeindex... /nix/store/cwd0y99pdbhkby34jiwcilgiv7gvh03q-texlive-combined-2022/bin/makeindex checking for git... /nix/store/48bh1pp2qh6wfd0pnr5vlvdhkc6djdz3-git-2.40.1/bin/git checking for makeinfo... /run/current-system/sw/bin/makeinfo checking for cabal... /nix/store/0m35z7r34j2as8sb7qljvqmkdpgfpg2z-cabal-install-3.10.1.0/bin/cabal checking for python3... /nix/store/95cxzy2hpizr23343b8bskl4yacf4b3l-python3-3.10.11/bin/python3 checking for ghc-pkg matching /nix/store/6svllmp4wh12anw1ixgf26spdkyfyd7d-ghc-9.2.4-with-packages/bin/ghc... /nix/store/6svllmp4wh12anw1ixgf26spdkyfyd7d-ghc-9.2.4-with-packages/bin/ghc-pkg checking for happy... /nix/store/si95qybmnc32dcvk8v8vvgwrcf3x7202-happy-1.20.0/bin/happy checking for version of happy... 1.20.0 checking for alex... /nix/store/blckp6vgbxy6pb0q48axwiwza6a0vv3x-alex-3.2.6/bin/alex checking for version of alex... 3.2.6 checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for ctype.h... yes checking for dirent.h... yes checking for dlfcn.h... no checking for errno.h... yes checking for fcntl.h... yes checking for grp.h... no checking for limits.h... yes checking for locale.h... yes checking for nlist.h... no checking for pthread.h... yes checking for pwd.h... no checking for signal.h... no checking for sys/param.h... yes checking for sys/mman.h... no checking for sys/resource.h... no checking for sys/select.h... yes checking for sys/time.h... yes checking for sys/timeb.h... yes checking for sys/timerfd.h... no checking for sys/timers.h... no checking for sys/times.h... no checking for sys/utsname.h... yes checking for sys/wait.h... no checking for termios.h... no checking for utime.h... yes checking for windows.h... no checking for winsock.h... no checking for sched.h... yes checking for sys/cpuset.h... no checking for /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang options needed to detect all undeclared functions... none needed checking whether environ is declared... yes checking for long long... yes checking size of char... 1 checking for char... yes checking alignment of char... 1 checking size of double... 8 checking for double... yes checking alignment of double... 8 checking size of float... 4 checking for float... yes checking alignment of float... 4 checking size of int... 4 checking for int... yes checking alignment of int... 4 checking size of long... 4 checking for long... yes checking alignment of long... 4 checking size of long long... 8 checking for long long... (cached) yes checking alignment of long long... 8 checking size of short... 2 checking for short... yes checking alignment of short... 2 checking size of unsigned char... 1 checking for unsigned char... yes checking alignment of unsigned char... 1 checking size of unsigned int... 4 checking for unsigned int... yes checking alignment of unsigned int... 4 checking size of unsigned long... 4 checking for unsigned long... yes checking alignment of unsigned long... 4 checking size of unsigned long long... 8 checking for unsigned long long... yes checking alignment of unsigned long long... 8 checking size of unsigned short... 2 checking for unsigned short... yes checking alignment of unsigned short... 2 checking size of void *... 4 checking for void *... yes checking alignment of void *... 4 checking size of int8_t... 1 checking for int8_t... yes checking alignment of int8_t... 1 checking size of uint8_t... 1 checking for uint8_t... yes checking alignment of uint8_t... 1 checking size of int16_t... 2 checking for int16_t... yes checking alignment of int16_t... 2 checking size of uint16_t... 2 checking for uint16_t... yes checking alignment of uint16_t... 2 checking size of int32_t... 4 checking for int32_t... yes checking alignment of int32_t... 4 checking size of uint32_t... 4 checking for uint32_t... yes checking alignment of uint32_t... 4 checking size of int64_t... 8 checking for int64_t... yes checking alignment of int64_t... 8 checking size of uint64_t... 8 checking for uint64_t... yes checking alignment of uint64_t... 8 checking whether byte ordering is bigendian... no checking for WinExec... no checking for GetModuleFileName... no checking for getclock... no checking for getrusage... no checking for gettimeofday... yes checking for setitimer... no checking for siginterrupt... no checking for sysconf... yes checking for times... no checking for ctime_r... yes checking for sched_setaffinity... no checking for sched_getaffinity... no checking for setlocale... yes checking for uselocale... yes checking whether ctime_r is declared... yes checking whether program_invocation_short_name is declared... yes checking for atan in -lm... yes checking for ffi_call in -lffi... yes checking for ffi.h... yes checking for dlopen in -ldl... no checking for dlopen in -ldl... (cached) no checking for dlinfo... no checking for size_t... yes checking for working alloca.h... yes checking for alloca... yes checking for pid_t... yes checking for fork... no checking for vfork... no checking for pthread_condattr_setclock... no checking for an ANSI C-conforming const... yes checking whether byte ordering is bigendian... (cached) no checking whether float word order is big endian... no checking for nlist in -lelf... no checking leading underscore in symbol names... no checking whether __attribute__((visibility("hidden"))) is supported... yes checking whether __attribute__((musttail)) is supported... no checking for clock_gettime in -lrt... yes checking for clock_gettime in -lrt... (cached) yes checking for clock_gettime... yes checking for timer_settime... no checking for timer_create... no checking for printf$LDBLStub... no checking whether -lpthread is needed for pthreads... checking for pthread_create... no checking for pthread_create in -lpthread... no no pthreads support found. checking for pthread_np.h... no checking for pthread_setname_np in -lpthread... no checking for pthread_setname_np (Darwin)... no checking for pthread_setname_np (glibc)... no checking for pthread_setname_np (NetBSD)... no checking for pthread_set_name_np... no checking for sys/eventfd.h... yes checking for eventfd... no checking for getpid... no checking for getuid... no checking for raise... no checking for __thread support... yes checking whether to use libffi for adjustors... yes checking for numa.h... no checking for numaif.h... no configure: creating ./config.status config.status: creating mk/system-cxx-std-lib-1.0.conf config.status: creating mk/project.mk config.status: creating hadrian/cfg/system.config config.status: creating hadrian/ghci-cabal config.status: creating hadrian/ghci-multi-cabal config.status: creating hadrian/ghci-stack config.status: creating docs/users_guide/ghc_config.py config.status: creating distrib/configure.ac config.status: creating mk/config.h config.status: mk/config.h is unchanged config.status: creating compiler/ghc-llvm-version.h config.status: compiler/ghc-llvm-version.h is unchanged ---------------------------------------------------------------------- Configure completed successfully. Building GHC version : 9.6.2 Git commit id : 7e70df17aee2e39bc599b43e59a52bb30064df4d Build platform : x86_64-unknown-linux Host platform : x86_64-unknown-linux Target platform : wasm32-unknown-wasi Bootstrapping using : /nix/store/6svllmp4wh12anw1ixgf26spdkyfyd7d-ghc-9.2.4-with-packages/bin/ghc which is version : 9.2.4 with threaded RTS? : YES Using (for bootstrapping) : /nix/store/7wkshj58fcsl1f3zyi67qsxgl1p8nki1-gcc-wrapper-12.2.0/bin/cc Using clang : /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang which is version : linker options : Building a cross compiler : YES Unregisterised : NO TablesNextToCode : NO Build GMP in tree : YES hs-cpp : /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/clang hs-cpp-flags : -E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs ar : /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ar ld : /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/wasm-ld nm : /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-nm objdump : /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-objdump ranlib : /nix/store/0xhy9a5h2lyd34xb8m47xsk2xjd0byww-wasi-sdk/bin/llvm-ranlib otool : otool install_name_tool : install_name_tool windres : dllwrap : genlib : Happy : /nix/store/si95qybmnc32dcvk8v8vvgwrcf3x7202-happy-1.20.0/bin/happy (1.20.0) Alex : /nix/store/blckp6vgbxy6pb0q48axwiwza6a0vv3x-alex-3.2.6/bin/alex (3.2.6) sphinx-build : /nix/store/rvvl4as7l4wk4521z71sd3x4kqys00sw-python3.10-sphinx-5.3.0/bin/sphinx-build xelatex : /nix/store/cwd0y99pdbhkby34jiwcilgiv7gvh03q-texlive-combined-2022/bin/xelatex makeinfo : /run/current-system/sw/bin/makeinfo git : /nix/store/48bh1pp2qh6wfd0pnr5vlvdhkc6djdz3-git-2.40.1/bin/git cabal-install : /nix/store/0m35z7r34j2as8sb7qljvqmkdpgfpg2z-cabal-install-3.10.1.0/bin/cabal Using LLVM tools clang : clang llc : llc opt : opt HsColour was not found; documentation will not contain source links Tools to build Sphinx HTML documentation available: YES Tools to build Sphinx PDF documentation available: YES Tools to build Sphinx INFO documentation available: YES ---------------------------------------------------------------------- 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 https://gitlab.haskell.org/ghc/ghc/wikis/building ``` ``` ghc.nix ~ hadrian/build Up to date | Configure package 'unix' | Configure package 'xhtml' | Configure package 'stm' | Configure package 'pretty' | Configure package 'integer-gmp' | Configure package 'haskeline' | Configure package 'ghc-prim' | Configure package 'ghc-compact' | Configure package 'deepseq' | Configure package 'base' | Configure package 'array' | Configure package 'transformers' | Configure package 'text' | Configure package 'template-haskell' | Configure package 'time' | Configure package 'parsec' | Configure package 'mtl' | Configure package 'hpc' | Configure package 'ghci' | Configure package 'ghc-heap' | Configure package 'ghc-boot-th' | Configure package 'ghc-boot' | Configure package 'filepath' | Configure package 'exceptions' | Configure package 'process' | Configure package 'directory' | Configure package 'containers' | Configure package 'Cabal' | Configure package 'Cabal-syntax' | Configure package 'bytestring' | Configure package 'binary' | Configure package 'rts' | Configure package 'ghc' | Configure package 'ghc-bignum' | Run Ghc CompileHs (Stage0 InTreeLibs): compiler/GHC/Types/TyThing/Ppr.hs => _build/stage0/compiler/build/GHC/Types/TyThing/Ppr.o Command line: /nix/store/6svllmp4wh12anw1ixgf26spdkyfyd7d-ghc-9.2.4-with-packages/bin/ghc -Wall -Wcompat -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage0/inplace/package.conf.d' '-this-unit-id ghc-9.6.2' '-package-id array-0.5.4.0' '-package-id base-4.16.3.0' '-package-id binary-0.8.9.1' '-package-id bytestring-0.11.4.0' '-package-id containers-0.6.7' '-package-id deepseq-1.4.6.1' '-package-id directory-1.3.8.1' '-package-id exceptions-0.10.7' '-package-id filepath-1.4.100.1' '-package-id ghc-boot-9.6.2' '-package-id ghc-heap-9.6.2' '-package-id ghci-9.6.2' '-package-id hpc-0.6.2.0' '-package-id process-1.6.17.0' '-package-id stm-2.5.0.2' '-package-id template-haskell-2.20.0.0' '-package-id time-1.12.2' '-package-id transformers-0.6.1.0' '-package-id unix-2.8.1.0' -i -i/home/yvan/ghc/_build/stage0/compiler/build -i/home/yvan/ghc/_build/stage0/compiler/build/autogen -i/home/yvan/ghc/compiler -I_build/stage0/compiler/build -I_build/stage0/compiler/build/. -Icompiler/. -I/home/yvan/ghc/libraries/process/include -I/home/yvan/ghc/_build/stage0/libraries/process/build/include -I/home/yvan/ghc/libraries/directory -I/home/yvan/ghc/_build/stage0/libraries/directory/build -I/home/yvan/ghc/libraries/unix/include -I/home/yvan/ghc/_build/stage0/libraries/unix/build/include -I/home/yvan/ghc/libraries/time/lib/include -I/home/yvan/ghc/_build/stage0/libraries/time/build/lib/include -I/home/yvan/ghc/libraries/containers/containers/include -I/home/yvan/ghc/_build/stage0/libraries/containers/containers/build/include -I/home/yvan/ghc/libraries/bytestring/include -I/home/yvan/ghc/_build/stage0/libraries/bytestring/build/include -I/nix/store/d29xzxjdjmn506alr21p3hynnq4j94ay-ghc-9.2.4/lib/ghc-9.2.4/base-4.16.3.0/include -I/nix/store/x659jhd70y08f46bgz0cclkjl78652gw-gmp-with-cxx-6.2.1-dev/include -I/nix/store/d29xzxjdjmn506alr21p3hynnq4j94ay-ghc-9.2.4/lib/ghc-9.2.4/ghc-bignum-1.2/include -I/nix/store/d29xzxjdjmn506alr21p3hynnq4j94ay-ghc-9.2.4/lib/ghc-9.2.4/include -I/nix/store/ddars6g8a8v8nnwf4y2nf9vjb290wqdg-libffi-3.4.4-dev/include -optP-include -optP_build/stage0/compiler/build/autogen/cabal_macros.h -optP-DCAN_LOAD_DLL -outputdir _build/stage0/compiler/build -fdiagnostics-color=always -optc-Wno-unknown-pragmas -optP-Wno-nonportable-include-path -c compiler/GHC/Types/TyThing/Ppr.hs -o _build/stage0/compiler/build/GHC/Types/TyThing/Ppr.o -O -H32m -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -XBangPatterns -XScopedTypeVariables -XMonoLocalBinds -XTypeOperators -haddock -fno-warn-deprecated-flags ===> Command failed with error code: 1 typecheckIface Declaration for pprTyThing: Can't find interface-file declaration for type constructor or class ShowSub 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 Cannot continue after interface file error Command failed Build failed. ```

N.B. The issue I have seems not related to this PR 😅