Bug 1796046 - clang fails mass rebuild on ppc64le
Summary: clang fails mass rebuild on ppc64le
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: clang
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F32FTBFS GCC10
TreeView+ depends on / blocked
 
Reported: 2020-01-29 13:41 UTC by Mattias Ellert
Modified: 2020-02-12 15:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-12 15:24:19 UTC
Type: Bug


Attachments (Terms of Use)
The patch that makes the package build (605 bytes, patch)
2020-01-29 13:41 UTC, Mattias Ellert
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.