Bug 1795633

Summary: GCC10 '"__has_include" cannot be used as a macro name' error on Arm + s390x
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: aoliva, avi.kivity, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc, sipoyare
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-03-31 09:31:05 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:

Description Vít Ondruch 2020-01-28 14:04:06 UTC
Description of problem:
Trying to build Ruby [1], I observe following error on armv7hl, aarch64 and s390x:

~~~
compiling builtin.c
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -fPIC  -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/armv7hl-linux -I./include -I. -I./enc/unicode/12.1.0    -o builtin.o -c builtin.c
encdb.h updated
error in initial header file:
In file included from /tmp/20200128-25011-59cayd.c:1:
/tmp/20200128-25011-37s5t4.h:15315:9: error: "__has_include" cannot be used as a macro name
15315 | #define __has_include __has_include
      |         ^~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
~~~


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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Build fails.


Expected results:
Build succeeds as it used to with GCC 9.x


Additional info:
I am surprised this fails just on several architectures. Not sure if this is arch specific GCC or Ruby issue.


[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=41135726

Comment 1 Vít Ondruch 2020-01-28 16:43:37 UTC
It seems there if fix available already. Can we get it into Fedora soon? That would be wonderful 😇

Comment 2 Jeff Law 2020-01-28 16:50:41 UTC
Jakub usually updates regularly at this phase.  I'd be surprised if a build with that fix isn't in within a week.

Comment 3 Vít Ondruch 2020-01-29 09:50:31 UTC
Just to explain, if it was fixed soonish, I could build fixed version of Ruby and that in turn would fix FTBFS of ~50 rubygem-, which otherwise won't pass mass rebuild. Fixing this in a week is nice, it will miss the mass rebuild and therefore cause lot more troubles.

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