wayland and LTO don't seem to fit well together. /tmp/portage/dev-libs/wayland-1.13.0/temp/cc4uzCHx.lto.o /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:124: error: undefined reference to '__start_test_section' /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:124: error: undefined reference to '__stop_test_section' /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:389: error: undefined reference to '__start_test_section' /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:389: error: undefined reference to '__stop_test_section' /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:389: error: undefined reference to '__stop_test_section' /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:442: error: undefined reference to '__stop_test_section' /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:442: error: undefined reference to '__start_test_section' /tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/tests/test-runner.c:107: error: undefined reference to '__start_test_section' ..... collect2: error: ld returned 1 exit status Reproducible: Always
Created attachment 470424 [details] build.log
Created attachment 470426 [details] emerge --info
Using the patch from https://bugs.freedesktop.org/show_bug.cgi?id=94602#c2 fixes the issue.
Created attachment 472072 [details, diff] fixlto.patch fixlto.patch for =dev-libs/wayland-1.1{2,3}.0. Works *without* -ffat-lto-objects too.
Marking as fixed should be done when the bug is fixed in the portage tree.
This problem solution was published in https://bugs.freedesktop.org/show_bug.cgi?id=94602 12.4. (almost 2 month ago) and this is still not in portage... :-((
Any news on this?
I can confirm this for dev-libs/wayland-1.14.0, too. Using sys-devel/gcc-7.3.0-r1 and -flto I get the same errors, with the patch from comment 4 the build succeeds.
(In reply to Alexander Miller from comment #8) > I can confirm this for dev-libs/wayland-1.14.0, too. > Using sys-devel/gcc-7.3.0-r1 and -flto I get the same errors, > with the patch from comment 4 the build succeeds. I suspect that the patch doesn't meet the required standards to be in portage tree. I will fork wayland and make the changes there to get a patch and/or a pull request. The patch will have description, dates etc.
As one can see here[1] the "used" is already added upstream. But for some reason the patch is applied which means that dowstream wayland != upstream. In this case I don't have something to commit and/or create a proper patch. [1]https://github.com/wayland-project/wayland/blob/master/tests/test-runner.h#L42
It's because the patch (https://github.com/wayland-project/wayland/commit/4c920f0f5e591b066544cfda5a2b223ef46334a0) has been applied to master after 1.14.0 was released and is therefor not included in 1.14.0 but in 1.15.0 (officially released on April 9, 2018) which is not in the tree at the moment. You could open a new bug with a version bump request.
(In reply to Steffen Hau from comment #11) > It's because the patch > (https://github.com/wayland-project/wayland/commit/ > 4c920f0f5e591b066544cfda5a2b223ef46334a0) has been applied to master after > 1.14.0 was released and is therefor not included in 1.14.0 but in 1.15.0 > (officially released on April 9, 2018) which is not in the tree at the > moment. You could open a new bug with a version bump request. Thanks. This report can be a dirty workaround for some users. In the meanwhile I will work on testing the 1.15 ebuild after removing this patch from /etc/portage/patches directory.
A patch has gone upstream to fix this in 1.15.0.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0b3a84a93a9457dc3f6908d3c495a421a8ad5ec commit e0b3a84a93a9457dc3f6908d3c495a421a8ad5ec Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2018-06-06 19:48:34 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2018-06-06 20:06:22 +0000 dev-libs/wayland: Version bump 1.15.0 Closes: https://bugs.gentoo.org/616026 Closes: https://bugs.gentoo.org/656930 dev-libs/wayland/Manifest | 1 + dev-libs/wayland/wayland-1.15.0.ebuild | 73 ++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+)