https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: media-video/mplayer-1.4-r1 fails to compile (lto). Discovered on: amd64 (internal ref: lto_tinderbox) NOTE: This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Created attachment 794423 [details] build.log build log and emerge --info
Created attachment 794426 [details] 1-config.log 1-config.log
Error(s) that match a know pattern in addition to what has been reported in the summary: /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x12c3): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x12cc): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x12d5): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x12dd): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x12e5): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x12ed): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x12f5): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x1427): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x1430): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x1439): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x1442): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x144a): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x1452): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x145a): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x1462): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0xc12): undefined reference to `sse_int32_map_factor' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0xc1a): undefined reference to `sse_int32_80h' /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0xc22): undefined reference to `sse_int32_80h' <artificial>:(.text+0x12ba): undefined reference to `sse_int32_map_factor' <artificial>:(.text+0xc09): undefined reference to `sse_int32_map_factor' collect2: error: ld returned 1 exit status
Created attachment 844793 [details, diff] Patch proposal to fix mplayer build with USE="libass" and CFLAGS="-flto" This patch is an improvement from the one previously submitted for the same bug for version 1.3.0-r4: https://bugs.gentoo.org/650458 The improvment is quite small: instead of globally disable HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS, I disable it only in the faulty file in order to avoid potential side-effects in other build files and make sure we get proper optimizations, apart from this particular file, ie libmpcodecs/vf_ass.c. It seems that this patch could be applied conditionnaly to is-flagq '-flto' but it may be safer to always apply it. Following the build log from a successful merge with this patch applied (conditionnaly to LTO set in my case).
Created attachment 844795 [details] Output from emerge --info =media-video/mplayer-1.4-r1
Created attachment 844797 [details] Emerge build log with patch applied
(In reply to Jocelyn Mayer from comment #4) > Created attachment 844793 [details, diff] [details, diff] > Patch proposal to fix mplayer build with USE="libass" and CFLAGS="-flto" > > This patch is an improvement from the one previously submitted for the same > bug for version 1.3.0-r4: > https://bugs.gentoo.org/650458 > The improvment is quite small: instead of globally disable > HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS, I disable it only in the faulty file in > order to avoid potential side-effects in other build files and make sure we > get proper optimizations, apart from this particular file, ie > libmpcodecs/vf_ass.c. > > It seems that this patch could be applied conditionnaly to is-flagq '-flto' > but it may be safer to always apply it. > > Following the build log from a successful merge with this patch applied > (conditionnaly to LTO set in my case). I think it's a bit too invasive to apply downstream. *** This bug has been marked as a duplicate of bug 650458 ***