Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 616026

Summary: =dev-libs/wayland-1.13.0 (LTO) "error: undefined reference to '__start_test_section' "
Product: Gentoo Linux Reporter: Petross404(Petros S) <petross404>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: paolo.pedroni, steffen
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://cgit.freedesktop.org/wayland/wayland/commit/?id=4c920f0f5e591b066544cfda5a2b223ef46334a0
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 618550    
Attachments: build.log
emerge --info
fixlto.patch

Description Petross404(Petros S) 2017-04-19 17:35:02 UTC
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
Comment 1 Petross404(Petros S) 2017-04-19 17:36:07 UTC
Created attachment 470424 [details]
build.log
Comment 2 Petross404(Petros S) 2017-04-19 17:36:42 UTC
Created attachment 470426 [details]
emerge --info
Comment 3 Steffen Hau 2017-05-09 10:31:18 UTC
Using the patch from https://bugs.freedesktop.org/show_bug.cgi?id=94602#c2 fixes the issue.
Comment 4 Petross404(Petros S) 2017-05-09 11:31:01 UTC
Created attachment 472072 [details, diff]
fixlto.patch

fixlto.patch for =dev-libs/wayland-1.1{2,3}.0. Works *without* -ffat-lto-objects too.
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2017-05-11 08:57:07 UTC
Marking as fixed should be done when the bug is fixed in the portage tree.
Comment 6 Jiří Moravec 2017-06-02 20:25:34 UTC
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... :-((
Comment 7 Petross404(Petros S) 2018-01-14 14:50:29 UTC
Any news on this?
Comment 8 Alexander Miller 2018-05-13 21:37:25 UTC
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.
Comment 9 Petross404(Petros S) 2018-05-14 05:13:08 UTC
(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.
Comment 10 Petross404(Petros S) 2018-05-14 17:34:05 UTC
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
Comment 11 Steffen Hau 2018-05-14 18:46:09 UTC
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.
Comment 12 Petross404(Petros S) 2018-05-15 06:59:53 UTC
(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.
Comment 13 Matt Turner gentoo-dev 2018-05-27 23:41:51 UTC
A patch has gone upstream to fix this in 1.15.0.
Comment 14 Larry the Git Cow gentoo-dev 2018-06-06 20:08:59 UTC
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(+)