#9454: Unregisterized builds failing due to multiple uniques assigned to same FastString -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 7.9 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Incorrect Blocked By: | result at runtime Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- When compiling with `--enable-unregisterised`, we get this failure: {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -H32m -O -this-package-key conta_4P4 dHnD3A89EkvERxmaFmd -hide-all-packages -i -ilibraries/containers/. -ilibraries/containers/dist-install /build -ilibraries/containers/dist-install/build/autogen -Ilibraries/containers/dist-install/build -Il ibraries/containers/dist-install/build/autogen -Ilibraries/containers/include -optP-include -optPli braries/containers/dist-install/build/autogen/cabal_macros.h -package-key array_H3W2D8UaI9TKGEhUuQHax2 -package-key base_DiPQ1siqG3SBjHauL3L03p -package-key deeps_L0rJEVU1Zgn8x0Qs5aTOsU -package-key ghcpr _BE58KUgBe9ELCsPXiJ1Q2r -O2 -Wall -XHaskell98 -XRoleAnnotations -O2 -no- user-package-db -rtsopts -odir libraries/containers/dist-install/build -hidir libraries/containers /dist-install/build -stubdir libraries/containers/dist-install/build -dynamic-too -c libraries/containers/./Data/StrictPair.hs -o libraries/containers/dist-install/build/Data/StrictPair.o -dyno libraries/containers/dist-install/bui ld/Data/StrictPair.dyn_o <command line>: unknown package: deepseq-1.3.0.2 }}} The reason why GHC is unable to find the package is because, as it turns out, the Unique that was used to store the key in a map is different from the Unique associated with the FastString that we're doing the lookup with. The bug only shows up with ghc-stage1 is compiled with optimizations. Bisecting revealed that this commit was to blame: {{{ commit 66218d15b7c27a4a38992003bd761f60bae84b1f Author: Edward Z. Yang <ezyang@cs.stanford.edu> Date: Fri Jul 18 14:48:47 2014 +0100 Package keys (for linking/type equality) separated from package IDs. }}} However, looking at the commit, there is nothing that would obviously cause this problem, so maybe it is tickling a preexisting bug. Bisection script: {{{ #!/bin/sh make clean git submodule update perl boot ./configure --enable-unregisterised make -j11 libraries/containers/dist-install/build/Data/StrictPair.o }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9454> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler