[GHC] #16271: Building stage1:lib:text target is not robust

GHC ghc-devs at haskell.org
Fri Feb 1 18:07:11 UTC 2019


#16271: Building stage1:lib:text target is not robust
-------------------------------------+-------------------------------------
           Reporter:  mpickering     |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Build System   |           Version:  8.6.3
  (Hadrian)                          |
           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:
-------------------------------------+-------------------------------------
 It seems the dependency on `cabal_macros.h` is not properly specified in
 the logic to build the libraries.

 If I start a build, build a library and then remove the library dir, the
 target fails to build.

 {{{
 ./hadrian/build.sh stage1:lib:text
 rm -r _build/stage1/
 ./hadrian/build.sh stage1:lib:text
 }}}


 {{{
 cc1: fatal error:
 integersimple/stage1/libraries/text/build/autogen/cabal_macros.h: No such
 file or directory
 compilation terminated.
 `cc' failed in phase `C pre-processor'. (Exit code: 1)
 shakeArgsWith   0.000s    0%
 Function shake  0.006s    0%
 Database read   0.831s   23%  ========
 With database   0.100s    2%
 Running rules   2.545s   73%  =========================
 Total           3.482s  100%
 Error when running Shake build system:
   at src/Main.hs:58:30-42:
 * Depends on: stage1:lib:text
   at src/Rules/SimpleTargets.hs:31:5-15:
 * Depends on: integersimple/stage1/lib/package.conf.d/text-1.2.3.1.conf
 * Depends on:
 integersimple/stage1/libraries/text/build/libHStext-1.2.3.1.a
 * Depends on: integersimple/stage1/libraries/text/build/Data/Text/Show.o
 * Depends on: OracleQ (KeyValues
 ("integersimple/stage1/libraries/text/.dependencies","integersimple/stage1/libraries/text/build/Data/Text/Show.o"))
 * Depends on: integersimple/stage1/libraries/text/.dependencies
 * Depends on: integersimple/stage1/libraries/text/.dependencies.mk
 * Raised the exception:
 user error (Development.Shake.cmd, system command failed
 Command: integersimple/stage0/bin/ghc -M -hisuf hi -osuf o -hcsuf hc
 -static -hide-all-packages -no-user-package-db '-package-db
 integersimple/stage1/lib/package.conf.d' '-this-unit-id text-1.2.3.1'
 '-package-id array-0.5.2.0' '-package-id base-4.12.0.0' '-package-id
 binary-0.8.6.0' '-package-id bytestring-0.10.9.0' '-package-id
 deepseq-1.4.4.0' '-package-id ghc-prim-0.5.3' '-package-id integer-
 simple-0.1.1.1' -i -iintegersimple/stage1/libraries/text/build
 -iintegersimple/stage1/libraries/text/build/autogen -ilibraries/text/.
 -Iincludes -Iintegersimple/generated
 -Iintegersimple/stage1/libraries/text/build -I/nix/store
 /f97ls1qx6vxf75304874843ysdcyimnn-ghc-build-environment/include
 -Iintegersimple/stage1/libraries/text/build/include
 -Ilibraries/text/include -I/root/ghc/integersimple/stage1/lib/x86_64
 -linux-ghc-8.7.20190124/bytestring-0.10.9.0/include
 -I/root/ghc/integersimple/stage1/lib/x86_64-linux-
 ghc-8.7.20190124/base-4.12.0.0/include
 -I/root/ghc/integersimple/stage1/lib/x86_64-linux-
 ghc-8.7.20190124/rts-1.0/include -Iintegersimple/generated -optc-
 Iintegersimple/generated -optP-include
 -optPintegersimple/stage1/libraries/text/build/autogen/cabal_macros.h
 -optP-DINTEGER_SIMPLE -outputdir integersimple/stage1/libraries/text/build
 -include-pkg-deps -dep-makefile
 integersimple/stage1/libraries/text/.dependencies.mk -dep-suffix '' -dep-
 suffix dyn_ libraries/text/Data/Text.hs libraries/text/Data/Text/Array.hs
 libraries/text/Data/Text/Encoding.hs
 libraries/text/Data/Text/Encoding/Error.hs
 libraries/text/Data/Text/Foreign.hs libraries/text/Data/Text/IO.hs
 libraries/text/Data/Text/Internal.hs
 libraries/text/Data/Text/Internal/Builder.hs
 libraries/text/Data/Text/Internal/Builder/Functions.hs
 libraries/text/Data/Text/Internal/Builder/Int/Digits.hs
 libraries/text/Data/Text/Internal/Builder/RealFloat/Functions.hs
 libraries/text/Data/Text/Internal/Encoding/Fusion.hs
 libraries/text/Data/Text/Internal/Encoding/Fusion/Common.hs
 libraries/text/Data/Text/Internal/Encoding/Utf16.hs
 libraries/text/Data/Text/Internal/Encoding/Utf32.hs
 libraries/text/Data/Text/Internal/Encoding/Utf8.hs
 libraries/text/Data/Text/Internal/Functions.hs
 libraries/text/Data/Text/Internal/Fusion.hs
 libraries/text/Data/Text/Internal/Fusion/CaseMapping.hs
 libraries/text/Data/Text/Internal/Fusion/Common.hs
 libraries/text/Data/Text/Internal/Fusion/Size.hs
 libraries/text/Data/Text/Internal/Fusion/Types.hs
 libraries/text/Data/Text/Internal/IO.hs
 libraries/text/Data/Text/Internal/Lazy.hs
 libraries/text/Data/Text/Internal/Lazy/Encoding/Fusion.hs
 libraries/text/Data/Text/Internal/Lazy/Fusion.hs
 libraries/text/Data/Text/Internal/Lazy/Search.hs
 libraries/text/Data/Text/Internal/Private.hs
 libraries/text/Data/Text/Internal/Read.hs
 libraries/text/Data/Text/Internal/Search.hs
 libraries/text/Data/Text/Internal/Unsafe.hs
 libraries/text/Data/Text/Internal/Unsafe/Char.hs
 libraries/text/Data/Text/Internal/Unsafe/Shift.hs
 libraries/text/Data/Text/Lazy.hs libraries/text/Data/Text/Lazy/Builder.hs
 libraries/text/Data/Text/Lazy/Builder/Int.hs
 libraries/text/Data/Text/Lazy/Builder/RealFloat.hs
 libraries/text/Data/Text/Lazy/Encoding.hs
 libraries/text/Data/Text/Lazy/IO.hs
 libraries/text/Data/Text/Lazy/Internal.hs
 libraries/text/Data/Text/Lazy/Read.hs libraries/text/Data/Text/Read.hs
 libraries/text/Data/Text/Show.hs libraries/text/Data/Text/Unsafe.hs -O0
 -H64m -Wall -fwarn-tabs -funbox-strict-fields -O2 -XHaskell98 -ghcversion-
 file=/root/ghc/integersimple/generated/ghcversion.h -O -Wno-deprecated-
 flags -Wno-unused-imports -Werror
 Exit code: 1
 Stderr:
 cc1: fatal error:
 integersimple/stage1/libraries/text/build/autogen/cabal_macros.h: No such
 file or directory
 compilation terminated.
 `cc' failed in phase `C pre-processor'. (Exit code: 1)
 )

 }}}

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


More information about the ghc-tickets mailing list