Closed SpeedyOrc-C closed 6 months ago
I tries to reproduce this with GHC 9.8.2 on macOS 14.4.1 on my M2 mac. But I could not reproduce this. The build successes.
My Mac is Intel-based :(
I don't understand why intel-based mac gets the wrong macro.
I get the same error on GHC 9.4.8 (archlinux x86_64) but it builds fine on 9.4.7:
Network/Wai/Handler/Warp/Settings.hs:307:20: error:
• Couldn't match expected type: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, a0 #)
with actual type: IO ()
• In the first argument of ‘fork#’, namely ‘(io unsafeUnmask)’
In the expression: fork# (io unsafeUnmask) s0
In the expression:
case fork# (io unsafeUnmask) s0 of (# s1, _tid #) -> (# s1, () #)
|
307 | case fork# (io unsafeUnmask) s0 of
| ^^^^^^^^^^^^^^^^^
Error: cabal: Failed to build warp-3.4.0 (which is required by
exe:gtf-website-server from gtf-website-0.1.0.0). See the build log above for
details.
I'm seeing this on GHC 9.6.4, also on x86_64 Arch Linux.
No problem with GHC 9.6.4 on x86_64 CentOS.
Well, I've run out of time for investigating this right now, but it's pretty bizarre. The macros seem to pick up the GHC version installed from the Arch repos rather than the GHCup-installed version (9.2 vs 9.6 in my case), despite the latter having precedence in my PATH
and clearly being used (log shows Build profile: -w ghc-9.6.4 -O1
). This issue isn't actually specific to warp
. It occurs for any project which depends on streaming-commons
...
Please bring this to streaming-commons
.
Let's close.
Well, I've run out of time for investigating this right now, but it's pretty bizarre. The macros seem to pick up the GHC version installed from the Arch repos rather than the GHCup-installed version (9.2 vs 9.6 in my case), despite the latter having precedence in my
PATH
and clearly being used (log showsBuild profile: -w ghc-9.6.4 -O1
). This issue isn't actually specific towarp
. It occurs for any project which depends onstreaming-commons
...
I don't really understand what's going on here, but based on this uninstalling the system ghc solved the issue for me.
Did someone open up an issue at the correct place?
I've got my findings half written up. Will post to Cabal in the next few days.
Basically it's interference from the system GHC. Quick fix is pacman -R ghc
. EDIT: just noticed you've already mentioned this!
This project failed to build warp-3.4.0 as a dependency when building with Cabal.
Environment
macOS: 14.4.1 (23E224) GHC: 9.8.2 Cabal: 3.10.3.0 Kernel:
Error message
It seems that the condition
__GLASGOW_HASKELL__ >= 904
of the#if
macro wasn't working.