Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 861140 - media-video/mplayer-1.4-r1 fails to compile (lto): <artificial>:(.text+0xc09): undefined reference to sse_int32_map_factor
Summary: media-video/mplayer-1.4-r1 fails to compile (lto): <artificial>:(.text+0xc09)...
Status: RESOLVED DUPLICATE of bug 650458
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2022-07-26 06:34 UTC by Agostino Sarubbo
Modified: 2022-12-24 10:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,403.32 KB, text/plain)
2022-07-26 06:34 UTC, Agostino Sarubbo
Details
1-config.log (1-config.log,165.81 KB, text/plain)
2022-07-26 06:34 UTC, Agostino Sarubbo
Details
Patch proposal to fix mplayer build with USE="libass" and CFLAGS="-flto" (mplayer-1.4-r1-vf_ass-asm_fix.patch,1.24 KB, patch)
2022-12-23 12:26 UTC, Jocelyn Mayer
Details | Diff
Output from emerge --info =media-video/mplayer-1.4-r1 (emerge-infos-mplayer-1.4-r1,24.24 KB, text/plain)
2022-12-23 12:36 UTC, Jocelyn Mayer
Details
Emerge build log with patch applied (mplayer-1.4-r1:20221223-120247.log.gz,42.74 KB, application/gzip)
2022-12-23 12:38 UTC, Jocelyn Mayer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-07-26 06:34:08 UTC
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
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-26 06:34:11 UTC
Created attachment 794423 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-07-26 06:34:13 UTC
Created attachment 794426 [details]
1-config.log

1-config.log
Comment 3 Agostino Sarubbo gentoo-dev 2022-07-26 06:34:15 UTC
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
Comment 4 Jocelyn Mayer 2022-12-23 12:26:00 UTC
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).
Comment 5 Jocelyn Mayer 2022-12-23 12:36:28 UTC
Created attachment 844795 [details]
Output from emerge --info =media-video/mplayer-1.4-r1
Comment 6 Jocelyn Mayer 2022-12-23 12:38:54 UTC
Created attachment 844797 [details]
Emerge build log with patch applied
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-24 10:15:16 UTC
(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 ***