2023-05-08 15:18:03

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] wireless: ath: work around false-positive stringop-overread warning

On Mon, May 8, 2023, at 16:57, Kalle Valo wrote:
> "Arnd Bergmann" <[email protected]> writes:
>>
>> I uploaded gcc-13.1.0 binaries last week, but still need to
>> update the html page, so it's not yet linked. You can navigate
>> the directories from the gcc-12 builds.
>
> Thanks! I was able to find the build[1] but having an issue:
>
> $ ./x86_64-linux-gcc -v
> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
> `GLIBC_2.35' not found (required by ./x86_64-linux-gcc)
> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
> `GLIBC_2.32' not found (required by ./x86_64-linux-gcc)
> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
> `GLIBC_2.33' not found (required by ./x86_64-linux-gcc)
> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
> `GLIBC_2.36' not found (required by ./x86_64-linux-gcc)
> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
> `GLIBC_2.34' not found (required by ./x86_64-linux-gcc)
>
> With older GCC versions from your page I don't have this problem. I'm
> using Debian 10 still so so is my libc too old?

(dropping most Cc)

Indeed, thanks for the report, I forgot about that issue. I used
to build the cross toolchains in an old Ubuntu 16.04 chroot to avoid
that issue, and I linked all other dependencies statically.

The gcc-13.1.0 builds are the first ones I did on an arm64 machine,
so I had to create a new build environment and started out with
just my normal Debian testing rootfs, which caused me enough issues
to figure out first.

I had previously experimented with linking statically against
musl to avoid all other dependencies, but that ended up with
slower binaries because the default memory allocator in musl
doesn't work that well for gcc, and I never quite figured out
how to pick a different memory allocator, or which one to use.

I should probably just pick an older Debian release that is new
enough to contain cross compilers for arm64 and x86 and then
set up the same kind of chroot I had in before.

Arnd


2023-05-08 19:39:15

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wireless: ath: work around false-positive stringop-overread warning

"Arnd Bergmann" <[email protected]> writes:

> On Mon, May 8, 2023, at 16:57, Kalle Valo wrote:
>> "Arnd Bergmann" <[email protected]> writes:
>>>
>>> I uploaded gcc-13.1.0 binaries last week, but still need to
>>> update the html page, so it's not yet linked. You can navigate
>>> the directories from the gcc-12 builds.
>>
>> Thanks! I was able to find the build[1] but having an issue:
>>
>> $ ./x86_64-linux-gcc -v
>> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
>> `GLIBC_2.35' not found (required by ./x86_64-linux-gcc)
>> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
>> `GLIBC_2.32' not found (required by ./x86_64-linux-gcc)
>> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
>> `GLIBC_2.33' not found (required by ./x86_64-linux-gcc)
>> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
>> `GLIBC_2.36' not found (required by ./x86_64-linux-gcc)
>> ./x86_64-linux-gcc: /lib/x86_64-linux-gnu/libc.so.6: version
>> `GLIBC_2.34' not found (required by ./x86_64-linux-gcc)
>>
>> With older GCC versions from your page I don't have this problem. I'm
>> using Debian 10 still so so is my libc too old?
>
> (dropping most Cc)
>
> Indeed, thanks for the report, I forgot about that issue. I used
> to build the cross toolchains in an old Ubuntu 16.04 chroot to avoid
> that issue, and I linked all other dependencies statically.
>
> The gcc-13.1.0 builds are the first ones I did on an arm64 machine,
> so I had to create a new build environment and started out with
> just my normal Debian testing rootfs, which caused me enough issues
> to figure out first.
>
> I had previously experimented with linking statically against
> musl to avoid all other dependencies, but that ended up with
> slower binaries because the default memory allocator in musl
> doesn't work that well for gcc, and I never quite figured out
> how to pick a different memory allocator, or which one to use.
>
> I should probably just pick an older Debian release that is new
> enough to contain cross compilers for arm64 and x86 and then
> set up the same kind of chroot I had in before.

Thanks! I really should update to Debian 11 but I have been lazy :) But
I doubt that would have helped either as it looks like it has libc6
v2.31:

https://packages.debian.org/bullseye/libc6

I'm disappointed glibc creates so uncompatible binaries, feels like they
don't create about backwards compatibility :/

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2023-06-03 08:02:49

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] wireless: ath: work around false-positive stringop-overread warning

On Mon, May 8, 2023, at 17:07, Arnd Bergmann wrote:
> On Mon, May 8, 2023, at 16:57, Kalle Valo wrote:
>> With older GCC versions from your page I don't have this problem. I'm
>> using Debian 10 still so so is my libc too old?
>
> (dropping most Cc)
>
> Indeed, thanks for the report, I forgot about that issue. I used
> to build the cross toolchains in an old Ubuntu 16.04 chroot to avoid
> that issue, and I linked all other dependencies statically.
>
> The gcc-13.1.0 builds are the first ones I did on an arm64 machine,
> so I had to create a new build environment and started out with
> just my normal Debian testing rootfs, which caused me enough issues
> to figure out first.
>
> I had previously experimented with linking statically against
> musl to avoid all other dependencies, but that ended up with
> slower binaries because the default memory allocator in musl
> doesn't work that well for gcc, and I never quite figured out
> how to pick a different memory allocator, or which one to use.
>
> I should probably just pick an older Debian release that is new
> enough to contain cross compilers for arm64 and x86 and then
> set up the same kind of chroot I had in before.

It took me a while, but now I have a working build setup
in a Debian Buster schroot with gcc-13 as the main compiler,
and I updated the gcc-13.1 binaries with those, as well as
uploading gcc-11.4 and gcc-12.3 build the same way.

I have only tested the binaries on arm64 Debian testing,
could you see if the new x86 builds work for you?

Arnd

2023-06-05 13:24:51

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wireless: ath: work around false-positive stringop-overread warning

"Arnd Bergmann" <[email protected]> writes:

> On Mon, May 8, 2023, at 17:07, Arnd Bergmann wrote:
>
>> On Mon, May 8, 2023, at 16:57, Kalle Valo wrote:
>>> With older GCC versions from your page I don't have this problem. I'm
>>> using Debian 10 still so so is my libc too old?
>>
>> (dropping most Cc)
>>
>> Indeed, thanks for the report, I forgot about that issue. I used
>> to build the cross toolchains in an old Ubuntu 16.04 chroot to avoid
>> that issue, and I linked all other dependencies statically.
>>
>> The gcc-13.1.0 builds are the first ones I did on an arm64 machine,
>> so I had to create a new build environment and started out with
>> just my normal Debian testing rootfs, which caused me enough issues
>> to figure out first.
>>
>> I had previously experimented with linking statically against
>> musl to avoid all other dependencies, but that ended up with
>> slower binaries because the default memory allocator in musl
>> doesn't work that well for gcc, and I never quite figured out
>> how to pick a different memory allocator, or which one to use.
>>
>> I should probably just pick an older Debian release that is new
>> enough to contain cross compilers for arm64 and x86 and then
>> set up the same kind of chroot I had in before.
>
> It took me a while, but now I have a working build setup
> in a Debian Buster schroot with gcc-13 as the main compiler,
> and I updated the gcc-13.1 binaries with those, as well as
> uploading gcc-11.4 and gcc-12.3 build the same way.
>
> I have only tested the binaries on arm64 Debian testing,
> could you see if the new x86 builds work for you?

I tested GCC 12.3 and 13.1 on x86 Debian 10, they both worked perfectly.
Thank you!

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches