[GHC] #13301: GHC base directory assumptions

GHC ghc-devs at haskell.org
Sun Feb 19 11:36:16 UTC 2017


#13301: GHC base directory assumptions
----------------------------------------+---------------------------------
           Reporter:  Phyx-             |             Owner:  (none)
               Type:  bug               |            Status:  new
           Priority:  normal            |         Milestone:  8.4.1
          Component:  Compiler          |           Version:  8.0.2
           Keywords:                    |  Operating System:  Windows
       Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
          Test Case:                    |        Blocked By:
           Blocking:                    |   Related Tickets:
Differential Rev(s):                    |         Wiki Page:
----------------------------------------+---------------------------------
 GHC and ghc-pkg make some pretty hard assumptions about where they're
 running on Windows. They assume that they are always running from
 `foo/bin/ghc.exe` and that to find the `lib` folder they can drop
 `bin/ghc.exe` from the base path and append `lib`.

 This is already false for the testsuite, which when testing the bindist
 has one test which puts the binaries in `inplace/test   spaces`.

 For some reason before this was either being skipped or mysteriously
 passing. But as of `2017.02.11` our luck ran out.

 the testsuite triggers a failure such as:

 {{{
 [04:16:21][Step 3/6] ghc-pkg.exe: Can't find package database in
 C:/TeamCity/buildAgent/work/28754042a1be6052/inplace/test   sp\lib
 [04:16:22][Step 3/6] ghc-pkg.exe: Can't find package database in
 C:/TeamCity/buildAgent/work/28754042a1be6052/inplace/test   sp\lib
 [04:16:23][Step 3/6] Traceback (most recent call last):
 [04:16:23][Step 3/6]   File "../../driver/runtests.py", line 215, in
 <module>
 [04:16:23][Step 3/6]     pkginfo = str(getStdout([config.ghc_pkg,
 'dump']))
 [04:16:23][Step 3/6]   File
 "/c/TeamCity/buildAgent/work/28754042a1be6052/testsuite/driver/testutil.py",
 line 23, in getStdout
 [04:16:23][Step 3/6]     raise Exception("Command failed: " +
 str(cmd_and_args))
 [04:16:23][Step 3/6] Exception: Command failed:
 ['"/c/TeamCity/buildAgent/work/28754042a1be6052/inplace/test   spaces/ghc-
 pkg.exe"', 'dump']
 [04:16:23][Step 3/6] make: *** [../../mk/test.mk:299: test] Error 1
 [04:16:23][Step 3/6]
 [04:16:23][Step 3/6] ==== STAGE 1 TESTS ====
 [04:16:23][Step 3/6] cat: testsuite_summary_stage1.txt: No such file or
 directory
 [04:16:23][Step 3/6] Process exited with code 1
 }}}

 Let's soften the assumption and just check that `../lib` exists instead.

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


More information about the ghc-tickets mailing list