[GHC] #14459: `make sdist-ghc` broken
#14459: `make sdist-ghc` broken -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Build System | Version: 8.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I noticed this because it resulted in the PPA builds of GHC HEAD failing; I was able to hunt this down to bdd2d2862e248948efafa8ba4219e94825ddf21a which updated `libraries/Cabal`; Basically, the following invocation (where `ghc`/`alex`/`happy`/etc. can only be found in `/opt/ghc-stage0-toolchain/bin`, and nowhere else; so this relies on `configure` to capture their absolute locations; however, this is not what causes the failure below) {{{#!bash ./boot PATH=/opt/ghc-stage0-toolchain/bin:$PATH ./configure make sdist-ghc }}} results in {{{ ... test ! -d testsuite || make -C testsuite distclean "rm" -rf sdistprep/ghc/ghc-8.3.20171109/libraries/tarballs/ "rm" -rf sdistprep/ghc/ghc-8.3.20171109/libraries/stamp/ "rm" -rf sdistprep/ghc/ghc-8.3.20171109/compiler/stage[123] "rm" -f sdistprep/ghc/ghc-8.3.20171109/mk/build.mk for i in parallel random primitive vector dph; do rm -rf sdistprep/ghc/ghc-8.3.20171109/libraries/$i/; done cd sdistprep/ghc/ghc-8.3.20171109 && "/usr/bin/find" mk rules docs distrib bindisttest libffi includes utils docs rts compiler ghc driver libraries libffi-tarballs iserv \( -name .git -o -name "autom4te*" -o -name "*~" -o -name "\#*" -o -name ".\#*" -o -name "log" -o -name "*-SAVE" -o -name "*.orig" -o -name "*.rej" \) -print | "xargs" "rm" -rf "cp" compiler/stage2/build/CmmLex.hs sdistprep/ghc/ghc-8.3.20171109/compiler/cmm mv sdistprep/ghc/ghc-8.3.20171109/compiler/cmm/CmmLex.x sdistprep/ghc/ghc-8.3.20171109/compiler/cmm/CmmLex.x.source "/opt/ghc-stage0-toolchain/bin/happy" -agc --strict compiler/cmm/CmmParse.y -o compiler/stage2/build/CmmParse.hs "cp" compiler/stage2/build/CmmParse.hs sdistprep/ghc/ghc-8.3.20171109/compiler/cmm mv sdistprep/ghc/ghc-8.3.20171109/compiler/cmm/CmmParse.y sdistprep/ghc/ghc-8.3.20171109/compiler/cmm/CmmParse.y.source "/opt/ghc-stage0-toolchain/bin/alex" -g --latin1 compiler/parser/Lexer.x -o compiler/stage2/build/Lexer.hs "cp" compiler/stage2/build/Lexer.hs sdistprep/ghc/ghc-8.3.20171109/compiler/parser mv sdistprep/ghc/ghc-8.3.20171109/compiler/parser/Lexer.x sdistprep/ghc/ghc-8.3.20171109/compiler/parser/Lexer.x.source "/opt/ghc-stage0-toolchain/bin/happy" -agc --strict compiler/parser/Parser.y -o compiler/stage2/build/Parser.hs "cp" compiler/stage2/build/Parser.hs sdistprep/ghc/ghc-8.3.20171109/compiler/parser mv sdistprep/ghc/ghc-8.3.20171109/compiler/parser/Parser.y sdistprep/ghc/ghc-8.3.20171109/compiler/parser/Parser.y.source "inplace/bin/mkdirhier" utils/hpc/dist-install/build//. "/opt/ghc-stage0-toolchain/bin/happy" -agc --strict utils/hpc/./HpcParser.y -o utils/hpc/dist-install/build/HpcParser.hs unused terminals: 1 "cp" utils/hpc/dist-install/build/HpcParser.hs sdistprep/ghc/ghc-8.3.20171109/utils/hpc/ mv sdistprep/ghc/ghc-8.3.20171109/utils/hpc//HpcParser.y sdistprep/ghc/ghc-8.3.20171109/utils/hpc//HpcParser.y.source "inplace/bin/mkdirhier" utils/genprimopcode/dist/build//. "/opt/ghc-stage0-toolchain/bin/alex" -g utils/genprimopcode/./Lexer.x -o utils/genprimopcode/dist/build/Lexer.hs "cp" utils/genprimopcode/dist/build/Lexer.hs sdistprep/ghc/ghc-8.3.20171109/utils/genprimopcode/ mv sdistprep/ghc/ghc-8.3.20171109/utils/genprimopcode//Lexer.x sdistprep/ghc/ghc-8.3.20171109/utils/genprimopcode//Lexer.x.source "/opt/ghc-stage0-toolchain/bin/happy" -agc --strict utils/genprimopcode/./Parser.y -o utils/genprimopcode/dist/build/Parser.hs "cp" utils/genprimopcode/dist/build/Parser.hs sdistprep/ghc/ghc-8.3.20171109/utils/genprimopcode/ mv sdistprep/ghc/ghc-8.3.20171109/utils/genprimopcode//Parser.y sdistprep/ghc/ghc-8.3.20171109/utils/genprimopcode//Parser.y.source make[1]: *** No rule to make target 'libraries/Cabal/Cabal/dist- install/build/Distribution/Parsec/Lexer.hs', needed by 'sdist_libraries/Cabal/Cabal_dist-install_Lexer'. Stop. Makefile:161: recipe for target 'sdist-ghc' failed make: *** [sdist-ghc] Error 2 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14459> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14459: `make sdist-ghc` broken -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Build System | Version: 8.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: | -------------------------------------+------------------------------------- Changes (by int-index): * cc: int-index (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14459#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14459: `make sdist-ghc` broken -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Build System | Version: 8.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 tdammers): I can reproduce the issue on a fresh checkout without overriding `$PATH`; just `./boot; ./configure; make sdist-ghc` is enough to trigger this exact error. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14459#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14459: `make sdist-ghc` broken -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: bug | Status: new Priority: high | Milestone: Component: Build System | Version: 8.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 tdammers): https://github.com/haskell/cabal/issues/4633 and https://github.com/haskell/cabal/commit/5e4f4d588 suggest that a pre- generated Lexer.hs is now committed to the Cabal repository, and Lexer.x has been moved outside the main source tree, the intention seems to be that alex is called manually, and that automated builds use the committed Lexer.hs directly. For now, simply skipping the explicit Alex step in ghc.mk seems to work fine, but as soon as Cabal adopts a more proper solution to the issue, we will probably have to cater for that and change things on our end as well. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14459#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14459: `make sdist-ghc` broken -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Build System | Version: 8.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: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.4.1 Comment: We'll need this for 8.2.1. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14459#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14459: `make sdist-ghc` broken -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.4.1 Component: Build System | Version: 8.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 Ben Gamari <ben@…>): In [changeset:"eb86e867694bceedfb47a527d71429197ffe6dda/ghc" eb86e867/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="eb86e867694bceedfb47a527d71429197ffe6dda" Don't call alex for Cabal lib during GHC build The Cabal library now commits `Lexer.hs` directly to the source tree, so the build step where we'd call alex ourselves to generate that file is no longer necessary, nor will it work. See also: https://ghc.haskell.org/trac/ghc/ticket/14459 Reviewers: bgamari, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14459 Differential Revision: https://phabricator.haskell.org/D4240 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14459#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#14459: `make sdist-ghc` broken -------------------------------------+------------------------------------- Reporter: hvr | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.4.1 Component: Build System | Version: 8.3 Resolution: fixed | 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: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed Comment: I have verified that `sdist-ghc` works. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14459#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC