Bug 1795633 - GCC10 '"__has_include" cannot be used as a macro name' error on Arm + s390x
Summary: GCC10 '"__has_include" cannot be used as a macro name' error on Arm + s390x
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-28 14:04 UTC by Vít Ondruch
Modified: 2020-10-05 08:30 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-31 09:31:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 93452 0 P1 RESOLVED [10 Regression] __has_include changes broke compilation of -fdirectives-only preprocessed sources 2020-10-05 10:56:18 UTC

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.


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