diff mbox series

[1/1] package/liquid-dsp: fix build without neon

Message ID 20240107132346.3161192-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/liquid-dsp: fix build without neon | expand

Commit Message

Fabrice Fontaine Jan. 7, 2024, 1:23 p.m. UTC
Fix the following build failure without neon raised since bump to
version 1.4.0 in commit 2f7f8f381394207bfb029ec395f5ced5695a0a2e and
https://github.com/jgaeddert/liquid-dsp/commit/c821187dd9af2758c8e3c82e95eaf041b8ac81a0:

/home/peko/autobuild/instance-0/output-1/host/bin/arm-none-linux-gnueabi-gcc -std=gnu11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -g0 -D_FORTIFY_SOURCE=2  -ffast-math -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4  -Wall -fPIC -Wno-deprecated -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -Iinclude  -c -o src/audio/src/cvsd.o src/audio/src/cvsd.c
In file included from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/features.h:388:0,
                 from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/stdlib.h:24,
                 from src/libliquid.c:25:
/home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/gnu/stubs.h:10:29: fatal error: gnu/stubs-hard.h: No such file or directory
 # include <gnu/stubs-hard.h>
                             ^

Fixes:
 - http://autobuild.buildroot.org/results/36b3c2220c462e7a20262fd1b9064d9aeb6c9ec4
 - http://autobuild.buildroot.org/results/881826b4b6c141e59a0da2d7d1ad55d3709fdb95

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/liquid-dsp/liquid-dsp.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Yann E. MORIN Jan. 7, 2024, 3:48 p.m. UTC | #1
Fabrice, All,

On 2024-01-07 14:23 +0100, Fabrice Fontaine spake thusly:
> Fix the following build failure without neon raised since bump to
> version 1.4.0 in commit 2f7f8f381394207bfb029ec395f5ced5695a0a2e and
> https://github.com/jgaeddert/liquid-dsp/commit/c821187dd9af2758c8e3c82e95eaf041b8ac81a0:
> 
> /home/peko/autobuild/instance-0/output-1/host/bin/arm-none-linux-gnueabi-gcc -std=gnu11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -g0 -D_FORTIFY_SOURCE=2  -ffast-math -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4  -Wall -fPIC -Wno-deprecated -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -Iinclude  -c -o src/audio/src/cvsd.o src/audio/src/cvsd.c
> In file included from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/features.h:388:0,
>                  from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/stdlib.h:24,
>                  from src/libliquid.c:25:
> /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/gnu/stubs.h:10:29: fatal error: gnu/stubs-hard.h: No such file or directory
>  # include <gnu/stubs-hard.h>
>                              ^
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/36b3c2220c462e7a20262fd1b9064d9aeb6c9ec4
>  - http://autobuild.buildroot.org/results/881826b4b6c141e59a0da2d7d1ad55d3709fdb95
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/liquid-dsp/liquid-dsp.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk
> index e9788eb144..a96d4cab79 100644
> --- a/package/liquid-dsp/liquid-dsp.mk
> +++ b/package/liquid-dsp/liquid-dsp.mk
> @@ -40,6 +40,10 @@ ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
>  LIQUID_DSP_CONF_OPTS += --enable-simdoverride
>  endif
>  
> +ifeq ($(BR2_arm):$(BR2_ARM_FPU_NEON),y:)
> +LIQUID_DSP_CONF_OPTS += --enable-simdoverride

Usually, we add an explicit --disable. Any reason why it was not added
here?

Regards,
Yann E. MORIN.

> +endif
> +
>  LIQUID_DSP_CONF_OPTS += \
>  	CFLAGS="$(LIQUID_DSP_CFLAGS)" \
>  	LDFLAGS="$(LIQUID_DSP_LDFLAGS)"
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Fabrice Fontaine Jan. 7, 2024, 4:11 p.m. UTC | #2
Hello Yann,

Le dim. 7 janv. 2024 à 16:48, Yann E. MORIN <yann.morin.1998@free.fr> a écrit :
>
> Fabrice, All,
>
> On 2024-01-07 14:23 +0100, Fabrice Fontaine spake thusly:
> > Fix the following build failure without neon raised since bump to
> > version 1.4.0 in commit 2f7f8f381394207bfb029ec395f5ced5695a0a2e and
> > https://github.com/jgaeddert/liquid-dsp/commit/c821187dd9af2758c8e3c82e95eaf041b8ac81a0:
> >
> > /home/peko/autobuild/instance-0/output-1/host/bin/arm-none-linux-gnueabi-gcc -std=gnu11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -g0 -D_FORTIFY_SOURCE=2  -ffast-math -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4  -Wall -fPIC -Wno-deprecated -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -Iinclude  -c -o src/audio/src/cvsd.o src/audio/src/cvsd.c
> > In file included from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/features.h:388:0,
> >                  from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/stdlib.h:24,
> >                  from src/libliquid.c:25:
> > /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/gnu/stubs.h:10:29: fatal error: gnu/stubs-hard.h: No such file or directory
> >  # include <gnu/stubs-hard.h>
> >                              ^
> >
> > Fixes:
> >  - http://autobuild.buildroot.org/results/36b3c2220c462e7a20262fd1b9064d9aeb6c9ec4
> >  - http://autobuild.buildroot.org/results/881826b4b6c141e59a0da2d7d1ad55d3709fdb95
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/liquid-dsp/liquid-dsp.mk | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk
> > index e9788eb144..a96d4cab79 100644
> > --- a/package/liquid-dsp/liquid-dsp.mk
> > +++ b/package/liquid-dsp/liquid-dsp.mk
> > @@ -40,6 +40,10 @@ ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
> >  LIQUID_DSP_CONF_OPTS += --enable-simdoverride
> >  endif
> >
> > +ifeq ($(BR2_arm):$(BR2_ARM_FPU_NEON),y:)
> > +LIQUID_DSP_CONF_OPTS += --enable-simdoverride
>
> Usually, we add an explicit --disable. Any reason why it was not added
> here?

