Skip to content

tinyalsa: Fails to build with pcm_plugin.c:156:5: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]. #2

Description

@dreirund

Ahoj,

when I try to build tinyalsa from the handsomefeed feed, it fails with
pcm_plugin.c:156:5: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation].

After a failing make -j6, here the terminal output of
make -j1 V=sc package/feeds/handsomefeed/tinyalsa/compile:

grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
make[1]: Entering directory '/[...]'
grep: warning: stray \ before /
make[2]: Entering directory '/[...]/package/libs/toolchain'
echo "libc" >> /[...]/staging_dir/target-aarch64_cortex-a53+neon_musl/pkginfo/toolchain.default.install
echo "libgcc" >> /[...]/staging_dir/target-aarch64_cortex-a53+neon_musl/pkginfo/toolchain.default.install
echo "libatomic" >> /[...]/staging_dir/target-aarch64_cortex-a53+neon_musl/pkginfo/toolchain.default.install
echo "libstdcpp" >> /[...]/staging_dir/target-aarch64_cortex-a53+neon_musl/pkginfo/toolchain.default.install
echo "libpthread" >> /[...]/staging_dir/target-aarch64_cortex-a53+neon_musl/pkginfo/toolchain.default.install
echo "librt" >> /[...]/staging_dir/target-aarch64_cortex-a53+neon_musl/pkginfo/toolchain.default.install
make[2]: Leaving directory '/[...]/package/libs/toolchain'
time: package/libs/toolchain/compile#0.33#0.04#0.34
make[2]: Entering directory '/[...]/feeds/handsomefeed/sound/tinyalsa'
mkdir -p /[...]/dl
SHELL= flock /[...]/tmp/.tinyalsa-2.0.0-1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d.tar.gz.flock -c '  	/[...]/scripts/download.pl "/[...]/dl" "tinyalsa-2.0.0-1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d.tar.gz" "08e41ff3217729ec87a16c5fe51205ba379aad0d2aa2e9813b6774ecba5b7ecd" "" || (  /[...]/scripts/dl_github_archive.py --dl-dir="/[...]/dl" --url="https://github.com/tinyalsa/tinyalsa.git" --version="1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d" --subdir="tinyalsa-2.0.0" --source="tinyalsa-2.0.0-1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d.tar.gz" --hash="08e41ff3217729ec87a16c5fe51205ba379aad0d2aa2e9813b6774ecba5b7ecd" || ( 	echo "Checking out files from the git repository..."; mkdir -p /[...]/tmp/dl && cd /[...]/tmp/dl && rm -rf tinyalsa-2.0.0 && [ \! -d tinyalsa-2.0.0 ] && git clone  https://github.com/tinyalsa/tinyalsa.git tinyalsa-2.0.0 && (cd tinyalsa-2.0.0 && git checkout 1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d && git submodule update --init --recursive) && echo "Packing checkout..." && export TAR_TIMESTAMP=`cd tinyalsa-2.0.0 && git log -1 --format='\''@%ct'\''` && rm -rf tinyalsa-2.0.0/.git && 	tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime="$TAR_TIMESTAMP"} -c tinyalsa-2.0.0 | 	gzip -nc > /[...]/tmp/dl/tinyalsa-2.0.0-1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d.tar.gz && mv /[...]/tmp/dl/tinyalsa-2.0.0-1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60d.tar.gz /[...]/dl/ && rm -rf tinyalsa-2.0.0; );  )    '
rm -f /[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0/.built
touch /[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0/.built_check
make -C /[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0/src CC="aarch64-openwrt-linux-musl-gcc" AR="aarch64-openwrt-linux-musl-gcc-ar" LD="aarch64-openwrt-linux-musl-gcc" CFLAGS="-g0 -O3 -pipe -mcpu=cortex-a53 -g0 -O3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0=tinyalsa-2.0.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" LDFLAGS="-L/[...]/staging_dir/toolchain-aarch64_cortex-a53+neon_gcc-8.4.0_musl/usr/lib -L/[...]/staging_dir/toolchain-aarch64_cortex-a53+neon_gcc-8.4.0_musl/lib -znow -zrelro" all
make[3]: Entering directory '/[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0/src'
Makefile:52: warning: overriding recipe for target 'libtinyalsa.so.'
Makefile:49: warning: ignoring old recipe for target 'libtinyalsa.so.'
aarch64-openwrt-linux-musl-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC -g0 -O3 -pipe -mcpu=cortex-a53 -g0 -O3 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0=tinyalsa-2.0.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro   -c -o pcm_plugin.o pcm_plugin.c
In function 'pcm_plug_info',
    inlined from 'pcm_plug_ioctl' at pcm_plugin.c:635:15:
pcm_plugin.c:156:5: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]
     strncpy((char *)info->id, name, sizeof(info->id));
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
make[3]: *** [<builtin>: pcm_plugin.o] Error 1
make[3]: Leaving directory '/[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0/src'
make[2]: *** [Makefile:93: /[...]/build_dir/target-aarch64_cortex-a53+neon_musl/tinyalsa-2.0.0/.built] Error 2
make[2]: Leaving directory '/[...]/feeds/handsomefeed/sound/tinyalsa'
time: package/feeds/handsomefeed/tinyalsa/compile#0.49#0.08#0.53
    ERROR: package/feeds/handsomefeed/tinyalsa failed to build.
make[1]: *** [package/Makefile:116: package/feeds/handsomefeed/tinyalsa/compile] Error 1
make[1]: Leaving directory '/[...]'
make: *** [/[...]/include/toplevel.mk:230: package/feeds/handsomefeed/tinyalsa/compile] Error 2
  • grep -i tinyalsa .config:
    CONFIG_PACKAGE_tinyalsa-lib=m
    CONFIG_PACKAGE_tinyalsa-utils=m
  • → Full .config.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions