Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aruhier
Copy link
Contributor

@aruhier aruhier commented Jul 27, 2021

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.

@eternal-sorrow
Copy link

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?

@epsilon-0
Copy link

epsilon-0 commented Sep 12, 2021

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.

@aruhier
Copy link
Contributor Author

aruhier commented Oct 16, 2021

Any update on this one?

Copy link
Contributor

@ran-dall ran-dall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aruhier Sorry, I didn't see your PR and made a duplicate. I'm closing in favor of your PR. However, I would suggest you change media-libs/gst-plugins-good to =media-libs/gst-plugins-good-1.18.4 as media-libs/gst-plugins-good-1.16.3 builds just fine with LTO.

sys-config/ltoize/files/package.cflags/lto.conf Outdated Show resolved Hide resolved
@aruhier
Copy link
Contributor Author

aruhier commented Oct 25, 2021

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

@wolfwood
Copy link
Contributor

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

@aTosser
Copy link

aTosser commented Mar 18, 2022

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

@AnonymousRetard
Copy link

AnonymousRetard commented Apr 3, 2022

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.

@aruhier
Copy link
Contributor Author

aruhier commented Apr 3, 2022

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!

@AnonymousRetard
Copy link

AnonymousRetard commented Apr 3, 2022

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
Copy link

AnonymousRetard commented May 18, 2022

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants