* 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
@ 2025-03-14 1:18 Philip Müller
2025-03-14 5:39 ` Greg Kroah-Hartman
0 siblings, 1 reply; 16+ messages in thread
From: Philip Müller @ 2025-03-14 1:18 UTC (permalink / raw)
To: stable@vger.kernel.org; +Cc: Greg Kroah-Hartman
[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]
For some odd reason 5.10 kernel series doesn't compile with a newer
toolchain since 2025-02-09:
2025-02-09T17:32:07.7991299Z GEN .version
2025-02-09T17:32:07.8270062Z CHK include/generated/compile.h
2025-02-09T17:32:07.8540777Z LD vmlinux.o
2025-02-09T17:32:11.7210899Z MODPOST vmlinux.symvers
2025-02-09T17:32:12.0869599Z MODINFO modules.builtin.modinfo
2025-02-09T17:32:12.1403022Z GEN modules.builtin
2025-02-09T17:32:12.1475659Z LD .tmp_vmlinux.btf
2025-02-09T17:32:19.6117204Z BTF .btf.vmlinux.bin.o
2025-02-09T17:32:31.2916650Z LD .tmp_vmlinux.kallsyms1
2025-02-09T17:32:34.8731104Z KSYMS .tmp_vmlinux.kallsyms1.S
2025-02-09T17:32:35.4910608Z AS .tmp_vmlinux.kallsyms1.o
2025-02-09T17:32:35.9662538Z LD .tmp_vmlinux.kallsyms2
2025-02-09T17:32:39.2595984Z KSYMS .tmp_vmlinux.kallsyms2.S
2025-02-09T17:32:39.8802028Z AS .tmp_vmlinux.kallsyms2.o
2025-02-09T17:32:40.3659440Z LD vmlinux
2025-02-09T17:32:48.0031558Z BTFIDS vmlinux
2025-02-09T17:32:48.0143553Z FAILED unresolved symbol filp_close
2025-02-09T17:32:48.5019928Z make: *** [Makefile:1207: vmlinux] Error 255
2025-02-09T17:32:48.5061241Z ==> ERROR: A failure occurred in build().
5.10.234 built fine couple of days ago with the older one. There were
slight changes made. 5.4 and 5.15 still compile.
Wonder what might be missing here ...
--
Best, Philip
[-- Attachment #2: toolchain.diff --]
[-- Type: text/x-patch, Size: 1989 bytes --]
--- old-t.txt 2025-03-14 08:15:56.205018752 +0700
+++ new-t.txt 2025-03-14 08:16:10.414018926 +0700
@@ -1,4 +1,4 @@
-Old toolchain:
+Newer toolchain:
Packages (138) acl-2.3.2-1
attr-2.5.2-1
@@ -6,16 +6,16 @@ audit-4.0.3-1
autoconf-2.72-1
automake-1.17-1
bash-5.2.037-1
-binutils-2.43_1+r186+g61f8adadd6db-1
+binutils-2.44-1
bison-3.8.2-8
brotli-1.1.0-3
bzip2-1.0.8-6
ca-certificates-20240618-1
-ca-certificates-mozilla-3.107-1
+ca-certificates-mozilla-3.108-1
ca-certificates-utils-20240618-1
coreutils-9.6-2
cryptsetup-2.7.5-2
-curl-8.11.1-3
+curl-8.12.0-3
db5.3-5.3.28-5
dbus-1.16.0-1
dbus-broker-36-4
@@ -33,12 +33,12 @@ findutils-4.10.0-2
flex-2.6.4-5
gawk-5.3.1-1
gc-8.2.8-2
-gcc-14.2.1+r730+gc061ad5a36ba-1
-gcc-libs-14.2.1+r730+gc061ad5a36ba-1
+gcc-14.2.1+r753+g1cd744a6828f-1
+gcc-libs-14.2.1+r753+g1cd744a6828f-1
gdbm-1.24-1
gettext-0.23.1-2
glib2-2.82.4-2
-glibc-2.41+r2+g0a7c7a3e283a-1
+glibc-2.41+r6+gcf88351b685d-1
gmp-6.3.0-2
gnulib-l10n-20241231-1
gnupg-2.4.7-1
@@ -48,7 +48,7 @@ grep-3.11-1
groff-1.23.0-7
guile-3.0.10-1
gzip-1.13-4
-hwdata-0.391-1
+hwdata-0.392-1
iana-etc-20241206-1
icu-75.1-2
jansson-2.14-4
@@ -61,7 +61,7 @@ libarchive-3.7.7-1
libassuan-3.0.0-1
libcap-2.71-1
libcap-ng-0.8.5-3
-libelf-0.192-3
+libelf-0.192-4
libevent-2.1.12-4
libffi-3.4.6-1
libgcrypt-1.11.0-2
@@ -80,10 +80,10 @@ libsasl-2.1.28-5
libseccomp-2.5.5-4
libsecret-0.21.6-1
libssh2-1.11.1-1
-libsysprof-capture-47.2-2
-libtasn1-4.19.0-2
+libsysprof-capture-47.2-3
+libtasn1-4.20.0-1
libtirpc-1.3.6-1
-libtool-2.5.4+r1+gbaa1fe41-2
+libtool-2.5.4+r1+gbaa1fe41-3
libunistring-1.3-1
libusb-1.0.27-1
libverto-0.3.2-5
@@ -95,7 +95,7 @@ lz4-1:1.10.0-2
m4-1.4.19-3
make-4.4.1-2
mpdecimal-4.0.0-2
-mpfr-4.2.1-5
+mpfr-4.2.1-6
ncurses-6.5-3
nettle-3.10.1-1
npth-1.8-1
@@ -120,7 +120,7 @@ python-urllib3-2.3.0-1
readline-8.2.013-1
sed-4.9-3
shadow-4.16.0-1
-sqlite-3.48.0-2
+sqlite-3.49.0-1
sudo-1.9.16.p2-2
systemd-257.2-2
systemd-libs-257.2-2
[-- Attachment #3: build-logs.zip --]
[-- Type: application/zip, Size: 1356795 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-03-14 1:18 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close Philip Müller
@ 2025-03-14 5:39 ` Greg Kroah-Hartman
2025-03-14 9:19 ` Philip Müller
0 siblings, 1 reply; 16+ messages in thread
From: Greg Kroah-Hartman @ 2025-03-14 5:39 UTC (permalink / raw)
To: Philip Müller; +Cc: stable@vger.kernel.org
On Fri, Mar 14, 2025 at 08:18:27AM +0700, Philip Müller wrote:
> For some odd reason 5.10 kernel series doesn't compile with a newer
> toolchain since 2025-02-09:
>
> 2025-02-09T17:32:07.7991299Z GEN .version
> 2025-02-09T17:32:07.8270062Z CHK include/generated/compile.h
> 2025-02-09T17:32:07.8540777Z LD vmlinux.o
> 2025-02-09T17:32:11.7210899Z MODPOST vmlinux.symvers
> 2025-02-09T17:32:12.0869599Z MODINFO modules.builtin.modinfo
> 2025-02-09T17:32:12.1403022Z GEN modules.builtin
> 2025-02-09T17:32:12.1475659Z LD .tmp_vmlinux.btf
> 2025-02-09T17:32:19.6117204Z BTF .btf.vmlinux.bin.o
> 2025-02-09T17:32:31.2916650Z LD .tmp_vmlinux.kallsyms1
> 2025-02-09T17:32:34.8731104Z KSYMS .tmp_vmlinux.kallsyms1.S
> 2025-02-09T17:32:35.4910608Z AS .tmp_vmlinux.kallsyms1.o
> 2025-02-09T17:32:35.9662538Z LD .tmp_vmlinux.kallsyms2
> 2025-02-09T17:32:39.2595984Z KSYMS .tmp_vmlinux.kallsyms2.S
> 2025-02-09T17:32:39.8802028Z AS .tmp_vmlinux.kallsyms2.o
> 2025-02-09T17:32:40.3659440Z LD vmlinux
> 2025-02-09T17:32:48.0031558Z BTFIDS vmlinux
> 2025-02-09T17:32:48.0143553Z FAILED unresolved symbol filp_close
> 2025-02-09T17:32:48.5019928Z make: *** [Makefile:1207: vmlinux] Error 255
> 2025-02-09T17:32:48.5061241Z ==> ERROR: A failure occurred in build().
>
> 5.10.234 built fine couple of days ago with the older one. There were slight
> changes made. 5.4 and 5.15 still compile.
>
> Wonder what might be missing here ...
Can you bisect down to the offending commit?
And I think I saw kernelci hit this as well, but I don't have an answer
for it...
greg k-h
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-03-14 5:39 ` Greg Kroah-Hartman
@ 2025-03-14 9:19 ` Philip Müller
2025-03-20 11:28 ` Laura Nao
0 siblings, 1 reply; 16+ messages in thread
From: Philip Müller @ 2025-03-14 9:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: stable@vger.kernel.org
On 14/3/25 12:39, Greg Kroah-Hartman wrote:
> Can you bisect down to the offending commit?
>
> And I think I saw kernelci hit this as well, but I don't have an answer
> for it...
The same kernel compiles fine with the older toolchain. No changes were
made to config nor patch-set when we tried to recompile the 5.10.234
kernel with the newer toolchain. 5.10.235 fails similar to 5.10.234 on
the same toolchain.
So maybe a commit is missing, which is present in either 5.4 or 5.15 series.
--
Best, Philip
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-03-14 9:19 ` Philip Müller
@ 2025-03-20 11:28 ` Laura Nao
2025-03-20 12:55 ` Greg KH
2025-03-28 11:06 ` Philip Müller
0 siblings, 2 replies; 16+ messages in thread
From: Laura Nao @ 2025-03-20 11:28 UTC (permalink / raw)
To: philm; +Cc: gregkh, stable
Hello,
On Fri, 14 Mar 2025 16:19:13 +0700, Philip Müller wrote:
> On 14/3/25 12:39, Greg Kroah-Hartman wrote:
>> Can you bisect down to the offending commit?
>>
>> And I think I saw kernelci hit this as well, but I don't have an answer
>> for it...
>
> The same kernel compiles fine with the older toolchain. No changes were
> made to config nor patch-set when we tried to recompile the 5.10.234
> kernel with the newer toolchain. 5.10.235 fails similar to 5.10.234 on
> the same toolchain.
>
> So maybe a commit is missing, which is present in either 5.4 or 5.15 series.
KernelCI is now reporting a pass on the stable-rc build (5.10.236-rc1),
though I was not able to spot exactly what fixed this.
Best,
Laura
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-03-20 11:28 ` Laura Nao
@ 2025-03-20 12:55 ` Greg KH
2025-03-28 11:06 ` Philip Müller
1 sibling, 0 replies; 16+ messages in thread
From: Greg KH @ 2025-03-20 12:55 UTC (permalink / raw)
To: Laura Nao; +Cc: philm, stable
On Thu, Mar 20, 2025 at 12:28:06PM +0100, Laura Nao wrote:
> Hello,
>
> On Fri, 14 Mar 2025 16:19:13 +0700, Philip Müller wrote:
> > On 14/3/25 12:39, Greg Kroah-Hartman wrote:
> >> Can you bisect down to the offending commit?
> >>
> >> And I think I saw kernelci hit this as well, but I don't have an answer
> >> for it...
> >
> > The same kernel compiles fine with the older toolchain. No changes were
> > made to config nor patch-set when we tried to recompile the 5.10.234
> > kernel with the newer toolchain. 5.10.235 fails similar to 5.10.234 on
> > the same toolchain.
> >
> > So maybe a commit is missing, which is present in either 5.4 or 5.15 series.
>
> KernelCI is now reporting a pass on the stable-rc build (5.10.236-rc1),
> though I was not able to spot exactly what fixed this.
That's good to know, thanks!
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-03-20 11:28 ` Laura Nao
2025-03-20 12:55 ` Greg KH
@ 2025-03-28 11:06 ` Philip Müller
2025-04-01 9:17 ` Greg KH
1 sibling, 1 reply; 16+ messages in thread
From: Philip Müller @ 2025-03-28 11:06 UTC (permalink / raw)
To: Laura Nao; +Cc: gregkh, stable, Uday M Bhat
Yes, I can confirm that with the current stable-queue patches on top of
5.10.235 it compiles. I only had to not apply the following patch
ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload
enabled in PTL platform
due to this compile error it created:
2025-03-28T08:55:34.9654713Z CC net/unix/sysctl_net_unix.o
2025-03-28T08:55:35.0056914Z sound/soc/intel/boards/sof_sdw.c:243:41:
error: ‘SOC_SDW_PCH_DMIC’ undeclared here (not in a function); did you
mean ‘SOF_SDW_PCH_DMIC’?
2025-03-28T08:55:35.0058317Z 243 | .driver_data =
(void *)(SOC_SDW_PCH_DMIC |
2025-03-28T08:55:35.0059209Z |
^~~~~~~~~~~~~~~~
2025-03-28T08:55:35.0060110Z |
SOF_SDW_PCH_DMIC
2025-03-28T08:55:35.0578564Z sound/soc/intel/boards/sof_sdw.c:244:41:
error: implicit declaration of function ‘SOF_BT_OFFLOAD_SSP’
[-Werror=implicit-function-declaration]
2025-03-28T08:55:35.0580183Z 244 |
SOF_BT_OFFLOAD_SSP(2) |
2025-03-28T08:55:35.0581143Z |
^~~~~~~~~~~~~~~~~~
2025-03-28T08:55:35.1499457Z sound/soc/intel/boards/sof_sdw.c:245:41:
error: ‘SOF_SSP_BT_OFFLOAD_PRESENT’ undeclared here (not in a function)
2025-03-28T08:55:35.1500818Z 245 |
SOF_SSP_BT_OFFLOAD_PRESENT),
2025-03-28T08:55:35.1501765Z |
^~~~~~~~~~~~~~~~~~~~~~~~~~
2025-03-28T08:55:35.2672363Z cc1: some warnings being treated as errors
2025-03-28T08:55:35.2740103Z make[4]: *** [scripts/Makefile.build:286:
sound/soc/intel/boards/sof_sdw.o] Error 1
2025-03-28T08:55:35.2767794Z make[3]: *** [scripts/Makefile.build:503:
sound/soc/intel/boards] Error 2
2025-03-28T08:55:35.2773462Z make[2]: *** [scripts/Makefile.build:503:
sound/soc/intel] Error 2
2025-03-28T08:55:35.2801723Z make[1]: *** [scripts/Makefile.build:503:
sound/soc] Error 2
2025-03-28T08:55:35.2802890Z make: *** [Makefile:1837: sound] Error 2
On 3/20/25 07:28, Laura Nao wrote:
> Hello,
>
> On Fri, 14 Mar 2025 16:19:13 +0700, Philip Müller wrote:
>> On 14/3/25 12:39, Greg Kroah-Hartman wrote:
>>> Can you bisect down to the offending commit?
>>>
>>> And I think I saw kernelci hit this as well, but I don't have an answer
>>> for it...
>>
>> The same kernel compiles fine with the older toolchain. No changes were
>> made to config nor patch-set when we tried to recompile the 5.10.234
>> kernel with the newer toolchain. 5.10.235 fails similar to 5.10.234 on
>> the same toolchain.
>>
>> So maybe a commit is missing, which is present in either 5.4 or 5.15 series.
>
> KernelCI is now reporting a pass on the stable-rc build (5.10.236-rc1),
> though I was not able to spot exactly what fixed this.
>
> Best,
> Laura
--
Best, Philip
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-03-28 11:06 ` Philip Müller
@ 2025-04-01 9:17 ` Greg KH
2025-06-05 7:44 ` Philip Müller
0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2025-04-01 9:17 UTC (permalink / raw)
To: Philip Müller; +Cc: Laura Nao, stable, Uday M Bhat
On Fri, Mar 28, 2025 at 07:06:10AM -0400, Philip Müller wrote:
> Yes, I can confirm that with the current stable-queue patches on top of
> 5.10.235 it compiles. I only had to not apply the following patch
>
> ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload enabled
> in PTL platform
I've dropped this commit from the queue now, thanks.
greg k-h
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-04-01 9:17 ` Greg KH
@ 2025-06-05 7:44 ` Philip Müller
2025-06-05 8:46 ` Greg KH
0 siblings, 1 reply; 16+ messages in thread
From: Philip Müller @ 2025-06-05 7:44 UTC (permalink / raw)
To: Greg KH; +Cc: Laura Nao, stable, Uday M Bhat
On 4/1/25 11:17, Greg KH wrote:
> On Fri, Mar 28, 2025 at 07:06:10AM -0400, Philip Müller wrote:
>> Yes, I can confirm that with the current stable-queue patches on top of
>> 5.10.235 it compiles. I only had to not apply the following patch
>>
>> ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload enabled
>> in PTL platform
>
> I've dropped this commit from the queue now, thanks.
>
> greg k-h
Somehow the issue came back with 5.10.238 ...
--
Best, Philip
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-06-05 7:44 ` Philip Müller
@ 2025-06-05 8:46 ` Greg KH
2025-06-08 6:27 ` Philip Müller
2025-06-24 7:05 ` Philip Müller
0 siblings, 2 replies; 16+ messages in thread
From: Greg KH @ 2025-06-05 8:46 UTC (permalink / raw)
To: Philip Müller; +Cc: Laura Nao, stable, Uday M Bhat
On Thu, Jun 05, 2025 at 09:44:49AM +0200, Philip Müller wrote:
> On 4/1/25 11:17, Greg KH wrote:
> > On Fri, Mar 28, 2025 at 07:06:10AM -0400, Philip Müller wrote:
> > > Yes, I can confirm that with the current stable-queue patches on top of
> > > 5.10.235 it compiles. I only had to not apply the following patch
> > >
> > > ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload enabled
> > > in PTL platform
> >
> > I've dropped this commit from the queue now, thanks.
> >
> > greg k-h
>
> Somehow the issue came back with 5.10.238 ...
I have no context here, sorry...
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-06-05 8:46 ` Greg KH
@ 2025-06-08 6:27 ` Philip Müller
2025-06-17 14:05 ` Greg KH
2025-06-24 7:05 ` Philip Müller
1 sibling, 1 reply; 16+ messages in thread
From: Philip Müller @ 2025-06-08 6:27 UTC (permalink / raw)
To: Greg KH; +Cc: Laura Nao, stable, Uday M Bhat
[-- Attachment #1: Type: text/plain, Size: 817 bytes --]
On 6/5/25 10:46, Greg KH wrote:
> I have no context here, sorry...
So basically, starting with GCC 15.1 the kernel series doesn't compile
again and errors out with: FAILED unresolved symbol filp_close. I tested
now v5.10.237 as well, which failed similar to v5.10.238.
There are some Debian reports out there:
https://linux.debian.bugs.dist.narkive.com/2JKeaFga/bug-1104662-failed-unresolved-symbol-filp-close-linux-kernel-5-10-237
https://www.mail-archive.com/debian-kernel@lists.debian.org/msg142397.html
And I also found this one:
https://lists-ec2.96boards.org/archives/list/linux-stable-mirror@lists.linaro.org/thread/7XFQI52N3KGUGFLPWCSJZW6DDFZCOXP4/
For GCC 14.1 I had to add the gnu 11 patch, which was discussed already.
Also 5.4 and 5.15 still compile with the newer toolchain ...
--
Best, Philip
[-- Attachment #2: linux-5.10.236-std-gnu11.patch --]
[-- Type: text/x-patch, Size: 1183 bytes --]
Commit b3bee1e7c3f2b1b77182302c7b2131c804175870 x86/boot: Compile boot code with -std=gnu11 too
fixed a build failure when compiling with GCC 15. The same change is required for linux-5.10.236.
Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Modified-by: Philip Mueller <philm@manjaro.org>
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3bee1e7c3f2b1b77182302c7b2131c804175870
diff -rup linux-5.10.236.orig/arch/x86/Makefile linux-5.10.236/arch/x86/Makefile
--- linux-5.10.236.orig/arch/x86/Makefile 2025-04-10 13:37:44.000000000 +0100
+++ linux-5.10.236/arch/x86/Makefile 2025-04-26 19:37:38.294386968 +0100
@@ -31,7 +31,7 @@ endif
CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
-REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
+REALMODE_CFLAGS := -std=gnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-06-08 6:27 ` Philip Müller
@ 2025-06-17 14:05 ` Greg KH
2025-06-19 8:34 ` Philip Müller
0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2025-06-17 14:05 UTC (permalink / raw)
To: Philip Müller; +Cc: Laura Nao, stable, Uday M Bhat
On Sun, Jun 08, 2025 at 08:27:35AM +0200, Philip Müller wrote:
> On 6/5/25 10:46, Greg KH wrote:
> > I have no context here, sorry...
>
> So basically, starting with GCC 15.1 the kernel series doesn't compile again
> and errors out with: FAILED unresolved symbol filp_close. I tested now
> v5.10.237 as well, which failed similar to v5.10.238.
>
> There are some Debian reports out there:
>
> https://linux.debian.bugs.dist.narkive.com/2JKeaFga/bug-1104662-failed-unresolved-symbol-filp-close-linux-kernel-5-10-237
> https://www.mail-archive.com/debian-kernel@lists.debian.org/msg142397.html
>
> And I also found this one:
>
> https://lists-ec2.96boards.org/archives/list/linux-stable-mirror@lists.linaro.org/thread/7XFQI52N3KGUGFLPWCSJZW6DDFZCOXP4/
>
> For GCC 14.1 I had to add the gnu 11 patch, which was discussed already.
> Also 5.4 and 5.15 still compile with the newer toolchain ...
>
> --
> Best, Philip
> Commit b3bee1e7c3f2b1b77182302c7b2131c804175870 x86/boot: Compile boot code with -std=gnu11 too
> fixed a build failure when compiling with GCC 15. The same change is required for linux-5.10.236.
>
> Signed-off-by: Chris Clayton <chris2553@googlemail.com>
> Modified-by: Philip Mueller <philm@manjaro.org>
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3bee1e7c3f2b1b77182302c7b2131c804175870
>
>
> diff -rup linux-5.10.236.orig/arch/x86/Makefile linux-5.10.236/arch/x86/Makefile
> --- linux-5.10.236.orig/arch/x86/Makefile 2025-04-10 13:37:44.000000000 +0100
> +++ linux-5.10.236/arch/x86/Makefile 2025-04-26 19:37:38.294386968 +0100
> @@ -31,7 +31,7 @@ endif
> CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
> M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
>
> -REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
> +REALMODE_CFLAGS := -std=gnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
> -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
> -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
> -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
Can you resend this in a format we can apply it in?
Also for the newer kernels, this was only backported to 6.6.y, so
anything older than that should need this, right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-06-17 14:05 ` Greg KH
@ 2025-06-19 8:34 ` Philip Müller
2025-06-19 8:47 ` Greg KH
0 siblings, 1 reply; 16+ messages in thread
From: Philip Müller @ 2025-06-19 8:34 UTC (permalink / raw)
To: Greg KH; +Cc: Laura Nao, stable, Uday M Bhat
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
On 6/17/25 16:05, Greg KH wrote:
> Also for the newer kernels, this was only backported to 6.6.y, so
> anything older than that should need this, right?
Well, yes. The patches I applied on my end are attached.
--
Best, Philip
[-- Attachment #2: linux-5.4.292-std-gnu11.patch --]
[-- Type: text/x-patch, Size: 2219 bytes --]
Commit b3bee1e7c3f2b1b77182302c7b2131c804175870 x86/boot: Compile boot code with -std=gnu11 too
fixed a build failure when compiling with GCC 15. The same change is required for linux-5.4.292.
Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Modified-by: Philip Mueller <philm@manjaro.org>
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3bee1e7c3f2b1b77182302c7b2131c804175870
diff -rup linux-5.4.292.orig/arch/x86/Makefile linux-5.4.292/arch/x86/Makefile
--- linux-5.4.292.orig/arch/x86/Makefile 2025-04-10 13:37:44.000000000 +0100
+++ linux-5.4.292/arch/x86/Makefile 2025-04-26 19:37:38.294386968 +0100
@@ -31,7 +31,7 @@ endif
CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
-REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
+REALMODE_CFLAGS := -std=gnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
--- linux-5.4.292.orig/drivers/firmware/efi/libstub/Makefile 2025-05-01 09:31:09.755059128 +0200
+++ linux-5.4.292/drivers/firmware/efi/libstub/Makefile 2025-05-01 16:48:22.029249917 +0200
@@ -7,7 +7,7 @@
#
cflags-$(CONFIG_X86_32) := -march=i386
cflags-$(CONFIG_X86_64) := -mcmodel=small
-cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -O2 \
+cflags-$(CONFIG_X86) += -std=gnu11 -m$(BITS) -D__KERNEL__ -O2 \
-fPIC -fno-strict-aliasing -mno-red-zone \
-mno-mmx -mno-sse -fshort-wchar \
-Wno-pointer-sign \
--- linux-5.4.292.orig/arch/x86/boot/compressed/Makefile 2025-05-01 09:31:09.755059128 +0200
+++ linux-5.4.292/arch/x86/boot/compressed/Makefile 2025-05-01 16:48:22.029249917 +0200
@@ -32,6 +32,7 @@ KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFIL
cflags-$(CONFIG_X86_32) := -march=i386
cflags-$(CONFIG_X86_64) := -mcmodel=small
KBUILD_CFLAGS += $(cflags-y)
+KBUILD_CFLAGS += -std=gnu11
KBUILD_CFLAGS += -mno-mmx -mno-sse
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
[-- Attachment #3: linux-5.10.236-std-gnu11.patch --]
[-- Type: text/x-patch, Size: 1183 bytes --]
Commit b3bee1e7c3f2b1b77182302c7b2131c804175870 x86/boot: Compile boot code with -std=gnu11 too
fixed a build failure when compiling with GCC 15. The same change is required for linux-5.10.236.
Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Modified-by: Philip Mueller <philm@manjaro.org>
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3bee1e7c3f2b1b77182302c7b2131c804175870
diff -rup linux-5.10.236.orig/arch/x86/Makefile linux-5.10.236/arch/x86/Makefile
--- linux-5.10.236.orig/arch/x86/Makefile 2025-04-10 13:37:44.000000000 +0100
+++ linux-5.10.236/arch/x86/Makefile 2025-04-26 19:37:38.294386968 +0100
@@ -31,7 +31,7 @@ endif
CODE16GCC_CFLAGS := -m32 -Wa,$(srctree)/arch/x86/boot/code16gcc.h
M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
-REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
+REALMODE_CFLAGS := -std=gnu11 $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
[-- Attachment #4: linux-5.15.180-std-gnu11.patch --]
[-- Type: text/x-patch, Size: 1133 bytes --]
Commit b3bee1e7c3f2b1b77182302c7b2131c804175870 x86/boot: Compile boot code with -std=gnu11 too
fixed a build failure when compiling with GCC 15. The same change is required for linux-5.15.180.
Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3bee1e7c3f2b1b77182302c7b2131c804175870
diff -rup linux-5.15.180.orig/arch/x86/Makefile linux-5.15.180/arch/x86/Makefile
--- linux-5.15.180.orig/arch/x86/Makefile 2025-04-10 13:37:44.000000000 +0100
+++ linux-5.15.180/arch/x86/Makefile 2025-04-26 19:37:38.294386968 +0100
@@ -43,7 +43,7 @@ endif
# How to compile the 16-bit code. Note we always compile for -march=i386;
# that way we can complain to the user if the CPU is insufficient.
-REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
+REALMODE_CFLAGS := -std=gnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-06-19 8:34 ` Philip Müller
@ 2025-06-19 8:47 ` Greg KH
0 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2025-06-19 8:47 UTC (permalink / raw)
To: Philip Müller; +Cc: Laura Nao, stable, Uday M Bhat
On Thu, Jun 19, 2025 at 10:34:52AM +0200, Philip Müller wrote:
> On 6/17/25 16:05, Greg KH wrote:
> > Also for the newer kernels, this was only backported to 6.6.y, so
> > anything older than that should need this, right?
>
> Well, yes. The patches I applied on my end are attached.
>
> --
> Best, Philip
> Commit b3bee1e7c3f2b1b77182302c7b2131c804175870 x86/boot: Compile boot code with -std=gnu11 too
> fixed a build failure when compiling with GCC 15. The same change is required for linux-5.4.292.
Something went wrong with the whitespace here :(
>
> Signed-off-by: Chris Clayton <chris2553@googlemail.com>
> Modified-by: Philip Mueller <philm@manjaro.org>
You lost the original authorship and signed-off-by lines :(
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3bee1e7c3f2b1b77182302c7b2131c804175870
This isn't needed either.
Can you try again?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-06-05 8:46 ` Greg KH
2025-06-08 6:27 ` Philip Müller
@ 2025-06-24 7:05 ` Philip Müller
2025-10-26 13:26 ` Alyssa Ross
1 sibling, 1 reply; 16+ messages in thread
From: Philip Müller @ 2025-06-24 7:05 UTC (permalink / raw)
To: Greg KH; +Cc: Laura Nao, stable, Uday M Bhat
On 6/5/25 10:46, Greg KH wrote:
> I have no context here, sorry...
Seems with 5.10.239-rc1 it compiles again just fine ...
--
Best, Philip
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-06-24 7:05 ` Philip Müller
@ 2025-10-26 13:26 ` Alyssa Ross
2025-12-15 19:00 ` David Nyström
0 siblings, 1 reply; 16+ messages in thread
From: Alyssa Ross @ 2025-10-26 13:26 UTC (permalink / raw)
To: Philip Müller; +Cc: Greg KH, Laura Nao, stable, Uday M Bhat
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
On Tue, Jun 24, 2025 at 09:05:31AM +0200, Philip Müller wrote:
> On 6/5/25 10:46, Greg KH wrote:
> > I have no context here, sorry...
>
> Seems with 5.10.239-rc1 it compiles again just fine ...
We've been seeing this issue[1] since 5.10.244 (specifically commit
b039655d31a1 ("genirq: Provide new interfaces for affinity hints")),
and still in 5.10.245.
Given that this has apparently come up before, and I don't see any
likely cause looking at that diff, I suppose it's probably some build
issue in 5.10 that can be triggered by innocent diffs, and so is liable
to keep fixing and breaking itself until somebody figure out the root
cause…
[1]: https://github.com/NixOS/nixpkgs/pull/448034#issuecomment-3364278085
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close
2025-10-26 13:26 ` Alyssa Ross
@ 2025-12-15 19:00 ` David Nyström
0 siblings, 0 replies; 16+ messages in thread
From: David Nyström @ 2025-12-15 19:00 UTC (permalink / raw)
To: Alyssa Ross; +Cc: Philip Müller, Greg KH, Laura Nao, stable, Uday M Bhat
[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]
On Sun, 26 Oct 2025, Alyssa Ross wrote:
> On Tue, Jun 24, 2025 at 09:05:31AM +0200, Philip Müller wrote:
>> On 6/5/25 10:46, Greg KH wrote:
>>> I have no context here, sorry...
>>
>> Seems with 5.10.239-rc1 it compiles again just fine ...
>
> We've been seeing this issue[1] since 5.10.244 (specifically commit
> b039655d31a1 ("genirq: Provide new interfaces for affinity hints")),
> and still in 5.10.245.
>
> Given that this has apparently come up before, and I don't see any
> likely cause looking at that diff, I suppose it's probably some build
> issue in 5.10 that can be triggered by innocent diffs, and so is liable
> to keep fixing and breaking itself until somebody figure out the root
> cause…
>
> [1]: https://github.com/NixOS/nixpkgs/pull/448034#issuecomment-3364278085
>
I have analyzed the issue, and it seems like never versions of GCC will
agressively inline both in compile and linktime.
I'm not sure if this is fixed properly in master, I would assume its fixed
by adding enough code into BTF exposed functions so that they not
optimized away anymore.
I can "fix" this locally via:
CONFIG_DEBUG_INFO_BTF=n
or
diff --git a/fs/Makefile b/fs/Makefile
index c660ce28f149..6fbaccbae1d9 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -6,6 +6,10 @@
# Rewritten to use lists instead of if-statements.
#
+# Prevent agressive link-time inlining of BTF symbols
+# Prevent GCC 15 IPA from removing filp_close symbol needed for BTF
+CFLAGS_open.o = -fno-inline -fno-ipa-sra
+
or by removing line below.
linux-stable$ git grep filp_close kernel/trace
kernel/trace/bpf_trace.c:BTF_ID(func, filp_close)
Last seems like the simplest option, but would cause regressions for BPF
programs I presume.
GCC 15+ does not seem to adhere to __noinline, at least not for this
issue.
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2025-12-15 19:00 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-14 1:18 5.10 kernel series fails to build on newer toolchain: FAILED unresolved symbol filp_close Philip Müller
2025-03-14 5:39 ` Greg Kroah-Hartman
2025-03-14 9:19 ` Philip Müller
2025-03-20 11:28 ` Laura Nao
2025-03-20 12:55 ` Greg KH
2025-03-28 11:06 ` Philip Müller
2025-04-01 9:17 ` Greg KH
2025-06-05 7:44 ` Philip Müller
2025-06-05 8:46 ` Greg KH
2025-06-08 6:27 ` Philip Müller
2025-06-17 14:05 ` Greg KH
2025-06-19 8:34 ` Philip Müller
2025-06-19 8:47 ` Greg KH
2025-06-24 7:05 ` Philip Müller
2025-10-26 13:26 ` Alyssa Ross
2025-12-15 19:00 ` David Nyström
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox