gentooLTO icon indicating copy to clipboard operation
gentooLTO copied to clipboard

media-libs/gst-plugins-good: disable LTO

Open aruhier opened this issue 4 years ago • 12 comments

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.

aruhier avatar Jul 27 '21 10:07 aruhier

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?

eternal-sorrow avatar Sep 09 '21 10:09 eternal-sorrow

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?

Did not work for me with -ffat-lto-objects, had to disable LTO completely.

epsilon-0 avatar Sep 12 '21 15:09 epsilon-0

Any update on this one?

aruhier avatar Oct 16 '21 22:10 aruhier

@ran-dall: no worries, and thanks for your tests!

aruhier avatar Oct 25 '21 16:10 aruhier

didn't work with -ffat-lto-objects for me either. +1 for disabling lto completely

wolfwood avatar Oct 26 '21 20:10 wolfwood

affects media-libs/gst-plugins-good-1.20.1 as well. Please merge.

aTosser avatar Mar 18 '22 04:03 aTosser

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.

AnonymousRetard avatar Apr 03 '22 07:04 AnonymousRetard

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!

aruhier avatar Apr 03 '22 09:04 aruhier

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.

AnonymousRetard avatar Apr 03 '22 10:04 AnonymousRetard

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.

AnonymousRetard avatar May 18 '22 10:05 AnonymousRetard

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.

AnonymousRetard avatar Jun 05 '22 12:06 AnonymousRetard

meson-0.63.0 has been released to gentoo unstable and it successfully builds gst-plugins-good for me with LTO enabled

AnonymousRetard avatar Jul 20 '22 20:07 AnonymousRetard