hadrian/validate fails with ghc: missing -B<dir> option
Summary
I ran ./validate
at ea86360f on OpenBSD-6.7-beta-amd64 with ghc-8.10.1 as a bootstrap compiler. The hadrian build aborted after finishing Stage0:
/----------------------------------------------------------\
| Successfully built program 'ghc-bin' (Stage0). |
| Executable: _validatebuild/stage0/bin/ghc |
| Program synopsis: The Glorious Glasgow Haskell Compiler. |
\----------------------------------------------------------/
# _validatebuild/stage1/lib/package.conf.d/.stamp
| Executable found: ld.lld => /usr/bin/ld.lld
# /usr/bin/ld.lld
| Package 'rts' configuration flags: configure --disable-executable-stripping --disable-library-stripping --cabal-file rts/rts.cabal --distdir /home/greg/s/ghc/_validatebuild/stage1/rts --ipid $pkg-$version --prefix ${pkgroot}/.. --htmldir ${pkgroot}/../../docs/html/libraries/rts --with-ghc=/home/greg/s/ghc/_validatebuild/stage0/bin/ghc --with-ghc-pkg=/home/greg/s/ghc/_validatebuild/stage0/bin/ghc-pkg --ghc-pkg-option=--global-package-db=/home/greg/s/ghc/_validatebuild/stage1/lib/package.conf.d --enable-library-vanilla --disable-library-profiling --disable-library-for-ghci --enable-shared --configure-option=CFLAGS=-I_validatebuild/stage1/lib -iquote /home/greg/s/ghc/rts -I/home/greg/s/ghc/includes --configure-option=LDFLAGS=-fuse-ld=lld -Wl,-z,wxneeded --configure-option=CPPFLAGS=-I_validatebuild/stage1/lib --gcc-options=-I_validatebuild/stage1/lib -iquote /home/greg/s/ghc/rts -I/home/greg/s/ghc/includes -fuse-ld=lld -Wl,-z,wxneeded --configure-option=--with-cc=/usr/bin/cc --ghc-option=-ghcversion-file=/home/greg/s/ghc/_validatebuild/stage1/lib/ghcversion.h --with-gcc=/usr/bin/cc --with-ld=/usr/bin/ld.lld --with-ar=/usr/bin/ar --with-alex=/usr/local/bin/alex --with-happy=/usr/local/bin/happy
# cabal-configure (for _validatebuild/stage1/rts/setup-config)
Configuring rts-1.0...
creating /home/greg/s/ghc/_validatebuild/stage1/rts/build
/home/greg/s/ghc/_validatebuild/stage0/bin/ghc --numeric-version
/home/greg/s/ghc/_validatebuild/stage0/bin/ghc is version 8.11.0.20200508
/home/greg/s/ghc/_validatebuild/stage0/bin/ghc-pkg --version
/home/greg/s/ghc/_validatebuild/stage0/bin/ghc-pkg is version 8.11.0.20200508
/home/greg/s/ghc/_validatebuild/stage0/bin/ghc --supported-languages
/home/greg/s/ghc/_validatebuild/stage0/bin/ghc --info
/home/greg/s/ghc/_validatebuild/stage0/bin/ghc returned ExitFailure 1 with
error message:
ghc: missing -B<dir> option
CallStack (from HasCallStack):
$, called at libraries/Cabal/Cabal/Distribution/Simple/Program/Run.hs:160:7 in Cabal-3.2.0.0:Distribution.Simple.Program.Run
getProgramInvocationOutput, called at libraries/Cabal/Cabal/Distribution/Simple/Program.hs:152:3 in Cabal-3.2.0.0:Distribution.Simple.Program
getProgramOutput, called at libraries/Cabal/Cabal/Distribution/Simple/GHC/Internal.hs:229:13 in Cabal-3.2.0.0:Distribution.Simple.GHC.Internal
getGhcInfo, called at libraries/Cabal/Cabal/Distribution/Simple/GHC.hs:183:14 in Cabal-3.2.0.0:Distribution.Simple.GHC
configure, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1713:14 in Cabal-3.2.0.0:Distribution.Simple.Configure
configCompilerEx, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:395:12 in Cabal-3.2.0.0:Distribution.Simple.Configure
configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:625:20 in Cabal-3.2.0.0:Distribution.Simple
confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:65:5 in Cabal-3.2.0.0:Distribution.Simple.UserHooks
configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:180:19 in Cabal-3.2.0.0:Distribution.Simple
defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:149:3 in Cabal-3.2.0.0:Distribution.Simple
defaultMainWithHooksNoReadArgs, called at src/Hadrian/Haskell/Cabal/Parse.hs:167:9 in main:Hadrian.Haskell.Cabal.Parse
hadrian: '/home/greg/s/ghc/_validatebuild/stage0/bin/ghc' exited with an
error:
ghc: missing -B<dir> option12
ghc: fd:16: hGetContents: does not exist (No such file or directory)
Error when running Shake build system:
at action, called at src/Rules.hs:40:19 in main:Rules
at need, called at src/Rules.hs:62:5 in main:Rules
* Depends on: _validatebuild/stage1/lib/package.conf.d/rts-1.0.conf
at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.18.5-e48e4e96bb789b28cbf52631e3bc09a40bc5ad698c056a592108a79590b44b94:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "rts", pkgPath = "rts"}, way = v}))
at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:53:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _validatebuild/stage1/rts/setup-config
* Raised the exception:
ExitFailure 1
Steps to reproduce
AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 ./validate
(OpenBSD has special auto-tools magic).
Expected behavior
Finish the build successfully (gmake worked for me before)
Environment
- GHC version used: 8.10.1 (port not submitted, preliminary port in my github)
- Happy port update
Optional:
- Operating System: OpenBSD 6.7-beta (May 8 snapshot)
- System Architecture: amd64