Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923491 - media-video/ffmpeg tc-is-lto, filter-lto, and multiple lib issues
Summary: media-video/ffmpeg tc-is-lto, filter-lto, and multiple lib issues
Status: UNCONFIRMED
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: 2024-02-01 21:25 UTC by Michael Cook
Modified: 2024-02-20 16:53 UTC (History)
3 users (show)

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


Attachments
Fixed ffmpeg ebuild (ffmpeg-6.1.1-r2.ebuild,19.18 KB, text/plain)
2024-02-01 21:27 UTC, Michael Cook
Details
Min-repo ebuild demonstrating issue (test-1.ebuild,497 bytes, application/vnd.gentoo.ebuild)
2024-02-01 21:37 UTC, Michael Cook
Details
Min-repo ebuild eclass-debug.log (eclass-debug.log,4.71 KB, text/plain)
2024-02-01 21:39 UTC, Michael Cook
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Cook 2024-02-01 21:25:29 UTC
With multilib systems, the 2nd arch run will return false when tc-is-lto is called since filter-lto was called in the previous one.

On my system it builds x86 first, which skips LTO due to previous bugs, but still calls filter-lto which means when it gets to build amd64 tc-is-lto will return false and skip LTO.

I did check an object file with readelf -S when it should have compiled with LTO and it did not. 

I did try moving the LTO stuff to src_prepare (anything only called once before src_configure will work, but I thought it made sense to do it there)
Comment 1 Michael Cook 2024-02-01 21:27:10 UTC
Created attachment 883955 [details]
Fixed ffmpeg ebuild

This is what I ended up doing which works out fine (verified with checking object files with readelf -S)
Comment 2 Michael Cook 2024-02-01 21:37:56 UTC
Created attachment 883956 [details]
Min-repo ebuild demonstrating issue
Comment 3 Michael Cook 2024-02-01 21:39:36 UTC
Created attachment 883957 [details]
Min-repo ebuild eclass-debug.log
Comment 4 Michael Cook 2024-02-02 01:41:08 UTC
I couldn't find any other multilib packages in the tree that has this issue, but media-libs/x264 would if LTO support was added (they support LTO as a config flag) which does make me wonder if pkg_setup would be a better place to do a fix like this.