Stage1Only=YES does not seem to work on current master

simple build.mk: SRC_CC_OPTS+=-O2 -pipe BUILD_DOCBOOK_PDF = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_HTML = NO HADDOCK_DOCS = NO SRC_HC_OPTS+=-w Stage1Only=YES GhcUnregisterised=YES SplitObjs=NO Leads to failures of missing stage2: "inplace/lib/unlit" utils/count_lines/count_lines.lprl utils/count_lines/dist/count_lines.prl "inplace/bin/ghc-stage2" -optc-O2 -optc-pipe -optc-Ilibraries/primitive/cbits -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/libraries/base/include' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/rts/dist/build' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes/dist-derivedconstants/header' -static -H32m -O -w -package-name primitive-0.4.0.1 -hide-all-packages -i -ilibraries/primitive/. -ilibraries/primitive/dist-install/build -ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/dist-install/build -Ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/cbits -optP-include -optPlibraries/primitive/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package ghc-prim-0.3.1.0 -O2 -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -c libraries/primitive/cbits/primitive-memops.c -o libraries/primitive/dist-install/build/cbits/primitive-memops.o "inplace/bin/ghc-stage2" -optc-O2 -optc-pipe -optc-Ilibraries/primitive/cbits -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/libraries/base/include' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/rts/dist/build' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes/dist-derivedconstants/header' -static -prof -H32m -O -w -package-name primitive-0.4.0.1 -hide-all-packages -i -ilibraries/primitive/. -ilibraries/primitive/dist-install/build -ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/dist-install/build -Ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/cbits -optP-include -optPlibraries/primitive/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package ghc-prim-0.3.1.0 -O2 -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -c libraries/primitive/cbits/primitive-memops.c -o libraries/primitive/dist-install/build/cbits/primitive-memops.p_o /bin/sh: inplace/bin/ghc-stage2: No such file or directory make[1]: *** [libraries/primitive/dist-install/build/cbits/primitive-memops.o] Error 127 make[1]: *** Waiting for unfinished jobs.... /bin/sh: inplace/bin/ghc-stage2: No such file or directory -- Sergei

On 27/01/13 21:21, Sergei Trofimovich wrote:
simple build.mk:
SRC_CC_OPTS+=-O2 -pipe
BUILD_DOCBOOK_PDF = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_HTML = NO HADDOCK_DOCS = NO SRC_HC_OPTS+=-w
Stage1Only=YES GhcUnregisterised=YES SplitObjs=NO
Leads to failures of missing stage2:
"inplace/lib/unlit" utils/count_lines/count_lines.lprl utils/count_lines/dist/count_lines.prl "inplace/bin/ghc-stage2" -optc-O2 -optc-pipe -optc-Ilibraries/primitive/cbits -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/libraries/base/include' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/rts/dist/build' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes/dist-derivedconstants/header' -static -H32m -O -w -package-name primitive-0.4.0.1 -hide-all-packages -i -ilibraries/primitive/. -ilibraries/primitive/dist-install/build -ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/dist-install/build -Ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/cbits -optP-include -optPlibraries/primitive/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package ghc-prim-0.3.1.0 -O2 -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -c libraries/prim itive/cbits/primitive-memops.c -o libraries/primitive/dist-install/build/cbits/primitive-memops.o "inplace/bin/ghc-stage2" -optc-O2 -optc-pipe -optc-Ilibraries/primitive/cbits -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/libraries/base/include' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/rts/dist/build' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes/dist-derivedconstants/header' -static -prof -H32m -O -w -package-name primitive-0.4.0.1 -hide-all-packages -i -ilibraries/primitive/. -ilibraries/primitive/dist-install/build -ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/dist-install/build -Ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/cbits -optP-include -optPlibraries/primitive/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package ghc-prim-0.3.1.0 -O2 -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -c librarie s/primitive/cbits/primitive-memops.c -o libraries/primitive/dist-install/build/cbits/primitive-memops.p_o /bin/sh: inplace/bin/ghc-stage2: No such file or directory make[1]: *** [libraries/primitive/dist-install/build/cbits/primitive-memops.o] Error 127 make[1]: *** Waiting for unfinished jobs.... /bin/sh: inplace/bin/ghc-stage2: No such file or directory
I just pushed a patch that should fix this. Part of the problem is that the --no-dph flag to sync-all doesn't disable the primitive & vector repos like it used to, because they are now submodules. I've fixed it in the build system instead. Cheers, Simon

