[Bug 1133294] New: LTO: xorg-x11-server build fails
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 Bug ID: 1133294 Summary: LTO: xorg-x11-server build fails Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: martin.liska@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Fails due to: [ 786s] events.c:605:49: error: array subscript -1 is below array bounds of 'struct _Window *[16]' [-Werror=array-bounds] https://bugs.freedesktop.org/show_bug.cgi?id=110256 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 Martin Liška <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1133084 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c9 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |FIXED --- Comment #9 from Martin Li��ka <martin.liska@suse.com> --- Fixed, LTO is being used now. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c10 Martin Li��ka <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #10 from Martin Li��ka <martin.liska@suse.com> --- My bad, I had locally modified spec. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c11 --- Comment #11 from Martin Li��ka <martin.liska@suse.com> --- Now it fails due to: [ 97s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: /tmp/tests.EgwlFS.ltrans1.ltrans.o: in function `__wrap_GrabButton': [ 97s] /home/abuild/rpmbuild/BUILD/xserver-1.20.10/test/xi2/protocol-xipassivegrabdevice.c:72: undefined reference to `GrabButton' [ 97s] collect2: error: ld returned 1 exit status [ 97s] make[3]: *** [Makefile:1055: tests] Error 1 which is a -Wl,-wrap,GrabButton used in tests. -Wl,-wrap is not supported by LTO. A possible fix would be disabling of LTO in tests. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c12 --- Comment #12 from Stefan Dirsch <sndirsch@suse.com> --- Hmm. I don't know how to do this just for the subtree test/. Maybe I can figure out if I would know which gcc options this "_lto_cflags" manipulates (currently used in specfile: "%define _lto_cflags %{nil}"). Then I could adjust Makefile.am below tests/ -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c13 --- Comment #13 from Martin Li��ka <martin.liska@suse.com> --- (In reply to Stefan Dirsch from comment #12)
Hmm. I don't know how to do this just for the subtree test/. Maybe I can figure out if I would know which gcc options this "_lto_cflags" manipulates (currently used in specfile: "%define _lto_cflags %{nil}"). Then I could adjust Makefile.am below tests/
Looking at build log, the tests are build as part of: [ 90s] + make -j8 [ 90s] Making all in doc [ 90s] make[1]: Entering directory '/home/abuild/rpmbuild/BUILD/xserver-1.20.10/doc' ... what you can do is to add -fno-lto in test/Makefile (adding that to C{,CXX}FLAGS}. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c14 --- Comment #14 from Stefan Dirsch <sndirsch@suse.com> --- Tried with this patch: --- xserver-1.20.10/test/Makefile.am.orig 2021-03-02 23:46:49.137916000 +0100 +++ xserver-1.20.10/test/Makefile.am 2021-03-02 23:47:48.691663000 +0100 @@ -3,7 +3,7 @@ SUBDIRS= . AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ AM_CPPFLAGS = $(XORG_INCS) -tests_CPPFLAGS= +tests_CPPFLAGS= -fno-lto CLEANFILES= tests_SOURCES = \ @@ -105,6 +105,7 @@ tests_LDFLAGS = \ -Wl,-wrap,XISetEventMask \ -Wl,-wrap,AddResource \ -Wl,-wrap,GrabButton \ + -fno-lto \ $() endif XORG but this then resulted in [...] [ 137s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/10/../../../../lib64/Scrt1.o: in function `_start': [ 137s] /home/abuild/rpmbuild/BUILD/glibc-2.33/csu/../sysdeps/x86_64/start.S:104: undefined reference to `main' [ 137s] collect2: error: ld returned 1 exit status [ 137s] make[3]: *** [Makefile:1056: tests] Error 1 [ 137s] make[3]: Leaving directory '/home/abuild/rpmbuild/BUILD/xserver-1.20.10/test' -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c15 --- Comment #15 from Martin Li��ka <martin.liska@suse.com> --- Can you please test adding the following: %global _lto_cflags %{?_lto_cflags} -ffat-lto-objects ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c16 --- Comment #16 from Stefan Dirsch <sndirsch@suse.com> --- Thanks! Is this to be used with or without my patch? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c17 --- Comment #17 from Martin Li��ka <martin.liska@suse.com> --- (In reply to Stefan Dirsch from comment #16)
Thanks! Is this to be used with or without my patch?
Please try it together. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c18 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #18 from Stefan Dirsch <sndirsch@suse.com> --- Thanks. This indeed fixes the issue - together with the second hunk of my patch. I removed the first hunk. I've submitted the package now to factory/TW. Closing bug. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133294 http://bugzilla.opensuse.org/show_bug.cgi?id=1133294#c20 --- Comment #20 from Martin Li��ka <martin.liska@suse.com> --- Great, thank you Stefan for cooperation. -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com