Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
Dario Binacchi writes: > On Sat, May 11, 2024 at 12:25 PM Richard Henderson > wrote: >> >> On 5/11/24 12:11, Dario Binacchi wrote: >> > Gentle ping. >> >> Gentle reminder that I strongly suspect that your buildroot is corrupt. >> There *should* be a present. > > I don't think so. In fact, the patch has already been merged into Buildroot: > https://patchwork.ozlabs.org/project/buildroot/patch/20240502072327.741463-1-dario.binac...@amarulasolutions.com/ > > As mentioned earlier: > "The fenv support is not enabled in our default uClibc configurations" > https://lists.buildroot.org/pipermail/buildroot/2013-May/072440.html Given this is outside of the general QEMU support matrix (we have Musl but we make no comment about uClibc) and doesn't address the other users of fenv.h (check-tcg binaries built with host compiler) I think this patch probably should just live on in the downstream. -- Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
On 11/05/2024 13.09, Dario Binacchi wrote: On Sat, May 11, 2024 at 12:25 PM Richard Henderson wrote: On 5/11/24 12:11, Dario Binacchi wrote: Gentle ping. Gentle reminder that I strongly suspect that your buildroot is corrupt. There *should* be a present. I don't think so. In fact, the patch has already been merged into Buildroot: https://patchwork.ozlabs.org/project/buildroot/patch/20240502072327.741463-1-dario.binac...@amarulasolutions.com/ As mentioned earlier: "The fenv support is not enabled in our default uClibc configurations" https://lists.buildroot.org/pipermail/buildroot/2013-May/072440.html So the missing information from that page is: It's apparently possible to build uClibc without fenv support, it's only optional there! So IMHO this patch is fine and should be included. Thomas
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
On Sat, May 11, 2024 at 12:25 PM Richard Henderson wrote: > > On 5/11/24 12:11, Dario Binacchi wrote: > > Gentle ping. > > Gentle reminder that I strongly suspect that your buildroot is corrupt. > There *should* be a present. I don't think so. In fact, the patch has already been merged into Buildroot: https://patchwork.ozlabs.org/project/buildroot/patch/20240502072327.741463-1-dario.binac...@amarulasolutions.com/ As mentioned earlier: "The fenv support is not enabled in our default uClibc configurations" https://lists.buildroot.org/pipermail/buildroot/2013-May/072440.html Thanks and regards, Dario > > > r~ > > > > > Thanks, > > Dario > > > > On Wed, May 1, 2024 at 4:17 PM Dario Binacchi > > wrote: > >> > >> Hello Richard, > >> > >> On Wed, May 1, 2024 at 3:31 PM Richard Henderson > >> wrote: > >>> > >>> On 5/1/24 05:18, Dario Binacchi wrote: > Hello Richard, > > On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson > wrote: > > > > On 4/30/24 09:47, Dario Binacchi wrote: > >> The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not > >> always provided by the libc (uClibc). The patch disables its > >> compilation > >> in case the header is not available. > > > > Since uclibc has had fenv.h since 2008, are you sure this isn't simply > > a case of a corrupt > > installation? > > > > > > > r~ > > It's not an issue of corrupted installation but rather of compilation: > >>> > >>> Installation of your cross-compiler or buildroot, I mean. > >>> > > ../tests/fp/fp-bench.c:15:10: fatal error: fenv.h: No such file or > directory > 15 | #include > | ^~~~ > compilation terminated. > >>> > >>> Yes, yes. However, is present in uclibc-ng, and has been since > >>> 2008. > >>> So *why* is fenv.h not present? > >> > >> I found the fenv.h files here: > >> out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/tr1/fenv.h > >> out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/fenv.h > >> > >> But the compiler expects them in: > >> out/emulator/host/i686-buildroot-linux-uclibc/sysroot/usr/include/ > >> > >> So, I think that the fenv support has not been enabled in uClibc > >> configuration of Buildroot. > >> > >> Thanks and regards, > >> Dario > >> > >>> > >>> > >>> r~ > >> > >> > >> > >> -- > >> > >> Dario Binacchi > >> > >> Senior Embedded Linux Developer > >> > >> dario.binac...@amarulasolutions.com > >> > >> __ > >> > >> > >> Amarula Solutions SRL > >> > >> Via Le Canevare 30, 31100 Treviso, Veneto, IT > >> > >> T. +39 042 243 5310 > >> i...@amarulasolutions.com > >> > >> www.amarulasolutions.com > > > > > > > -- Dario Binacchi Senior Embedded Linux Developer dario.binac...@amarulasolutions.com __ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 i...@amarulasolutions.com www.amarulasolutions.com
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
On 5/11/24 12:11, Dario Binacchi wrote: Gentle ping. Gentle reminder that I strongly suspect that your buildroot is corrupt. There *should* be a present. r~ Thanks, Dario On Wed, May 1, 2024 at 4:17 PM Dario Binacchi wrote: Hello Richard, On Wed, May 1, 2024 at 3:31 PM Richard Henderson wrote: On 5/1/24 05:18, Dario Binacchi wrote: Hello Richard, On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson wrote: On 4/30/24 09:47, Dario Binacchi wrote: The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not always provided by the libc (uClibc). The patch disables its compilation in case the header is not available. Since uclibc has had fenv.h since 2008, are you sure this isn't simply a case of a corrupt installation? r~ It's not an issue of corrupted installation but rather of compilation: Installation of your cross-compiler or buildroot, I mean. ../tests/fp/fp-bench.c:15:10: fatal error: fenv.h: No such file or directory 15 | #include | ^~~~ compilation terminated. Yes, yes. However, is present in uclibc-ng, and has been since 2008. So *why* is fenv.h not present? I found the fenv.h files here: out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/tr1/fenv.h out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/fenv.h But the compiler expects them in: out/emulator/host/i686-buildroot-linux-uclibc/sysroot/usr/include/ So, I think that the fenv support has not been enabled in uClibc configuration of Buildroot. Thanks and regards, Dario r~ -- Dario Binacchi Senior Embedded Linux Developer dario.binac...@amarulasolutions.com __ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 i...@amarulasolutions.com www.amarulasolutions.com
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
Gentle ping. Thanks, Dario On Wed, May 1, 2024 at 4:17 PM Dario Binacchi wrote: > > Hello Richard, > > On Wed, May 1, 2024 at 3:31 PM Richard Henderson > wrote: > > > > On 5/1/24 05:18, Dario Binacchi wrote: > > > Hello Richard, > > > > > > On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson > > > wrote: > > >> > > >> On 4/30/24 09:47, Dario Binacchi wrote: > > >>> The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not > > >>> always provided by the libc (uClibc). The patch disables its compilation > > >>> in case the header is not available. > > >> > > >> Since uclibc has had fenv.h since 2008, are you sure this isn't simply a > > >> case of a corrupt > > >> installation? > > > > > >> > > >> > > >> r~ > > > > > > It's not an issue of corrupted installation but rather of compilation: > > > > Installation of your cross-compiler or buildroot, I mean. > > > > > > > > ../tests/fp/fp-bench.c:15:10: fatal error: fenv.h: No such file or > > > directory > > > 15 | #include > > >| ^~~~ > > > compilation terminated. > > > > Yes, yes. However, is present in uclibc-ng, and has been since > > 2008. > > So *why* is fenv.h not present? > > I found the fenv.h files here: > out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/tr1/fenv.h > out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/fenv.h > > But the compiler expects them in: > out/emulator/host/i686-buildroot-linux-uclibc/sysroot/usr/include/ > > So, I think that the fenv support has not been enabled in uClibc > configuration of Buildroot. > > Thanks and regards, > Dario > > > > > > > r~ > > > > -- > > Dario Binacchi > > Senior Embedded Linux Developer > > dario.binac...@amarulasolutions.com > > __ > > > Amarula Solutions SRL > > Via Le Canevare 30, 31100 Treviso, Veneto, IT > > T. +39 042 243 5310 > i...@amarulasolutions.com > > www.amarulasolutions.com -- Dario Binacchi Senior Embedded Linux Developer dario.binac...@amarulasolutions.com __ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 i...@amarulasolutions.com www.amarulasolutions.com
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
Hello Richard, On Wed, May 1, 2024 at 3:31 PM Richard Henderson wrote: > > On 5/1/24 05:18, Dario Binacchi wrote: > > Hello Richard, > > > > On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson > > wrote: > >> > >> On 4/30/24 09:47, Dario Binacchi wrote: > >>> The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not > >>> always provided by the libc (uClibc). The patch disables its compilation > >>> in case the header is not available. > >> > >> Since uclibc has had fenv.h since 2008, are you sure this isn't simply a > >> case of a corrupt > >> installation? > > > >> > >> > >> r~ > > > > It's not an issue of corrupted installation but rather of compilation: > > Installation of your cross-compiler or buildroot, I mean. > > > > > ../tests/fp/fp-bench.c:15:10: fatal error: fenv.h: No such file or directory > > 15 | #include > >| ^~~~ > > compilation terminated. > > Yes, yes. However, is present in uclibc-ng, and has been since 2008. > So *why* is fenv.h not present? I found the fenv.h files here: out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/tr1/fenv.h out/emulator/host/opt/ext-toolchain/i686-buildroot-linux-uclibc/include/c++/11.3.0/fenv.h But the compiler expects them in: out/emulator/host/i686-buildroot-linux-uclibc/sysroot/usr/include/ So, I think that the fenv support has not been enabled in uClibc configuration of Buildroot. Thanks and regards, Dario > > > r~ -- Dario Binacchi Senior Embedded Linux Developer dario.binac...@amarulasolutions.com __ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 i...@amarulasolutions.com www.amarulasolutions.com
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
On 5/1/24 05:18, Dario Binacchi wrote: Hello Richard, On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson wrote: On 4/30/24 09:47, Dario Binacchi wrote: The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not always provided by the libc (uClibc). The patch disables its compilation in case the header is not available. Since uclibc has had fenv.h since 2008, are you sure this isn't simply a case of a corrupt installation? r~ It's not an issue of corrupted installation but rather of compilation: Installation of your cross-compiler or buildroot, I mean. ../tests/fp/fp-bench.c:15:10: fatal error: fenv.h: No such file or directory 15 | #include | ^~~~ compilation terminated. Yes, yes. However, is present in uclibc-ng, and has been since 2008. So *why* is fenv.h not present? r~
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
Hello Richard, On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson wrote: > > On 4/30/24 09:47, Dario Binacchi wrote: > > The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not > > always provided by the libc (uClibc). The patch disables its compilation > > in case the header is not available. > > Since uclibc has had fenv.h since 2008, are you sure this isn't simply a case > of a corrupt > installation? > > > r~ It's not an issue of corrupted installation but rather of compilation: ../tests/fp/fp-bench.c:15:10: fatal error: fenv.h: No such file or directory 15 | #include | ^~~~ compilation terminated. In Buildroot, where the error above is occurring, there already exists a patch to disable the compilation of the fp-bench test. This patch was created and applied when bumping QEMU to version 6.1.0, but it is no longer applicable to version 8.1.1. In fixing the issue, I followed the approach suggested by Paolo Bonzini, hoping that this patch can be accepted and merged into QEMU. This is the patch I just sent to Buildroot: https://patchwork.ozlabs.org/project/buildroot/patch/20240501120050.670109-1-dario.binac...@amarulasolutions.com/ Thanks and regards, Dario -- Dario Binacchi Senior Embedded Linux Developer dario.binac...@amarulasolutions.com __ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 i...@amarulasolutions.com www.amarulasolutions.com
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
On 4/30/24 09:47, Dario Binacchi wrote: The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not always provided by the libc (uClibc). The patch disables its compilation in case the header is not available. Since uclibc has had fenv.h since 2008, are you sure this isn't simply a case of a corrupt installation? r~
Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
Dario Binacchi writes: > The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not > always provided by the libc (uClibc). The patch disables its compilation > in case the header is not available. > > The patch is based on a suggestion from Paolo Bonzini, which you can > find at the following link. > > Link: https://lists.nongnu.org/archive/html/qemu-devel/2021-03/msg00492.html > Suggested-by: Paolo Bonzini > Signed-off-by: Dario Binacchi Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro
[PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing
The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not always provided by the libc (uClibc). The patch disables its compilation in case the header is not available. The patch is based on a suggestion from Paolo Bonzini, which you can find at the following link. Link: https://lists.nongnu.org/archive/html/qemu-devel/2021-03/msg00492.html Suggested-by: Paolo Bonzini Signed-off-by: Dario Binacchi --- tests/fp/meson.build | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/fp/meson.build b/tests/fp/meson.build index 114b4b483ea7..0e1237be54ed 100644 --- a/tests/fp/meson.build +++ b/tests/fp/meson.build @@ -126,12 +126,14 @@ test('fp-test-mulAdd', fptest, ['f16_mulAdd', 'f32_mulAdd', 'f64_mulAdd', 'f128_mulAdd'], suite: ['softfloat-slow', 'softfloat-ops-slow', 'slow'], timeout: 180) -executable( - 'fp-bench', - ['fp-bench.c', '../../fpu/softfloat.c'], - dependencies: [qemuutil, libtestfloat, libsoftfloat], - c_args: fpcflags, -) +if cc.has_header('fenv.h') + executable( +'fp-bench', +['fp-bench.c', '../../fpu/softfloat.c'], +dependencies: [qemuutil, libtestfloat, libsoftfloat], +c_args: fpcflags, + ) +endif fptestlog2 = executable( 'fp-test-log2', -- 2.43.0