[GHC] #15576: Hadrian puts its build tree in the wrong place

GHC ghc-devs at haskell.org
Thu Aug 30 09:09:27 UTC 2018


#15576: Hadrian puts its build tree in the wrong place
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 OK I did what you ask in comment:3.  The first `cabal new-build` completed
 fine; no `_build` directories anywhere.

 The second command `cabal new-run` command is still running.  The start of
 its output is below.   (NB: `~/5builds/HEAD-3` is the build tree that I
 was previously calling `/playpen/ghc`; but it really IS the build tree.)

 Results so far: `_build` is created in `/playpen/ghc` (or in fact
 `~/5builds/HEAD-3`); there is no `_build` in `/users/simonpj/ghc`.

 Note the messages from configure about `.git`...

 {{{
 simonpj at cam-05-unx:~/5builds/HEAD-3/hadrian$ cabal new-run hadrian -- -c
 -j4 --flavour=quick --directory=".."
 Up to date
 | Running boot...
 | Run Configure ".": hadrian/cfg/system.config.in (and 4 more) =>
 hadrian/cfg/system.config (and 4 more)
 configure: WARNING: cannot determine snapshot version: no .git directory
 and no VERSION file
 configure: WARNING: cannot determine snapshot revision: no .git directory
 and no 'GIT_COMMIT_ID' file
 Warning: libraries/text/text.cabal:4:1: The field "bug-reports" is
 specified
 more than once at positions 4:1, 42:1
 | Copy file: settings => _build/stage1/lib/settings
 | Copy file: utils/hsc2hs/template-hsc.h => _build/stage1/lib/template-
 hsc.h
 | Copy file: driver/ghci-usage.txt => _build/stage1/lib/ghci-usage.txt
 | Copy file: llvm-passes => _build/stage1/lib/llvm-passes
 | Copy file: llvm-targets => _build/stage1/lib/llvm-targets
 Warning: utils/hpc/hpc-bin.cabal:11:2: Tabs used as indentation at 11:2
 | Copy file: driver/ghc-usage.txt => _build/stage1/lib/ghc-usage.txt
 | Copy file: driver/ghc-usage.txt => _build/stage0/lib/ghc-usage.txt
 | Copy file: llvm-passes => _build/stage0/lib/llvm-passes
 | Copy file: llvm-targets => _build/stage0/lib/llvm-targets
 | Copy file: driver/ghci-usage.txt => _build/stage0/lib/ghci-usage.txt
 | Copy file: settings => _build/stage0/lib/settings
 | Successfully generated _build/stage1/bin/ghc-split.
 | Make '_build/stage1/bin/ghc-split' executable.
 ...more
 }}}
 It appears that my build-tree link script does not add a symlink to
 `.git`.  I have no idea why; there is a symlink to other dot-files like
 `.gitignore`.  Here's the script
 {{{
 #!/usr/bin/perl

 if (-l "Makefile") {
     $source_tree = `ls -l Makefile`;
     $source_tree =~ s/^.*->\s*(.*)\/Makefile\s*$/$1/;
     print "Linking to source dir: $source_tree\n";
     system("lndir $source_tree");
     if ($? == 0) {
         system("kill-dangling-symlinks");
     } else {
         print "errors from lndir; NOT removing dangling symlinks\n";
     }
 } else {
     print "Linked Makefile not found.";
     exit(1);
 }
 }}}

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


More information about the ghc-tickets mailing list