[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1121496: ghc: FTBFS on sparc64 due to ghc not detecting the target architecture



Source: ghc
Version: 9.10.3-1~exp3
Severity: normal
Tags: upstream
User: debian-sparc@lists.debian.org
Usertags: sparc64
X-Debbugs-Cc: debian-sparc@lists.debian.org

Hi,

on sparc64, ghc currently fails to build from source because the compiler does
not properly detect the target architecture:

Configuring rts-1.0.2...
Warning: Packages using 'cabal-version: >= 1.10' and before 'cabal-version:
3.4' must specify the 'default-language' field for each component (e.g.
Haskell98 or Haskell2010). If a component uses different languages in
different modules then list the other ones in the 'other-languages' field.
Warning: Using ${pkgroot} in prefix ${pkgroot}/.. will not work if you rely on
the Path_* module or other hard coded paths. Cabal does not yet support fully
relocatable builds! See #462 #2302 #2994 #3305 #3473 #3586 #3909 #4097 #4291
#4872
configure: WARNING: unrecognized options: --with-compiler, --with-cc
checking build system type... sparc64-unknown-linux-gnu
checking host system type... Invalid configuration 'unknown-linux': machine 'unknown-unknown' not recognized
configure: error: /bin/bash //build/reproducible-path/ghc-9.10.3/rts/../config.sub unknown-linux failed
Error when running Shake build system:
  at want, called at src/Main.hs:126:44 in main:Main
* Depends on: binary-dist-dir
  at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.19.8-3XwrCJSiRChB7EP7yLNDvP:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "rts", pkgPath = "rts"}, way = v, iplace = Final}))
  at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:54:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _build/stage1/rts/setup-config
* Raised the exception:
ExitFailure 1

With ghc 9.6.6, the target architecture is detected properly:

(experimental_sparc64-dchroot)glaubitz@stadler:~/ghc-exp/ghc-9.10.3$ /usr/bin/ghc --info| grep 'Target platform'
 ,("Target platform","sparc64-unknown-linux")
(experimental_sparc64-dchroot)glaubitz@stadler:~/ghc-exp/ghc-9.10.3$

with ghc 9.10.3, this is no longer the case:

(experimental_sparc64-dchroot)glaubitz@stadler:~/ghc-exp/ghc-9.10.3$ ./_build/stage0/bin/ghc --info| grep 'Target platform'
 ,("Target platform","unknown-unknown-linux")
(experimental_sparc64-dchroot)glaubitz@stadler:~/ghc-exp/ghc-9.10.3$

The issue has been reported upstream [2] and is tracked in the sparclinux issue
tracker on GitHub. I have not been able yet to figure out what's wrong.

Thanks,
Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=ghc&arch=sparc64&ver=9.10.3-1%7Eexp3&stamp=1763837226&raw=0
> [2] https://gitlab.haskell.org/ghc/ghc/-/issues/25702
> [3] https://github.com/sparclinux/issues/issues/41

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: