Why does ghc-9.2.4 require process-

May I ask the community for some advice? Any help gratefully received! I am trying to build a development version of Stack on Windows 11 (with the most recent version of Stack). The stack.yaml looks like this (extract):

# GHC 9.2.4
resolver: nightly-2022-08-02

- .

# GHC 9.2.4 comes with process-, which lacks important bug fixes
- process-,2845
# Although Cabal- is a global package, it depends on process
- Cabal-,12459

However, Stack warns that ghc-9.2.4 requires process- when everything else requires the later version of process specified as the extra-dep:

Configuring stack-2.7.6...
    This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
      package ghc (ghc-9.2.4) requires process-
      package x509-system (x509-system-1.6.7-7LYzOCd9hiNIn35Hqv3YXA) requires process-
      package unliftio (unliftio- requires process-
      package typed-process (typed-process- requires process-
      package streaming-commons (streaming-commons- requires process-
      package stack (stack-2.7.6) requires process-
      package stack (stack-2.7.6) requires process-
      package stack (stack-2.7.6) requires process-
      package rio (rio- requires process-
      package optparse-applicative (optparse-applicative- requires process-
      package open-browser (open-browser- requires process-
      package githash (githash- requires process-
      package extra (extra-1.7.10-80tfFluQ9OuFuixnOGESj2) requires process-
      package echo (echo-0.1.4-1mVZySbMSwvEtxj6Ny0jYa) requires process-
      package conduit-extra (conduit-extra-1.3.6-BvfbgHagiCHEiVJWoGyx2L) requires process-
      package Cabal (Cabal- requires process-

and stack test eventually fails (part way through building the stack-test test suite - EDIT: I should add, stack.exe itself builds without complaint) with:

GHC runtime linker: fatal error: I found a duplicate definition for symbol
whilst processing object file
The symbol was previously defined in
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
ghc-9.2.4.exe: panic! (the 'impossible' happened)
  (GHC version 9.2.4:
        loadObj "C:\\Users\\mike\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-9.2.4\\lib\\x86_64-windows-ghc-9.2.4\\process-\\HSprocess-": failed

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

This is my question: why would Stack think that ghc-9.2.4 requires process- The ghc.cabal for ghc-9.2.4 says process >= 1 && < 1.7.

In case it was a ‘past build artefact’ somewhere, I deleted first my Stack root, GHC 9.2.4 and the .stack-work directory. Same result.

1 Like

I can be more specific, it is only stack build stack:test:stack-test that causes the problem. In case it is relevant, the package.yaml for that looks like this:

    main: Spec.hs
    source-dirs: src/test
    - -threaded
    - QuickCheck
    - hspec
    - raw-strings-qq
    - stack
    - smallcheck
    verbatim: |

hspec-2.9.7 depends on hspec-core-2.9.7 which depends on ghc.

That’s likely because ghc package is not reinstallable: you cannot compile it yourself against another version of process and must use whatever build configuration was used by GHC bindist. The only workaround is not to depend on ghc package one way or another.


Many thanks! This then is my knotty problem:

GHC 9.2.4 (and GHC 9.2.3) ships with process-, but that lacks the important subsequent macOS bug fixes found in process-

Builds of Stack are tested extensively using hspec, but hpsec depends on hspec-core which, in turn, depends on ghc. stack-test built with GHC 9.2.4 and process- can’t build ghc on most operating systems (the CI suggests that, somehow, failure is avoided on macOS).

The release of GHC 9.4 may cut through my knot. process- was released as a precursor for the release of GHC 9.4.

1 Like

It sounds like this is rather important to bring to the attention of the GHC devs. GHC 9.2.4 was only just released last week. Perhaps they didn’t know they were shipping with a buggy process?

1 Like

I made Bump process submodule for 9.2.5 release (#21967) · Issues · Glasgow Haskell Compiler / GHC · GitLab


9.2.5 is shaping up to be an important print, replacing 8.10.7.