You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sternenseemann, that is correct. That is because Stack is built against GHC 9.10.3 and its boot package is semaphore-compat-1.0.0. That is also true of all released versions of GHC that have a dependency on semaphore-compat.
(--git-branch accepts version tags as well as branch names. A wrinkle, I have discovered is that you can only build a more recent version of Stack than the currently one on your PATH. So, you may have to first downgrade Stack to build Stack.)
Depending on what dependencies have been built in the past, that process may take between about 3 and 20 mins.
EDIT: I see from the NixOS project that a minor version bump of GHC 9.12 may depend on semaphore-2.0.0. So, I am assuming that backwards compatibility has been considered. If that is the case, I think the sequence of events will be this:
The GHC project will release versions of GHC that depend on semaphore-compat >= 2.0.0; and
in due course, the Stackage project will adopt one of those GHC versions as a basis for a Stackage Haskell LTS snapshot; and
Stack will seek to build against one of those Stackage-blessed GHC versions.
@sternenseemann, having discussed things in the GHC room on matrix and elsewhere, my current plan is this:
the GHC project will release a GHC version that has semaphore-compat-2.0.0 as a boot package (likely GHC 9.12.5 and then GHC 9.10.4 - although perhaps the order may be switched);
I can imagine that the Stackage project will adopt that version as its LTS pretty quickly; and
Stack will then move to build its 'official' binaries against that GHC version and, at that point, will drop its 'experimental' support for semaphore on versions of GHC that support semaphore version 1.
If the Stackage project adopts such a GHC version as a Nightly, I will then start the process of getting Stack ready for semaphore-compat-2.0.0. I think that will be straightfoward except, perhaps, in having an intelligent Stack error message if semaphore is specified but the specified version of GHC does not support semaphore version 2.
Activity
mpilgrem commentedon Jun 23, 2026
@sternenseemann, that is correct. That is because Stack is built against GHC 9.10.3 and its boot package is
semaphore-compat-1.0.0. That is also true of all released versions of GHC that have a dependency onsemaphore-compat.As you may know (see: https://docs.haskellstack.org/en/stable/commands/build_command/#-no-semaphore-flag), semaphore may appear broken on non-musl Linux distributions. The 'solution', I believe, is to build the Stack tool from source. That is relatively straightforward to do:
(
--git-branchaccepts version tags as well as branch names. A wrinkle, I have discovered is that you can only build a more recent version of Stack than the currently one on your PATH. So, you may have to first downgrade Stack to build Stack.)Depending on what dependencies have been built in the past, that process may take between about 3 and 20 mins.
EDIT: I see from the NixOS project that a minor version bump of GHC 9.12 may depend on
semaphore-2.0.0. So, I am assuming that backwards compatibility has been considered. If that is the case, I think the sequence of events will be this:semaphore-compat >= 2.0.0; and[-]Support semaphore-compat 2.0.0 / new semaphore protocol[/-][+]Support semaphore-compat 2.0.0[/+]mpilgrem commentedon Jun 24, 2026
@sternenseemann, having discussed things in the GHC room on matrix and elsewhere, my current plan is this:
semaphore-compat-2.0.0as a boot package (likely GHC 9.12.5 and then GHC 9.10.4 - although perhaps the order may be switched);If the Stackage project adopts such a GHC version as a Nightly, I will then start the process of getting Stack ready for
semaphore-compat-2.0.0. I think that will be straightfoward except, perhaps, in having an intelligent Stack error message if semaphore is specified but the specified version of GHC does not support semaphore version 2.Re #6934 Add ghc --info "Semaphore version" to CompilerPaths
Re #6934 Update when GHC supports semaphore
Fix #6934 Depend on `semaphore-compat-2.0.0`
Re #6934 Update when GHC supports semaphore
Fix #6934 Depend on `semaphore-compat-2.0.0`
Re #6934 Add ghc --info "Semaphore version" to CompilerPaths
Re #6934 Update when GHC supports semaphore
Fix #6934 Depend on `semaphore-compat-2.0.0`
Re #6934 Add ghc --info "Semaphore version" to CompilerPaths
Re #6934 Update when GHC supports semaphore
Fix #6934 Depend on `semaphore-compat-2.0.0`
Fix #6934 Depend on `semaphore-compat-2.0.0`
mpilgrem commentedon Jun 26, 2026
@sternenseemann, I now have a draft pull request that builds Stack with GHC 9.12.5-rc2 and supports
semaphore-compat-2.0.0:semaphore-compat-2.0.0#6935Re #6934 Update to semaphore-compat-2.0.0 types and functions
Re #6934 Add ghc --info "Semaphore version" to CompilerPaths
Re #6934 Update when GHC supports semaphore
Fix #6934 Depend on `semaphore-compat-2.0.0`
Re #6934 Update to semaphore-compat-2.0.1 types and functions
Re #6934 Add ghc --info "Semaphore version" to CompilerPaths
Re #6934 Update when GHC supports semaphore
Fix #6934 Depend on `semaphore-compat-2.0.1`