[GHC] #12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies
#12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 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: -------------------------------------+------------------------------------- The `ghc-boot-th` introduced in the resolution of #12052 seems to have uncovered a bug in the build system's treatment of transitive dependencies. Namely, it seems to be possible for the build system to attempt to link `ghc-pkg` before `libghc-boot-th` has been produced. This is odd since `ghc-pkg` has a dependency on `ghc-boot`, which in turn has a dependency on `ghc-boot-th`. In the interest of moving the 8.0.1 release along I'm going to work around this for the time being by adding -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12078> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Description changed by bgamari: @@ -9,1 +9,2 @@ - this for the time being by adding + this for the time being by adding transitive dependencies to the rule in + `rules/build-prog.mk` which builds programs (including `ghc-pkg`). New description: The `ghc-boot-th` introduced in the resolution of #12052 seems to have uncovered a bug in the build system's treatment of transitive dependencies. Namely, it seems to be possible for the build system to attempt to link `ghc-pkg` before `libghc-boot-th` has been produced. This is odd since `ghc-pkg` has a dependency on `ghc-boot`, which in turn has a dependency on `ghc-boot-th`. In the interest of moving the 8.0.1 release along I'm going to work around this for the time being by adding transitive dependencies to the rule in `rules/build-prog.mk` which builds programs (including `ghc-pkg`). -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12078#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Description changed by bgamari: @@ -10,1 +10,3 @@ - `rules/build-prog.mk` which builds programs (including `ghc-pkg`). + `rules/build-prog.mk` which builds programs (including `ghc-pkg`). It + doesn't seem like this should be necessary, but with Hadian being so near + it seems like a good enough work around. New description: The `ghc-boot-th` introduced in the resolution of #12052 seems to have uncovered a bug in the build system's treatment of transitive dependencies. Namely, it seems to be possible for the build system to attempt to link `ghc-pkg` before `libghc-boot-th` has been produced. This is odd since `ghc-pkg` has a dependency on `ghc-boot`, which in turn has a dependency on `ghc-boot-th`. In the interest of moving the 8.0.1 release along I'm going to work around this for the time being by adding transitive dependencies to the rule in `rules/build-prog.mk` which builds programs (including `ghc-pkg`). It doesn't seem like this should be necessary, but with Hadian being so near it seems like a good enough work around. -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12078#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 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:"5d80d14196ef048ffe037b2d92af2e9af0cb9e19/ghc" 5d80d141/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="5d80d14196ef048ffe037b2d92af2e9af0cb9e19" rules/build-prog: Ensure programs depend upon their transitive deps Previously programs only depended upon the direct dependencies; while I would have thought that this would be sufficient, somehow we were getting to the link step of building `ghc-pkg` before `ghc-boot-th` was built (despite the fact that `ghc-boot` has a direct dependency on `ghc-boot-th`). See #12078. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12078#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 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 thomie): These commits are relevant: * 5bde27949bdda22c9d5dac254a3c783eb0f6839f {{{ Author: Ian Lynagh <igloo@earth.li> Date: Sun Jan 16 15:56:27 2011 +0000 Handle dependencies of programs on libraries correctly }}} * 5874a66b4baff3ff8dba38f629d71cbfdf7f67fc {{{ Author: Ian Lynagh <ian@well-typed.com> Date: Sun Nov 18 01:11:55 2012 +0000 Remove some dependencies I don't think we need these, and they haven't been doing anything useful for dynamic-by-default builds anyway as they hardcode the 'v' way. }}} Especially this comment: {{{ # These deps aren't technically necessary in themselves, but they # turn the dependencies of programs on libraries into transitive # dependencies. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12078#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Description changed by bgamari: @@ -4,1 +4,2 @@ - attempt to link `ghc-pkg` before `libghc-boot-th` has been produced. This + attempt to link `ghc-pkg` before `libghc-boot-th` has been produced + (although this will typically only happen when building with `-j1`). This New description: The `ghc-boot-th` introduced in the resolution of #12052 seems to have uncovered a bug in the build system's treatment of transitive dependencies. Namely, it seems to be possible for the build system to attempt to link `ghc-pkg` before `libghc-boot-th` has been produced (although this will typically only happen when building with `-j1`). This is odd since `ghc-pkg` has a dependency on `ghc-boot`, which in turn has a dependency on `ghc-boot-th`. In the interest of moving the 8.0.1 release along I'm going to work around this for the time being by adding transitive dependencies to the rule in `rules/build-prog.mk` which builds programs (including `ghc-pkg`). It doesn't seem like this should be necessary, but with Hadian being so near it seems like a good enough work around. -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12078#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12078: ghc-boot-th package reveals issue with build system's treatment of transitive dependencies -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 8.0.1 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 asr): Replying to [ticket:12078 bgamari]:
(although this will typically only happen when building with `-j1`)
I confirm it. I was using `-j1` when I found the error: {{{ $ make /usr/bin/ld: cannot find -lHSghc-boot-th-8.0.1 collect2: ld returned 1 exit status make[1]: *** [utils/ghc-pkg/dist/build/tmp/ghc-pkg] Error 1 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12078#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC