QE reported that a rebuild of devtoolset-6-gcc-6.2.1-2.el7 on aarch64 failed with ../../../libcpp/lex.c:754:22: fatal error: arm_neon.h: No such file or directory Yet devtoolset-6-gcc-6.2.1-2.el7.aarch64.rpm built in brew just fine. The problem is that when devtoolset-6-build is installed, the 'scl' macro is defined, so in gcc.spec file we do %{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} so PATH contains DTS6. This also changes where we look for #include <...>: [...] /usr/lib/gcc/aarch64-redhat-linux/4.8.5/include vs. [...] /opt/rh/devtoolset-6/root/usr/lib/gcc/aarch64-redhat-linux/6.2.1/include But arm_neon.h is only installed with system gcc, where this was fixed in https://bugzilla.redhat.com/show_bug.cgi?id=1007490, and not with DTS6 gcc.
And the patch should be just --- a/gcc.spec +++ b/gcc.spec @@ -6,7 +6,7 @@ %global gcc_version 6.2.1 # Note, gcc_release must be integer, if you want to add suffixes to # %{release}, append them after %{gcc_release} on Release: line. -%global gcc_release 2 +%global gcc_release 3 %global mpc_version 0.8.1 %global isl_version 0.14 %global graphviz_version 2.26.0 @@ -2033,6 +2033,9 @@ fi %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/htmintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/htmxlintrin.h %endif +%ifarch aarch64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h +%endif %ifarch s390 s390x %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/s390intrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/htmintrin.h @@ -2583,6 +2586,9 @@ fi %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Fri Oct 7 2016 Marek Polacek <polacek> 6.2.1-3 +- add arm_neon.h on aarch64 (#1382733) + * Fri Sep 16 2016 Jakub Jelinek <jakub> 6.2.1-2 - update from Fedora 6.2.1-2 but I haven't tested it yet.
It seems it helped. The devtoolset-6-gcc-6.2.1-3.el7 can be rebuilt using itself.
Works with devtoolset-6-gcc-6.2.1-3.1.el7.aarch64 VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2734.html