[Buildroot] [PATCH] alsa-utils: bat needs fftw single precision

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat Jun 30 19:28:37 UTC 2018


Hello Baruch,

On Fri, 29 Jun 2018 08:57:59 +0300, Baruch Siach wrote:
> Otherwise the configure check for fftw fails, and alsabat does not link
> with libfftw. We can not select a config choice, so depend on single
> precision instead.
> 
> Cc: Bernd Kuhls <bernd.kuhls at t-online.de>
> Signed-off-by: Baruch Siach <baruch at tkos.co.il>

Well, if the alsabat binary can be produced without linking to libfftw,
it means libfftw is not a mandatory dependency of alsabat, but only an
optional dependency, and therefore there is no need to select/depends
on FFTW.

I tested a build with fftw in double precision, and indeed, alsabat
isn't linked with libfftw:

$ readelf -d output/target/usr/bin/alsabat 

Dynamic section at offset 0x6f28 contains 22 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libasound.so.2]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]

But alsabat has been built/installed nonetheless, so FFTW is not a
mandatory dependency.

And indeed, the only code that uses FFTW is properly enclosed in:

if HAVE_LIBFFTW3
alsabat_SOURCES += analyze.c
noinst_HEADERS += analyze.h
endif

Could you turn FFTW into an optional dependency instead ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list