[GHC] #11005: GHC's build system can't deal with ghc install path with multiple spaces in it

#11005: GHC's build system can't deal with ghc install path with multiple spaces in it -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: lowest | Milestone: ⊥ Component: Build System | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Building GHC Unknown/Multiple | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Essentially, there are a bunch of places in the build system where we forget to quote paths, and so the spaces collapse into a single space and the paths fail. I fixed a few low hanging instances of this but I got hsc2hs to fail: {{{ "inplace/bin/hsc2hs" '--cc=/bin/gcc' '--ld=/bin/gcc' --cross-safe --cflag=-Wall --cflag=-fno-stack-protector --cflag=-Dx86_64_HOST_ARCH=1 --cflag=-Dlinux_HOST_OS=1 --cflag=-D__GLASGOW_HASKELL__=711 '--cflag=-fno- stack-protector' '--cflag=-Wall' '--cflag=-Icompiler/stage1/build/autogen' '--cflag=-Icompiler/.' '--cflag=-Icompiler/parser' '-- cflag=-Icompiler/utils' '--cflag=-Icompiler/stage1' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/process-1.2.3.0/include' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/directory-1.2.2.0/include' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/unix-2.7.1.0/include' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/time-1.5.0.1/include' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/bytestring-0.10.6.0/include' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/base-4.8.2.0/include' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/integer-gmp-1.0.0.0/include' '-- cflag=-I/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/include' '--cflag=-Werror=unused-but-set- variable' '--cflag=-Wno-error=inline' '--lflag=-L/home/hs01/ezyang/ghc- bootstrap/libraries/transformers/dist-boot/build' '-- lflag=-L/home/hs01/ezyang/ghc-bootstrap/libraries/template-haskell/dist- boot/build' '--lflag=-L/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/process-1.2.3.0' '--lflag=-L/home/hs01/ezyang /ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/pretty-1.1.2.0' '--lflag=-L/home/hs01/ezyang /ghc-bootstrap/libraries/hpc/dist-boot/build' '--lflag=-L/home/hs01/ezyang /ghc-bootstrap/libraries/hoopl/dist-boot/build' '-- lflag=-L/home/hs01/ezyang/ghc-bootstrap/libraries/ghc-boot/dist- boot/build' '--lflag=-L/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/directory-1.2.2.0' '--lflag=-L/home/hs01/ezyang /ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/unix-2.7.1.0' '--lflag=-L/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/time-1.5.0.1' '--lflag=-L/home/hs01/ezyang/ghc- validate/bindisttest/install dir/lib/ghc-7.11.20151022/filepath-1.4.0.0' ' --lflag=-L/home/hs01/ezyang/ghc-bootstrap/libraries/binary/dist- boot/build' '--lflag=-L/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/containers-0.5.6.2' '--lflag=-L/home/hs01/ezyang /ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/bytestring-0.10.6.0' '-- lflag=-L/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/deepseq-1.4.1.1' '--lflag=-L/home/hs01/ezyang /ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/array-0.5.1.0' '--lflag=-L/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/base-4.8.2.0' '--lflag=-L/home/hs01/ezyang/ghc- validate/bindisttest/install dir/lib/ghc-7.11.20151022/integer- gmp-1.0.0.0' '--lflag=-L/home/hs01/ezyang/ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/ghc-prim-0.4.0.0' '--lflag=-L/home/hs01/ezyang /ghc-validate/bindisttest/install dir/lib/ghc-7.11.20151022/rts' '-- lflag=-lrt' '--lflag=-lutil' '--lflag=-ldl' '--lflag=-lpthread' '-- lflag=-lgmp' '--lflag=-lm' '--lflag=-lrt' '--lflag=-ldl' '--lflag=-lelf' ' --lflag=-ldw' --cflag=-Icompiler/stage1/build/autogen --cflag=-include --cflag=compiler/stage1/build/autogen/cabal_macros.h compiler/utils/Fingerprint.hsc -o compiler/stage1/build/Fingerprint.hs }}} Notice that there is only a single space in the `include` path passed to hsc2hs. I didn't feel like tracking down where we didn't quote enough. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11005 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11005: GHC's build system can't deal with ghc install path with multiple spaces in it -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: lowest | Milestone: ⊥ Component: Build System | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): If I understand correctly, to reproduce the bug: * Install GHC into a directory with spaces. * Use that GHC as a bootstrap compiler, to build GHC again. The first step already succeeds, and the installed compiler should generally be usable, because `validate` uses it to run the testsuite. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11005#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC