From: Hongxu Jia Date: Tue, 20 Jan 2026 02:48:32 +0000 (+0800) Subject: flac: fix compile failed on musl X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=831fcbebf3ddbcf3b84eb9b0540cc9ac4d0b0635;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git flac: fix compile failed on musl While not including security_flags.inc $ echo "TCLIBC = 'musl'" >> conf/local.conf $ echo "MACHINE = 'qemux86'" >> conf/local.conf $ bitbake flac ... | libtool: link: (cd .libs/libFLAC++-static.lax/libFLAC-static.a && i686-oe-linux-musl-gcc-arx "/buildarea5/hjia/oe-core/build/tmp/work/core2-32-oe-linux-musl/flac/1.5.0/build/src/libFLAC++/ ../libFLAC/.libs/libFLAC-static.a") | build/tmp/work/core2-32-oe-linux-musl/flac/1.5.0/recipe-sysroot-native/usr/bin/ i686-oe-linux-musl/../../libexec/i686-oe-linux-musl/gcc/i686-oe-linux-musl/15.2.0/ld: .libs/metadata.o: in function `FLAC::Metadata::VorbisCo mment::set_comment(unsigned int, FLAC::Metadata::VorbisComment::Entry const&)': | /usr/src/debug/flac/1.5.0/src/libFLAC++/metadata.cpp:913:(.text+0x2032): undefined reference to `__stack_chk_fail_local' ... Refer [1], make gcc pass -lssp_nonshared to the linker whether including security_flags.inc or not [1] https://www.openwall.com/lists/musl/2018/09/11/2 Signed-off-by: Hongxu Jia Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-multimedia/flac/flac_1.5.0.bb b/meta/recipes-multimedia/flac/flac_1.5.0.bb index d6df801aec8..e227133ad79 100644 --- a/meta/recipes-multimedia/flac/flac_1.5.0.bb +++ b/meta/recipes-multimedia/flac/flac_1.5.0.bb @@ -26,6 +26,10 @@ EXTRA_OECONF = "--disable-oggtest \ --without-libiconv-prefix \ " +# /usr/src/debug/flac/1.5.0/src/libFLAC++/metadata.cpp:913: +# (.text+0x2032): undefined reference to `__stack_chk_fail_local' +LDFLAGS:append:libc-musl = " -lssp_nonshared" + PACKAGECONFIG ??= " \ ogg \ "