Bug 769803

Summary: PPCGenRegisterInfo.inc:17:11: error: expected identifier before numeric constant
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: llvmAssignee: Michel Lind <michel>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: rawhideCC: benh, bos, dmalcolm, michel, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-27 15:48:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 803329    

Description Karsten Hopp 2011-12-22 10:14:02 UTC
Description of problem:
llvm-3.0-1.fc17 fails to build on PowerPC:

In file included from MCTargetDesc/PPCMCTargetDesc.h:41:0,
                 from MCTargetDesc/PPCBaseInfo.h:20,
                 from PPC.h:18,
                 from PPCAsmPrinter.cpp:20:
/builddir/build/BUILD/llvm-3.0.src/lib/Target/PowerPC/PPCGenRegisterInfo.inc:17:11: error: expected identifier before numeric constant
/builddir/build/BUILD/llvm-3.0.src/lib/Target/PowerPC/PPCGenRegisterInfo.inc:17:11: error: expected unqualified-id before numeric constant
In file included from /usr/lib/gcc/ppc64-redhat-linux/4.6.2/../../../../include/c++/4.6.2/new:42:0,
                 from /usr/lib/gcc/ppc64-redhat-linux/4.6.2/../../../../include/c++/4.6.2/ext/new_allocator.h:34,
                 from /usr/lib/gcc/ppc64-redhat-linux/4.6.2/../../../../include/c++/4.6.2/ppc64-redhat-linux/bits/c++allocator.h:34,
                 from /usr/lib/gcc/ppc64-redhat-linux/4.6.2/../../../../include/c++/4.6.2/bits/allocator.h:48,
                 from /usr/lib/gcc/ppc64-redhat-linux/4.6.2/../../../../include/c++/4.6.2/string:43,
                 from /builddir/build/BUILD/llvm-3.0.src/include/llvm/ADT/StringRef.h:16,
                 from /builddir/build/BUILD/llvm-3.0.src/include/llvm/Support/ErrorHandling.h:19,
                 from MCTargetDesc/PPCBaseInfo.h:21,
                 from PPC.h:18,
                 from PPCAsmPrinter.cpp:20:
/usr/lib/gcc/ppc64-redhat-linux/4.6.2/../../../../include/c++/4.6.2/exception:37:37: error: expected '}' before end of line
/usr/lib/gcc/ppc64-redhat-linux/4.6.2/../../../../include/c++/4.6.2/exception:37:37: error: expected declaration before end of line
/bin/rm: cannot remove `/builddir/build/BUILD/llvm-3.0.src/lib/Target/PowerPC/Release/PPCAsmPrinter.d.tmp': No such file or directory


Steps to Reproduce:
1. ppc-koji build --scratch f17 llvm-3.0-1.fc17.src.rpm
  
Actual results:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=344319

Comment 1 Karsten Hopp 2011-12-22 15:23:23 UTC
raising to urgent as this prevents building mesa and that in turn blocks avahi and hundreds of other packages

Comment 2 Benjamin Herrenschmidt 2012-02-13 07:51:18 UTC
It looks like a known bug:

http://llvm.org/bugs/show_bug.cgi?id=10969

I'm surprised today's trunk still don't have it fixed... I don't like either of the proposed solutions tho, maybe the namespace should be changed to PowerPC ?

Any llvm hacker around who could do that ?

Comment 3 Benjamin Herrenschmidt 2012-03-15 19:53:47 UTC
You should not build Mesa with llvm enabled on PowerPC. Even with that fix, LLVM doesn't work properly and the resulting Mesa crashes. I'm working on it but the lack of spare time lately made my progress very slow.

Comment 4 Karsten Hopp 2012-04-23 16:36:21 UTC
*** Bug 785750 has been marked as a duplicate of this bug. ***