Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1796046

Summary: clang fails mass rebuild on ppc64le
Product: [Fedora] Fedora Reporter: Mattias Ellert <mattias.ellert>
Component: clangAssignee: Tom Stellard <tstellar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: airlied, sbergman, sguelton, siddharth.kde, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-12 15:24:19 UTC Type: Bug
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: 1750908, 1792464    
Attachments:
Description Flags
The patch that makes the package build none

Description Mattias Ellert 2020-01-29 13:41:36 UTC
Created attachment 1656254 [details]
The patch that makes the package build

Description of problem:

clang fails mass rebuild on ppc64le:
https://koji.fedoraproject.org/koji/taskinfo?taskID=41137358

build.log says:

../lib/Lex/Lexer.cpp: In member function 'bool clang::Lexer::SkipBlockComment(clang::Token&, const char*, bool&)':
../lib/Lex/Lexer.cpp:2545:34: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
 2545 |              !vec_any_eq(*(const vector unsigned char*)CurPtr, Slashes))
      |                                  ^~~~~~

Version-Release number of selected component (if applicable):

clang-9.0.1-3.fc32

How reproducible:

Always

Steps to Reproduce:
1. Rebuild clang for rawhide ppc64le (using gcc 10)

Actual results:

Failed build

Expected results:

Successful build

Additional info:

The following patch makes the build work:

$ cat clang-altivec-vector.patch 
diff -ur clang-9.0.1.src.orig/lib/Lex/Lexer.cpp clang-9.0.1.src/lib/Lex/Lexer.cpp
--- clang-9.0.1.src.orig/lib/Lex/Lexer.cpp	2019-12-11 20:15:30.000000000 +0100
+++ clang-9.0.1.src/lib/Lex/Lexer.cpp	2020-01-29 12:57:36.849173552 +0100
@@ -2542,7 +2542,7 @@
         '/', '/', '/', '/',  '/', '/', '/', '/'
       };
       while (CurPtr+16 <= BufferEnd &&
-             !vec_any_eq(*(const vector unsigned char*)CurPtr, Slashes))
+             !vec_any_eq(*(const __vector unsigned char*)CurPtr, Slashes))
         CurPtr += 16;
 #else
       // Scan for '/' quickly.  Many block comments are very large.

Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=41195794

I.e. changing vector to __vector

I can not say if this in an intentional change in gcc 10 or an unintentinal regression.

Comment 1 Ben Cotton 2020-02-11 17:23:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 2 serge_sans_paille 2020-02-12 15:24:19 UTC
This bug is due to a gcc upgrade and was fixed upstream in https://reviews.llvm.org/D74129, included in clang-10.0.0-0.2.rc1.fc32