Skip to contentSkip to conversation

New: Building host-localedef fails on fedora 34/gcc 11

Buildroot Applied bugzilla at busybox.net 1 participant 12 messages May 14, 2021 – May 18, 2021

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=13806

Bug ID: 13806
Summary: Building host-localedef fails on fedora 34/gcc 11
Product: buildroot
Version: 2021.02
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: ian_ormshaw at waters.com
CC: buildroot at uclibc.org
Target Milestone: ---

Created attachment 8946
--> https://bugs.busybox.net/attachment.cgi?id=8946&action=edit
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.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

--- Comment #1 from Dr I J Ormshaw <[email protected]> --- Created attachment 8951
--> https://bugs.busybox.net/attachment.cgi?id=8951&action=edit
temporary fix

I've applied the attached patch to temperately circumvent the problem

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

--- Comment #2 from Peter Seiderer <[email protected]> --- 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 at gmx.net/

[1]
https://github.com/bminor/glibc/commit/19302b27bdacfe87e861ff46fc0fbad60dd6602d

[2]
https://github.com/bminor/glibc/commit/548f467fa14ffe7d955beeb31b30e2aeae4467e0

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |yann.morin.1998 at free.fr
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Yann E. MORIN <[email protected]> --- 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.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

--- Comment #5 from Dr I J Ormshaw <[email protected]> --- 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)

Quoted 1 line
Quoted 1 line
Quoted 1 line

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 -

Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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)

Quoted 1 line
Quoted 1 line
Quoted 1 line

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 -

Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

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

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#8 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

--- Comment #7 from Dr I J Ormshaw <[email protected]> --- 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

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

--- Comment #8 from Peter Seiderer <[email protected]> --- (In reply to Dr I J Ormshaw from comment #7)

Quoted 3 lines

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 at gmx.net/mbox/
    $ cd buildroot-2021.02.2
    $ patch -p 1 < ../v1-package-localedef-fix-host-gcc-11.x-compile.patch
Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#10 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

--- Comment #9 from Dr I J Ormshaw <[email protected]> ---
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.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#11 lore raw

[Buildroot] [Bug 13806] Building host-localedef fails on fedora 34/gcc 11

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13806

--- Comment #10 from Peter Seiderer <[email protected]> --- (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 ;-)

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.