Skip to content

Building stage1:lib:text target is not robust

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)
)
Trac metadata
Trac field Value
Version 8.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System (Hadrian)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information