On Tue, 29 Jan 2013 10:20:19 +0000
Simon Marlow
On 27/01/13 21:21, Sergei Trofimovich wrote:
simple build.mk:
SRC_CC_OPTS+=-O2 -pipe
BUILD_DOCBOOK_PDF = NO BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_HTML = NO HADDOCK_DOCS = NO SRC_HC_OPTS+=-w
Stage1Only=YES GhcUnregisterised=YES SplitObjs=NO
Leads to failures of missing stage2:
"inplace/lib/unlit" utils/count_lines/count_lines.lprl utils/count_lines/dist/count_lines.prl "inplace/bin/ghc-stage2" -optc-O2 -optc-pipe -optc-Ilibraries/primitive/cbits -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/libraries/base/include' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/rts/dist/build' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes/dist-derivedconstants/header' -static -H32m -O -w -package-name primitive-0.4.0.1 -hide-all-packages -i -ilibraries/primitive/. -ilibraries/primitive/dist-install/build -ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/dist-install/build -Ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/cbits -optP-include -optPlibraries/primitive/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package ghc-prim-0.3.1.0 -O2 -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -c libraries/prim itive/cbits/primitive-memops.c -o libraries/primitive/dist-install/build/cbits/primitive-memops.o "inplace/bin/ghc-stage2" -optc-O2 -optc-pipe -optc-Ilibraries/primitive/cbits -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/libraries/base/include' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/rts/dist/build' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes' -optc-I'/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/work/ghc-9999/includes/dist-derivedconstants/header' -static -prof -H32m -O -w -package-name primitive-0.4.0.1 -hide-all-packages -i -ilibraries/primitive/. -ilibraries/primitive/dist-install/build -ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/dist-install/build -Ilibraries/primitive/dist-install/build/autogen -Ilibraries/primitive/cbits -optP-include -optPlibraries/primitive/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package ghc-prim-0.3.1.0 -O2 -XHaskell98 -XCPP -O2 -no-user-package-db -rtsopts -c librarie s/primitive/cbits/primitive-memops.c -o libraries/primitive/dist-install/build/cbits/primitive-memops.p_o /bin/sh: inplace/bin/ghc-stage2: No such file or directory make[1]: *** [libraries/primitive/dist-install/build/cbits/primitive-memops.o] Error 127 make[1]: *** Waiting for unfinished jobs.... /bin/sh: inplace/bin/ghc-stage2: No such file or directory
I just pushed a patch that should fix this. Part of the problem is that the --no-dph flag to sync-all doesn't disable the primitive & vector repos like it used to, because they are now submodules. I've fixed it in the build system instead.
Yeah, your change fixed 'make' for stage1only. make install does not work though (and didn't before): $ make install DESTDIR=/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/ ... Installing library in /var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/usr/lib64/ghc-7.7.20130129/bin-package-db-0.0.0.0 CROSS_COMPILE="ia64-unknown-linux-gnu-" "inplace/bin/ghc-cabal" copy "strip" libraries/hoopl dist-install '/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image' '/usr' '/usr/lib64/ghc-7.7.20130129' '/usr/share/doc/ghc-9999/html/libraries' Installing library in /var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/usr/lib64/ghc-7.7.20130129/hoopl-3.10.0.0 CROSS_COMPILE="ia64-unknown-linux-gnu-" "inplace/bin/ghc-cabal" copy "strip" libraries/transformers dist-install '/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image' '/usr' '/usr/lib64/ghc-7.7.20130129' '/usr/share/doc/ghc-9999/html/libraries' Installing library in /var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/usr/lib64/ghc-7.7.20130129/transformers-0.3.0.0 "/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/usr/lib64/ghc-7.7.20130129/bin/ghc-pkg" --force --global-package-db "/var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/usr/lib64/ghc-7.7.20130129/package.conf.d" update rts/package.conf.install /bin/sh: /var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/usr/lib64/ghc-7.7.20130129/bin/ghc-pkg: No such file or directory make[1]: *** [install_packages] Error 127 $ ls /var/tmp/portage/cross-ia64-unknown-linux-gnu/ghc-9999/image/usr/lib64/ghc-7.7.20130129/bin/ ghc hsc2hs I've decided to stress-test cross-compilation a bit more (tried --target=x86_64-w64-mingw32) and found out more fun cases where ghc needs to be tuned: [some patches attached] Unfixed issues: - buld system has a WINDOWS=YES/NO switch, but it does not distinct between --build=windows and --target=windows: * It tries to build 'touch' on linux host and fails * It tries to build a 'unix' package for windows target * cabal gets confused and gets 'os(windows) ==false' for a stage1 with --target=windows Otherwise it almost works. Thanks again! -- Sergei
participants (2)
-
Sergei Trofimovich
-
Simon Marlow