[GHC] #8122: make binary-dist broken on OS X in HEAD

#8122: make binary-dist broken on OS X in HEAD --------------------------------+------------------------------------------ Reporter: danharaj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.7 Keywords: | Operating System: MacOS X Architecture: x86_64 | Type of failure: Installing GHC failed (amd64) | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | --------------------------------+------------------------------------------ After a successful configure and make, make binary-dist fails: {{{ ➜ ghc git:(master) make ===--- building phase 0 make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds make[1]: Nothing to be done for `phase_0_builds'. ===--- building phase 1 make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds make[1]: Nothing to be done for `phase_1_builds'. ===--- building final phase make -r --no-print-directory -f ghc.mk phase=final all make[1]: Nothing to be done for `all'. ➜ ghc git:(master) make binary-dist rm -f bindist-list make -r --no-print-directory -f ghc.mk bindist BINDIST=YES "cp" -p ghc/stage1/build/tmp/ inplace/lib/bin/ghc-stage1 cp: ghc/stage1/build/tmp/ is a directory (not copied). make[1]: *** [inplace/lib/bin/ghc-stage1] Error 1 make: *** [binary-dist-prep] Error 2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by danharaj): Curiously, ./validate succeeded at creating a binary distribution with these test results: {{{ Unexpected results from: TEST="T5313 cgrun071 T2507 haddock.compiler T4801 T7478" OVERALL SUMMARY for test run started at Sun Aug 11 20:36:56 EDT 2013 3724 total tests, which gave rise to 12329 test cases, of which 8949 were skipped 26 had missing libraries 3291 expected passes 57 expected failures 0 caused framework failures 1 unexpected passes 5 unexpected failures Unexpected passes: driver T5313 (normal) Unexpected failures: codeGen/should_run cgrun071 [bad exit code] (normal) driver T2507 [bad stderr] (normal) ghc-api/T7478 T7478 [bad exit code] (normal) perf/compiler T4801 [stat too good] (normal) perf/haddock haddock.compiler [stat not good enough] (normal) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by edsko): I am getting the same error on `sh validate`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by edsko): In the case of `sh validate` this happens when the validate script calls {{{ $make binary-dist-prep }}} which it only does if you don't specify `FAST`, which might be why the OP was able to run validate. Tracking this down further, it gets stuck on: {{{ # make -r --no-print-directory -f ghc.mk bindist BINDIST=YES "cp" -p ghc/stage1/build/tmp/ inplace/lib/bin/ghc-stage1 cp: ghc/stage1/build/tmp/ is a directory (not copied). make: *** [inplace/lib/bin/ghc-stage1] Error 1 }}} This particular `cp` command comes from the following rule in `build- prog.mk`: {{{ # INPLACE_BIN might be empty if we're distcleaning ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifeq "$$($1_$2_INSTALL_INPLACE)" "YES" $$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/. "$$(CP)" -p $$< $$@ endif endif }}} (lines 294-300). At this point somebody more familiar with the build system might have some idea? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by edsko): (Incidentally, the problem clearly is that `$$($1_$2_PROG_INPLACE)` expands to nothing. The question is why.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by edsko): It seems `$$($1_$2_PROG_INPLACE)` is explicitly only set when `BINDIST` is not equal to `YES` (lines 187, 200). But then how could this work for anyone? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Changes (by ezyang): * priority: normal => highest -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by darchon): I can succesfully do a "make binary-dist" of GHC-7.7.20130918 using a "perf" build (with "HADDOCK_DOCS = NO" due to #8320). Using a simple:[[BR]] perl boot[[BR]] ./configure[[BR]] make[[BR]] make binary-dist Platform: OS X 10.8.5[[BR]] GHC build: 7.6.3[[BR]] GHC target: 7.7.20130918[[BR]] XCode: XCode CL-Tools 4.6.2 A copy of the binary-dist can be found here: https://www.dropbox.com/s/d37rij0dnvjiqqy/ghc-7.7.20130915-x86_64-apple- darwin.tar.bz2 (Note: I accidentally renamed the build to 20130915) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Build System | Version: 7.7 Resolution: | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by darchon): `make binary-dist` also started failing for me; I don't know why it worked earlier... The attached patch moves the conflicting piece of Make script so that it is not executed when `BINDIST=YES`. Running`make` followed by a `make binary-dist` works now. The patch is now complete fool-proof. If you remove any of the files in `/inplace/bin/` between `make` and `make binary-dist` they will not be rebuilt; even though `make binary-dist` requires these files later on. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD
------------------------------------------+--------------------------------
Reporter: danharaj | Owner:
Type: bug | Status: new
Priority: highest | Milestone:
Component: Build System | Version: 7.7
Resolution: | Keywords:
Operating System: MacOS X | Architecture: x86_64
Type of failure: Installing GHC failed | (amd64)
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
------------------------------------------+--------------------------------
Comment (by Austin Seipp

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: closed Priority: highest | Milestone: Component: Build System | Version: 7.7 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Changes (by thoughtpolice): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD ------------------------------------------+-------------------------------- Reporter: danharaj | Owner: Type: bug | Status: closed Priority: highest | Milestone: Component: Build System | Version: 7.7 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC failed | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ------------------------------------------+-------------------------------- Comment (by thoughtpolice): Merged, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8122: make binary-dist broken on OS X in HEAD -------------------------------------+------------------------------------- Reporter: danharaj | Owner: Type: bug | Status: closed Priority: highest | Milestone: Component: Build System | Version: 7.7 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: x86_64 Type of failure: Installing GHC | (amd64) failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by thomie): Replying to [comment:5 edsko]:
It seems `$$($1_$2_PROG_INPLACE)` is explicitly only set when `BINDIST` is not equal to `YES` (lines 187, 200). But then how could this work for anyone?
Replying to [comment:8 darchon]:
`make binary-dist` also started failing for me; I don't know why it worked earlier...
For posterity, this got probably broken in commit c6a05a72d237cba0f17ea202f7c38ca0ac54aeb7: {{{ Author: Ian Lynagh < Date: Thu May 16 12:58:42 2013 +0100 Make dynamic GHC no Windows installable too We need different paths in the wrapper, as teh installed tree is a different shape to the build tree. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8122#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC