| Summary: | Building host-localedef fails on fedora 34/gcc 11 | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Dr I J Ormshaw <ian_ormshaw> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | buildroot, yann.morin.1998 |
| Priority: | P5 | ||
| Version: | 2021.02.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: |
error from build output
temporary fix Patch applied Latest patch tested |
||
Created attachment 8951 [details]
temporary fix
I've applied the attached patch to temperately circumvent the problem
Seems the problem is fixed upstream with the following two patches: - Fix GCC 11 -Warray-parameter warning for __sigsetjmp (bug 26647) [1] - Avoid -Wstringop-overflow warning in pthread_cleanup_push macros [2] Can you test the following buildroot patch (backporting thr two commits for the localedef package)? https://patchwork.ozlabs.org/project/buildroot/patch/20210514175429.20552-1-ps.report@gmx.net/ [1] https://github.com/bminor/glibc/commit/19302b27bdacfe87e861ff46fc0fbad60dd6602d [2] https://github.com/bminor/glibc/commit/548f467fa14ffe7d955beeb31b30e2aeae4467e0 Hello, Thanks for reporting this issue. We believe it has been fixed thanks to the patch from Peter, applied upstream as commit 4174f79a5718. Regards, Yann E. MORIN. Created attachment 8956 [details]
Patch applied
I've downloaded the patch you suggested (attached) and rebuilt. The patch appears to have been applied: make[1]: Entering directory '/home/ian/projects/hiwire-linux/source/buildroot' glibc-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2.tar.gz: OK (sha256: f4710e9a435a7b83e1d23dd75434f0d36b898eba9b4249c946c32b467d852fd4) >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Extracting gzip -d -c /home/ian/build/download/glibc/glibc-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2.tar.gz | tar --strip-components=1 -C /home/ian/build/hiwire-linux-5c671c59-x86_64/buildroot/build/host-localedef-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 -xf - >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Patching Applying 0001-HACK-only-build-and-install-localedef.patch using patch: patching file Rules Hunk #1 succeeded at 212 (offset 22 lines). patching file locale/Makefile Hunk #1 succeeded at 33 (offset 1 line). Applying 0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch using patch: patching file configure Hunk #1 succeeded at 4566 (offset -35 lines). Hunk #2 succeeded at 4696 (offset -35 lines). Hunk #3 succeeded at 5105 (offset -35 lines). Applying 0004.patch using patch: patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0003-Fix-GCC-11-Warray-parameter-warning-for-__sigsetjmp-.patch patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0004-Avoid-Wstringop-overflow-warning-in-pthread_cleanup_.patch >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Updating config.sub and config.guess for file in config.guess config.sub; do for i in $(find /home/ian/build/hiwire-linux-5c671c59-x86_64/buildroot/build/host-localedef-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 -name $file); do cp support/gnuconfig/$file $i; done; done >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Patching libtool >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Configuring mkdir -p /home/ian/build/hiwire-linux-5c671c59-x86_64/buildroot/build/host-localedef-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/build But I am still seeing an error: make[1]: Entering directory '/home/ian/projects/hiwire-linux/source/buildroot' glibc-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2.tar.gz: OK (sha256: f4710e9a435a7b83e1d23dd75434f0d36b898eba9b4249c946c32b467d852fd4) >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Extracting gzip -d -c /home/ian/build/download/glibc/glibc-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2.tar.gz | tar --strip-components=1 -C /home/ian/build/hiwire-linux-5c671c59-x86_64/buildroot/build/host-localedef-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 -xf - >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Patching Applying 0001-HACK-only-build-and-install-localedef.patch using patch: patching file Rules Hunk #1 succeeded at 212 (offset 22 lines). patching file locale/Makefile Hunk #1 succeeded at 33 (offset 1 line). Applying 0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch using patch: patching file configure Hunk #1 succeeded at 4566 (offset -35 lines). Hunk #2 succeeded at 4696 (offset -35 lines). Hunk #3 succeeded at 5105 (offset -35 lines). Applying 0004.patch using patch: patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0003-Fix-GCC-11-Warray-parameter-warning-for-__sigsetjmp-.patch patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0004-Avoid-Wstringop-overflow-warning-in-pthread_cleanup_.patch >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Updating config.sub and config.guess for file in config.guess config.sub; do for i in $(find /home/ian/build/hiwire-linux-5c671c59-x86_64/buildroot/build/host-localedef-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 -name $file); do cp support/gnuconfig/$file $i; done; done >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Patching libtool >>> host-localedef 2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2 Configuring mkdir -p /home/ian/build/hiwire-linux-5c671c59-x86_64/buildroot/build/host-localedef-2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/build Created attachment 8961 [details]
Latest patch tested
Looks like I got confused by the external links. I think I now have the intended pathch, but still the same result:
Applying 0003-v1-package-localedef-fix-host-gcc-11.x-compile.patch using patch:
patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0003-Fix-GCC-11-Warray-parameter-warning-for-__sigsetjmp-.patch
patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0004-Avoid-Wstringop-overflow-warning-in-pthread_cleanup_.patch
...
In file included from ../include/pthread.h:1,
from ../sysdeps/nptl/thread_db.h:25,
from ../nptl/descr.h:32,
from ../sysdeps/x86_64/nptl/tls.h:130,
from ../sysdeps/generic/libc-tsd.h:44,
from ./localeinfo.h:224,
from programs/ld-ctype.c:37:
../sysdeps/nptl/pthread.h:734:47: error: argument 1 of type ‘struct __jmp_buf_tag *’ declared as a pointer [-Werror=array-parameter=]
734 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from ../include/setjmp.h:2,
from ../nptl/descr.h:24,
from ../sysdeps/x86_64/nptl/tls.h:130,
from ../sysdeps/generic/libc-tsd.h:44,
from ./localeinfo.h:224,
from programs/ld-ctype.c:37:
../setjmp/setjmp.h:54:46: note: previously declared as an array ‘struct __jmp_buf_tag[1]’
54 | extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
cc1: all warnings being treated as errors
(In reply to Dr I J Ormshaw from comment #7) > Applying 0003-v1-package-localedef-fix-host-gcc-11.x-compile.patch using patch: > patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0003-Fix-GCC-11-Warray-parameter-warning-for-__sigsetjmp-.patch > patching file package/localedef/2.32-37-g760e1d287825fa91d4d5a0cc921340c740d803e2/0004-Avoid-Wstringop-overflow-warning-in-pthread_cleanup_.patch This looks wrong...., your patch is patching the buildroot sources and not the host-localedef ones...., the output should look like the following: [...] Applying 0003-Fix-GCC-11-Warray-parameter-warning-for-__sigsetjmp-.patch using patch: patching file include/bits/types/struct___jmp_buf_tag.h patching file setjmp/Makefile patching file setjmp/bits/types/struct___jmp_buf_tag.h patching file setjmp/setjmp.h patching file sysdeps/nptl/pthread.h Applying 0004-Avoid-Wstringop-overflow-warning-in-pthread_cleanup_.patch using patch: patching file misc/sys/cdefs.h patching file sysdeps/nptl/pthread.h [...] Howto apply a patch from patchwork: $ wget https://buildroot.org/downloads/buildroot-2021.02.2.tar.gz $ tar -xvzf buildroot-2021.02.2.tar.gz $ curl -O -J https://patchwork.ozlabs.org/project/buildroot/patch/20210514175429.20552-1-ps.report@gmx.net/mbox/ $ cd buildroot-2021.02.2 $ patch -p 1 < ../v1-package-localedef-fix-host-gcc-11.x-compile.patch To test the patch in the environment in which it was discovered, I applied the patch to my existing source tree, which contains a sub-module that is the clone of the buildroot repo checked out to the 2021.02.2 tag. With the patch applied the build completed successfully. Thanks for you patience and help. (In reply to Dr I J Ormshaw from comment #9) Thanks for reporting, testing and specially for conforming that the patch solves the reported problem ;-) |
Created attachment 8946 [details] error from build output When building under fedora 34 x86_64 with gcc (GCC) 11.1.1 20210428 (Red Hat 11.1.1-1) compilation fails with the attached error. I haven't seen this before so I assume it is a gcc 11 specific issue.