Because --disable-simdoverride is not supported, worst,
--disable-simdoverride has the same effect than --enable-simdoverride,
because upstream doesn't check the value provided by the user:
https://github.com/jgaeddert/liquid-dsp/blob/5432e317e3c31f069e8223d185c28078fc41c8cc/configure.ac#L64

>
> Regards,
> Yann E. MORIN.
>
> > +endif
> > +
> >  LIQUID_DSP_CONF_OPTS += \
> >       CFLAGS="$(LIQUID_DSP_CFLAGS)" \
> >       LDFLAGS="$(LIQUID_DSP_LDFLAGS)"
> > --
> > 2.43.0
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

Best Regards,

Fabrice
Yann E. MORIN Jan. 7, 2024, 4:54 p.m. UTC | #3
Fabrice, All,

On 2024-01-07 17:11 +0100, Fabrice Fontaine spake thusly:
> Le dim. 7 janv. 2024 à 16:48, Yann E. MORIN <yann.morin.1998@free.fr> a écrit :
> > On 2024-01-07 14:23 +0100, Fabrice Fontaine spake thusly:
[--SNIP--]
> > > +ifeq ($(BR2_arm):$(BR2_ARM_FPU_NEON),y:)
> > > +LIQUID_DSP_CONF_OPTS += --enable-simdoverride
> > Usually, we add an explicit --disable. Any reason why it was not added
> > here?
> Because --disable-simdoverride is not supported, worst,
> --disable-simdoverride has the same effect than --enable-simdoverride,
> because upstream doesn't check the value provided by the user:
> https://github.com/jgaeddert/liquid-dsp/blob/5432e317e3c31f069e8223d185c28078fc41c8cc/configure.ac#L64

Ah, indeed, thanks. I also saw that the existing code did not add it,
now, so I've refactored the code to make it explicit why we do not pass
--disable-simdoverride, and I extended the commit log with an excerpt
from the configure.ac while at it.

Applied to master, thanks.

Regards,
Yann E. MORIN.
Peter Korsgaard Jan. 13, 2024, 1:14 p.m. UTC | #4
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure without neon raised since bump to
 > version 1.4.0 in commit 2f7f8f381394207bfb029ec395f5ced5695a0a2e and
 > https://github.com/jgaeddert/liquid-dsp/commit/c821187dd9af2758c8e3c82e95eaf041b8ac81a0:

 > /home/peko/autobuild/instance-0/output-1/host/bin/arm-none-linux-gnueabi-gcc -std=gnu11 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -g0 -D_FORTIFY_SOURCE=2  -ffast-math -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4  -Wall -fPIC -Wno-deprecated -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -Iinclude  -c -o src/audio/src/cvsd.o src/audio/src/cvsd.c
 > In file included from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/features.h:388:0,
 >                  from /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/stdlib.h:24,
 >                  from src/libliquid.c:25:
 > /home/peko/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/gnu/stubs.h:10:29: fatal error: gnu/stubs-hard.h: No such file or directory
 >  # include <gnu/stubs-hard.h>
 >                              ^

 > Fixes:
 >  - http://autobuild.buildroot.org/results/36b3c2220c462e7a20262fd1b9064d9aeb6c9ec4
 >  - http://autobuild.buildroot.org/results/881826b4b6c141e59a0da2d7d1ad55d3709fdb95

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2023.02.x and 2023.11.x, thanks.
diff mbox series

Patch

diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk
index e9788eb144..a96d4cab79 100644
--- a/package/liquid-dsp/liquid-dsp.mk
+++ b/package/liquid-dsp/liquid-dsp.mk
@@ -40,6 +40,10 @@  ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
 LIQUID_DSP_CONF_OPTS += --enable-simdoverride
 endif
 
+ifeq ($(BR2_arm):$(BR2_ARM_FPU_NEON),y:)
+LIQUID_DSP_CONF_OPTS += --enable-simdoverride
+endif
+
 LIQUID_DSP_CONF_OPTS += \
 	CFLAGS="$(LIQUID_DSP_CFLAGS)" \
 	LDFLAGS="$(LIQUID_DSP_LDFLAGS)"