[GHC] #9828: genprimopcode: parse error

#9828: genprimopcode: parse error ----------------------------+---------------------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Keywords: | Operating System: Linux Architecture: powerpc | Type of failure: Building GHC failed Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------+---------------------------------------------- Building git HEAD on powerpc-linux I get: {{{ "inplace/bin/genprimopcode" --data-decl < compiler/stage1/build/primops.txt > compiler/stage1/build/primop-data-decl.hs-incl genprimopcode: parse error at "Parse error at line 42, column 8" }}} If I look at line 42 of `compiler/stage1/build/primops.txt` I see: {{{ -- SCALAR_TYPE is the scalar type used to inject to/project from vector }}} The word "vector" from the comment got wrapped onto the next line for no good reason. I've checked the file `compiler/prelude/primops.txt.pp` which is processed to generate the file I'm having problems with and that file is fine. I've cloned a new copy of the repo and done the usual `perl boot && ./configure && make` only to see exactly the same result. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9828 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9828: genprimopcode: parse error ----------------------------------------------+--------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Comment (by erikd): The file `compiler/stage1/build/primops.txt` is generated using a command like: {{{ gcc -E -P -Iincludes -Iincludes/dist -Iincludes/dist- derivedconstants/header \ -Iincludes/dist-ghcconstants/header -Icompiler/stage1 \ -x c compiler/prelude/primops.txt.pp | grep -v '^#pragma GCC' \ > compiler/stage2/build/primops.txt }}} and gcc on this machine is `gcc version 4.9.2 (Debian 4.9.2-2)`. If I use `gcc-4.6` in the command above instead of just `gcc` the build proceeds past this point. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9828#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9828: genprimopcode: parse error ----------------------------------------------+--------------------------- Reporter: erikd | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Changes (by thomie): * owner: => thomie Comment: The cause of this bug is my patch for #9094. To install gcc-4.9 on Ubuntu 14.04: {{{ $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test $ sudo apt-get update $ sudo apt-get install gcc-4.9 $ gcc-4.9 --version gcc-4.9 (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9828#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9828: genprimopcode: parse error
----------------------------------------------+---------------------------
Reporter: erikd | Owner: thomie
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Operating System: Linux | Architecture: powerpc
Type of failure: Building GHC failed | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
----------------------------------------------+---------------------------
Comment (by Herbert Valerio Riedel
Please revert this commit, it is horribly wrong. I'll have a proper look later, but not supplying `-traditional` to the C preprocessor is the cause of #9828.
the reverted commit was related to #9094 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9828#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9828: genprimopcode: parse error ----------------------------------------------+--------------------------- Reporter: erikd | Owner: thomie Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.9 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Comment (by erikd): I can confirm that this fixes it for me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9828#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9828: genprimopcode: parse error ----------------------------------------------+--------------------------- Reporter: erikd | Owner: thomie Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Build System | Version: 7.9 Resolution: fixed | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC failed | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | ----------------------------------------------+--------------------------- Changes (by thomie): * status: new => closed * resolution: => fixed * component: Compiler => Build System * milestone: => 7.10.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9828#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC