In-tree invocation of GHC built with Hadrian

Simon Peyton Jones simonpj at microsoft.com
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.gold")

,("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")

,("Unregisterised","NO")

,("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")

,("Stage","1")

,("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")

,("LibDir","/home/simonpj/code/HEAD/_build/stage0/lib")

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

]

simonpj at MSRC-9870733:~/tmp$

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

Hi,

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 haskell.org<mailto:ghc-devs at haskell.org>> 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-4.12.0.0/Prelude.hi

        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?
Simon
_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org<mailto:ghc-devs at haskell.org>
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs<https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01%7Csimonpj%40microsoft.com%7C1d86744085f348fe904108d6b8facdaf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636899784658899665&sdata=et5Pj1BHgcD3DliuPsseZ1eDFk8V3BailFpx1kUFvZg%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20190404/d261903c/attachment.html>


More information about the ghc-devs mailing list