In-tree invocation of GHC built with Hadrian

Simon Peyton Jones simonpj at
Thu Apr 4 12:44:01 UTC 2019

simonpj at MSRC-9870733:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc --info

[("Project name","The Glorious Glasgow Haskell Compilation System")

,("GCC extra via C opts"," -fwrapv -fno-builtin")

,("C compiler command","gcc")

,("C compiler flags","")

,("C compiler link flags"," -fuse-ld=gold")

,("C compiler supports -no-pie","YES")

,("Haskell CPP command","gcc")

,("Haskell CPP flags","-E -undef -traditional")

,("ld command","")

,("ld flags","")

,("ld supports compact unwind","YES")

,("ld supports build-id","YES")

,("ld supports filelist","NO")

,("ld is GNU ld","YES")

,("ar command","ar")

,("ar flags","q")

,("ar supports at file","YES")

,("ranlib command","ranlib")

,("touch command","touch")

,("dllwrap command","/bin/false")

,("windres command","/bin/false")

,("libtool command","libtool")

,("cross compiling","NO")

,("target os","OSLinux")

,("target arch","ArchX86_64")

,("target word size","8")

,("target has GNU nonexec stack","True")

,("target has .ident directive","True")

,("target has subsections via symbols","False")

,("target has RTS linker","YES")


,("LLVM llc command","llc")

,("LLVM opt command","opt")

,("LLVM clang command","clang")

,("Project version","8.9.20190404")

,("Project Git commit id","51fd357119b357c52e990ccce9059c423cc49406")

,("Booter version","8.6.4")


,("Build platform","x86_64-unknown-linux")

,("Host platform","x86_64-unknown-linux")

,("Target platform","x86_64-unknown-linux")

,("Have interpreter","YES")

,("Object splitting supported","NO")

,("Have native code generator","YES")

,("Support SMP","YES")

,("Tables next to code","YES")

,("RTS ways","v thr")

,("RTS expects libdw","NO")

,("Support dynamic-too","YES")

,("Support parallel --make","YES")

,("Support reexported-modules","YES")

,("Support thinning and renaming package flags","YES")

,("Support Backpack","YES")

,("Requires unified installed package IDs","YES")

,("Uses package keys","YES")

,("Uses unit IDs","YES")

,("Dynamic by default","NO")

,("GHC Dynamic","NO")

,("GHC Profiled","NO")

,("Leading underscore","NO")

,("Debug on","False")


,("Global Package DB","/home/simonpj/code/HEAD/_build/stage0/lib/package.conf.d")


simonpj at MSRC-9870733:~/tmp$

From: Herbert Valerio Riedel <hvriedel at>
Sent: 04 April 2019 13:41
To: Simon Peyton Jones <simonpj at>
Subject: Re: In-tree invocation of GHC built with Hadrian


I haven't tried this with Hadrian yet, but maybe the output from

~/code/HEAD/_build/stage0/bin/ghc --info

might provide a hint.

As for the ghc-environment theory: if there was a ghc-env file, GHC would tell you it has picked one up...

On Thu, Apr 4, 2019 at 1:21 PM Simon Peyton Jones via ghc-devs <ghc-devs at<mailto:ghc-devs at>> wrote:
How can I run the inplace binary built by Hadrian.  I tried this

~/code/HEAD/_build/stage0/bin/ghc -c Foo.hs
but I got this

~/code/HEAD/_build/stage0/bin/ghc -c Foo.hs

Foo.hs:1:8: error:

    Bad interface file: /opt/ghc/8.6.4/lib/ghc-8.6.4/base-

        mismatched interface file versions (wanted "80920190403", got "8064")


1 | module Foo where

  |        ^^^

simonpj at MSRC-3645512:~/tmp$
Somehow the inplace binary built by Hadrian is looking for library files in completely the wrong place.
What should I do?
ghc-devs mailing list
ghc-devs at<mailto:ghc-devs at><>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list