package/taglib: mp4 support needs threads

Buildroot commit 1c5730ebb5 bumped the
package from version 2.2.1 to version 2.3 which includes upstream commit
5d63187a8b
that uses std::call_once and is only available with threads support.

Inspired by buildroot commit f9a2d65cae
which fixed a similar error.

This patch fixes a build error

/builds/bkuhls/buildroot/br-test-pkg/br-arm-full-nothread/build/taglib-2.3/taglib/mp4/mp4itemfactory.cpp:51:16:
 error: ‘once_flag’ in namespace ‘std’ does not name a type

caught by the Gitlab pipelines. To reproduce use this defconfig:

  BR2_arm=y
  BR2_arm1176jzf_s=y
  BR2_TOOLCHAIN_EXTERNAL=y
  BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
  BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
  BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm11-full-nothread-2020.11.2.tar.bz2"
  BR2_TOOLCHAIN_EXTERNAL_GCC_9=y
  BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_9=y
  BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
  # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS is not set
  BR2_TOOLCHAIN_EXTERNAL_CXX=y
  BR2_PER_PACKAGE_DIRECTORIES=y
  BR2_PACKAGE_TAGLIB=y

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bernd Kuhls
2026-07-24 18:48:27 +02:00
committed by Thomas Petazzoni
parent 7e036c739f
commit 1a0a2134e6

View File

@@ -12,6 +12,12 @@ TAGLIB_LICENSE = LGPL-2.1 or MPL-1.1
TAGLIB_LICENSE_FILES = COPYING.LGPL COPYING.MPL
TAGLIB_CPE_ID_VENDOR = taglib
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
TAGLIB_CONF_OPTS += -DWITH_MP4=ON
else
TAGLIB_CONF_OPTS += -DWITH_MP4=OFF
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
TAGLIB_DEPENDENCIES += zlib
TAGLIB_CONF_OPTS += -DWITH_ZLIB=ON