
#15860: Hadrian build fails on FreeBSD -------------------------------------+------------------------------------- Reporter: raichoo | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.7 (Hadrian) | Resolution: | Keywords: Operating System: FreeBSD | Architecture: x86_64 Type of failure: Compile-time | (amd64) crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by alpmestan): `-B` is used to point a given ghc executable to its associated "topdir" in GHC parlance, which corresponds to the `lib/` dir, which contains the `settings` file, the package db and all that. See [https://github.com/ghc/ghc/blob/master/compiler/main/SysTools/BaseDir.hs#L51 this note] for more. You can see that the error is thrown by [https://github.com/ghc/ghc/blob/master/compiler/main/SysTools/BaseDir.hs#L12... this piece of code], which tries to locate the topdir by looking up an env var and then by calling `getBaseDir`, whose implementations uses `getExecutablePath` on darwin/linux, does something else on Windows but returns `Nothing` the rest of the time. To put it another way, any GHC you build needs to be passed its topdir with `-B` (or to be used through a wrapper script), I think. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15860#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler