Bug#1056306: haskell-hadrian: makes ghc FTBFS on hurd-i386

Samuel Thibault sthibault at debian.org
Mon Nov 20 10:14:53 GMT 2023


Source: haskell-hadrian
Version: 9.4.7-3
Severity: important
Tags: patch

Since version 9.4.7 and the switch to using Hadrian, ghc fails to build
on hurd-i386. This is because of a confusion between "gnu" and "hurd".

The attached patches fix the confusion. One is already submitted
upstream, the other is already fixed in newer upstream versions.

Samuel

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 'oldoldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.5.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
-------------- next part --------------
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11624

Index: ghc-9.4.7/hadrian/src/Hadrian/Haskell/Cabal.hs
===================================================================
--- ghc-9.4.7.orig/hadrian/src/Hadrian/Haskell/Cabal.hs
+++ ghc-9.4.7/hadrian/src/Hadrian/Haskell/Cabal.hs
@@ -71,4 +71,5 @@ cabalOsString :: String -> String
 cabalOsString "mingw32"  = "windows"
 cabalOsString "darwin"   = "osx"
 cabalOsString "solaris2" = "solaris"
+cabalOsString "gnu"      = "hurd"
 cabalOsString other      = other
-------------- next part --------------
Also applies in 9.6.x
Can be dropped with 9.8.1

Index: ghc-9.4.7/hadrian/src/Oracles/Setting.hs
===================================================================
--- ghc-9.4.7.orig/hadrian/src/Oracles/Setting.hs
+++ ghc-9.4.7/hadrian/src/Oracles/Setting.hs
@@ -273,7 +273,7 @@ anyHostOs = matchSetting HostOs
 isElfTarget :: Action Bool
 isElfTarget = anyTargetOs
     [ "linux", "freebsd", "dragonfly", "openbsd", "netbsd", "solaris2", "kfreebsdgnu"
-    , "haiku", "linux-android"
+    , "gnu", "haiku", "linux-android"
     ]
 
 -- | Check whether the host OS supports the @-rpath@ linker option when
@@ -282,7 +282,7 @@ isElfTarget = anyTargetOs
 -- TODO: Windows supports lazy binding (but GHC doesn't currently support
 --       dynamic way on Windows anyways).
 hostSupportsRPaths :: Action Bool
-hostSupportsRPaths = anyHostOs ["linux", "darwin", "freebsd"]
+hostSupportsRPaths = anyHostOs ["linux", "darwin", "freebsd", "gnu"]
 
 -- | Check whether the target supports GHCi.
 ghcWithInterpreter :: Action Bool


More information about the Pkg-haskell-maintainers mailing list