package/gcc9: Fix parallel build problem (xgcc not found)
PATCH 1/1 package/gcc9: Fix parallel build problem (xgcc not found)
Some times gcc 9.2.0, 9.3.0 failed to build with a message: "xgcc: No such file or directory"
When it fails, it's trying to execute selftests.
So to fix this problem we can disable selftests.
--- package/gcc/9.3.0/0001-disable-selftest.patch | 11 +++++++++++ 1 file changed, 11 insertions(+)
create mode 100644 package/gcc/9.3.0/0001-disable-selftest.patch
(quoted diff) +0 -0
b/package/gcc/9.3.0/0001-disable-selftest.patch
new file mode 100644
index 0000000000..d7150b0fb1
package/gcc/9.3.0/0001-disable-selftest.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- a/gcc/Makefile.in 2019-09-04 10:05:38.483715500 +0300 ++++ b/gcc/Makefile.in 2019-04-25 17:32:16.000000000 +0300 +@@ -1961,7 +1961,7 @@ + # require the selftests to be run by defining their selftest-<LANG> as + # s-selftest-<LANG>. Otherwise, they should define it as empty. + +-SELFTEST_TARGETS = @selftest_languages@ ++SELFTEST_TARGETS = + selftest: $(SELFTEST_TARGETS) + + # Recompile all the language-independent object files.
Signature · 1 line
2.25.1
PATCH 1/1 package/gcc9: Fix parallel build problem (xgcc not found)
Quoted 8 lines · On Thu, 7 May 2020 02:04:44 +0300 Maxim Kochetkov <[email protected]> wrote:
Some times gcc 9.2.0, 9.3.0 failed to build with a message: "xgcc: No such file or directory"
When it fails, it's trying to execute selftests.
So to fix this problem we can disable selftests.
Signed-off-by Maxim Kochetkov <[email protected]>
Do you have more details about this failure? Does it happen in our autobuilders? In which context?
package/gcc/9.3.0/0001-disable-selftest.patch
Quoted 6 lines
package/gcc/9.3.0/0001-disable-selftest.patch new file +0
-0
We need all patches to have a description and a Signed-off-by line. Also, they should ideally be upstreamable, which is not the case here.
Could you work on an improved version of this patch, with some more extensive description, and hopefully a solution that can be accepted by upstream gcc ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/gcc9: Fix parallel build problem (xgcc not found)
Quoted 6 lines · Thomas Petazzoni
Quoted 3 lines · On Thu, 7 May 2020 02:04:44 +0300 Maxim Kochetkov <[email protected]> wrote:
Some times gcc 9.2.0, 9.3.0 failed to build with a message: "xgcc: No such file or directory"
Quoted 8 lines
Quoted 5 lines
When it fails, it's trying to execute selftests.
So to fix this problem we can disable selftests.
Signed-off-by Maxim Kochetkov <[email protected]>Do you have more details about this failure? Does it happen in our autobuilders? In which context?
Similar issue described here:
https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108
I don't know about your autobuilder.
In my config I use CCACHE for build (try 3.6, 3.7.9 with the same result). May be it affect some timings/delay in build sequence.
It fails for gcc-final (9.2 and 9.3):
/builds/kochetkov.m/buildroot/output/build/host-gcc-final-9.3.0/build/./gcc/xgcc -B/builds/kochetkov.m/buildroot/output/build/host-gcc-final-9.3.0/build/./gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=../../gcc/testsuite/selftests/bin/bash:
/builds/kochetkov.m/buildroot/output/build/host-gcc-final-9.3.0/build/./gcc/xgcc:
No such file or directory
gcc build systems is trying to test compiled executables (xgcc xg++ ....)
If I try to 'make' it again (without clean) - it passes.
If I use 'make clean' then 'make' (without cleaning ccache files) - it passes.
So this is parallel/dependency problem in gcc makefiles. I think make execute 'selftests' and 'xgcc' targets in parallel.
Quoted 10 lines
package/gcc/9.3.0/0001-disable-selftest.patch
Quoted 6 lines
package/gcc/9.3.0/0001-disable-selftest.patch new file +0
-0We need all patches to have a description and a Signed-off-by line. Also, they should ideally be upstreamable, which is not the case here.
I will try.
Quoted 3 lines
Could you work on an improved version of this patch, with some more extensive description, and hopefully a solution that can be accepted by upstream gcc ?
I have no idea how to fix it in upstream gcc. I guess in buildroot is enough just to disable selftests for successful build.
Quoted 5 lines
Best regards,
Thomas
PATCH 1/1 package/gcc9: Fix parallel build problem (xgcc not found)
Hello,
Quoted 7 lines · On Fri, 8 May 2020 15:40:25 +0300 Maxim Kochetkov <[email protected]> wrote:
Quoted 2 lines
Do you have more details about this failure? Does it happen in our autobuilders? In which context?
Similar issue described here:
https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108I don't know about your autobuilder.
Our autobuilders are most likely not testing so much the gcc 9.x build, since Buildroot still defaults to gcc 8.x.
Quoted 12 lines
In my config I use CCACHE for build (try 3.6, 3.7.9 with the same result). May be it affect some timings/delay in build sequence.
It fails for gcc-final (9.2 and 9.3):
/builds/kochetkov.m/buildroot/output/build/host-gcc-final-9.3.0/build/./gcc/xgcc(quoted diff) +0
-3-B/builds/kochetkov.m/buildroot/output/build/host-gcc-final-9.3.0/build/./gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=../../gcc/testsuite/selftests
/bin/bash:
/builds/kochetkov.m/buildroot/output/build/host-gcc-final-9.3.0/build/./gcc/xgcc:
No such file or directory
Quoted 1 line
gcc build systems is trying to test compiled executables (xgcc xg++ ....)
Is this only with gcc 9.x ? It doesn't appear with 8.x ? Why ?
In Buildroot, we generally try to rely understand issues and fix them upstream, rather than just papering over the problem with the first workaround available.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com