Opened 5 years ago

Closed 5 years ago

Last modified 12 months ago

#9828 closed bug (fixed)

genprimopcode: parse error

Reported by: erikd Owned by: thomie
Priority: normal Milestone: 7.10.1
Component: Build System (make) Version: 7.9
Keywords: Cc:
Operating System: Linux Architecture: powerpc
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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

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.

Change History (6)

comment:1 Changed 5 years ago 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.

comment:2 Changed 5 years ago by thomie

Owner: set to thomie

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

comment:3 Changed 5 years ago by Herbert Valerio Riedel <hvr@…>

In 0511c0ab09f705c3012b405781c9398a143b0e38/ghc:

Revert "Remove RAWCPP_FLAGS"

This reverts commit 460eebec65811c6a7bbe11645df322dda868e80d.

Thomas requested to revert the commit with the words:

> 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

comment:4 Changed 5 years ago by erikd

I can confirm that this fixes it for me.

comment:5 Changed 5 years ago by thomie

Component: CompilerBuild System
Milestone: 7.10.1
Resolution: fixed
Status: newclosed

comment:6 Changed 12 months ago by bgamari

Component: Build SystemBuild System (make)

The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make build system to prevent confusion.

Note: See TracTickets for help on using tickets.