[GHC] #16187: Hadrian: Build fails when using absolute path for build root

GHC ghc-devs at haskell.org
Wed Mar 6 21:48:28 UTC 2019


#16187: Hadrian: Build fails when using absolute path for build root
-------------------------------------+-------------------------------------
        Reporter:  davide            |                Owner:  sykloid
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Build System      |              Version:  8.6.3
  (Hadrian)                          |             Keywords:  hadrian build
      Resolution:                    |  root relative absolute path
Operating System:  Linux             |         Architecture:
 Type of failure:  Building GHC      |  Unknown/Multiple
  failed                             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Marge Bot <ben+marge-bot@…>):

 In [changeset:"2ff77b9894eecf51fa619ed2266ca196e296cd1e/ghc" 2ff77b9/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="2ff77b9894eecf51fa619ed2266ca196e296cd1e"
 Handle absolute paths to build roots in Hadrian.

 Fixes #16187.

 This patch fixes various path concatenation issues to allow functioning
 builds with hadrian when the build root location is specified with an
 absolute path.

 Remarks:

 - The path concatenation operator (-/-) now handles absolute second
 operands
   appropriately. Its behavior should match that of POSIX (</>) in this
   regard.

 - The `getDirectoryFiles*` family of functions only searches for matches
   under the directory tree rooted by its first argument; all of the
   results are also relative to this root. If the first argument is the
   empty string, the current working directory is used.

   This patch passes the appropriate directory (almost always either `top`
   or `root`), and subsequently attaches that directory prefix so that
   the paths refer to the appropriate files.

 - Windows `tar` does not like colons (':') in paths to archive files, it
   tries to resolve them as remote paths. The `--force-local` option
   remedies this, and is applied on windows builds.
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16187#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list