media-libs/gst-plugins-good: disable LTO
Fails to compile.
Compiling with LTO gives the following error:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/media-libs/gst-plugins-good-1.18.4/temp/cclqHELB.ltrans1.ltrans.o: in function `gst_deinterlace_method_yadif_init':
<artificial>:(.text+0x4c0c): undefined reference to `gst_yadif_filter_line_mode0_ssse3'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x4c13): undefined reference to `gst_yadif_filter_line_mode2_ssse3'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x4c73): undefined reference to `gst_yadif_filter_line_mode0_sse2'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: <artificial>:(.text+0x4c7a): undefined reference to `gst_yadif_filter_line_mode2_sse2'
collect2: error: ld returned 1 exit status
I tried to disable other optimizations, such as IPA-PTA, forcing to use ld-gold, but it didn't solve the issue.
Builds fine with -ffat-lto-objects for me. Maybe better to use that? What's the difference between disabling LTO completely and enabling -ffat-lto-objects?
Builds fine with
-ffat-lto-objectsfor me. Maybe better to use that? What's the difference between disabling LTO completely and enabling-ffat-lto-objects?
Did not work for me with -ffat-lto-objects, had to disable LTO completely.
Any update on this one?
@ran-dall: no worries, and thanks for your tests!
didn't work with -ffat-lto-objects for me either. +1 for disabling lto completely
affects media-libs/gst-plugins-good-1.20.1 as well. Please merge.
A fix for this has been merged to meson 3 days ago. As soon as they make a new release with that fix and meson gets updated in Gentoo this issue should disappear. Since the issue is really in another package and not gst-plugins-good if this gets merged it's something that should also get reverted once a fixed meson enters either the gentoo unstable or stable branch...?
It seems like all gst-plugins-good versions >1.16.3 will need the fix in Meson in order to build with LTO.
A fix for this has been merged to meson 3 days ago. As soon as they make a new release with that fix and meson gets updated in Gentoo this issue should disappear. Since the issue is really in another package and not gst-plugins-good if this gets merged it's something that should also get reverted once a fixed meson enters either the gentoo unstable or stable branch...?
It seems like all gst-plugins-good versions >1.16.3 will need the fix in Meson in order to build with LTO.
Sounds good, once I can check that it compiles with an updated meson, I'll close this PR. Thanks!
A fix for this has been merged to meson 3 days ago. As soon as they make a new release with that fix and meson gets updated in Gentoo this issue should disappear. Since the issue is really in another package and not gst-plugins-good if this gets merged it's something that should also get reverted once a fixed meson enters either the gentoo unstable or stable branch...? It seems like all gst-plugins-good versions >1.16.3 will need the fix in Meson in order to build with LTO.
Sounds good, once I can check that it compiles with an updated meson, I'll close this PR. Thanks!
I just tested myself that the current live build of meson in Gentoo does allow newer versions of gst-plugins-good to build with LTO. So hopefully it won't be long now until an ~amd64 version becomes available.
Meson 0.62.1 was released on the 23rd of April and has also been in the unstable Gentoo tree for quite a while. Unfortunately though this fix was not included there so gst-plugins-good versions > 1.16.3 still fails to build using the Gentoo unstable Meson.
It probably works for some architectures but most of us are running amd64 and there it's broken. The live "**" version of Meson still successfully builds gst-plugins-good though. So unfortunately for now we still have to use the live ebuild of Meson or disable LTO on gst-plugins-good in order to successfully build it.
This bug is triggered on certain architectures with older versions of Meson if you try to build with certain debug or LTO flags and the source code includes raw assembly code which is what was added to gst-plugins-good > 1.16.3.
Meson 0.62.2 has been released but it still fails to build gst-plugins-good. Latest meson-9999 still builds it without any issues.
meson-0.63.0 has been released to gentoo unstable and it successfully builds gst-plugins-good for me with LTO enabled