Bug 1148374 - LTO: libqt5-qttools build fails on ppc64
LTO: libqt5-qttools build fails on ppc64
Status: RESOLVED DUPLICATE of bug 1112389
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-27 13:44 UTC by Martin Wilck
Modified: 2019-09-03 12:06 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Wilck 2019-08-27 13:44:13 UTC
libqt5-qttools build for ppc64 last succeeded on June, 28th. The last build attempt (July 30th) failed:

> osc -A https://api.opensuse.org remotebuildlog -l openSUSE:Factory:PowerPC libqt5-qttools standard ppc64
> 
> [ 1018s] g++ -Wl,--as-needed -Wl,--no-undefined -Wl,--enable-new-dtags -o ../../../../bin/designer .obj/fontpanel.o .obj/qttoolbardialog.o .obj/main.o .obj/qdesigner.o .obj/qdesigner_toolwindow.o .obj/qdesigner_formwindow.o .obj/qdesigner_workbench.o .obj/qdesigner_settings.o .obj/qdesigner_server.o .obj/qdesigner_actions.o .obj/qdesigner_appearanceoptions.o .obj/saveformastemplate.o .obj/newform.o .obj/versiondialog.o .obj/appfontdialog.o .obj/preferencesdialog.o .obj/assistantclient.o .obj/mainwindow.o .obj/qrc_designer.o .obj/qrc_qttoolbardialog.o .obj/moc_fontpanel.o .obj/moc_qdesigner.o .obj/moc_qdesigner_toolwindow.o .obj/moc_qdesigner_formwindow.o .obj/moc_qdesigner_workbench.o .obj/moc_qdesigner_actions.o .obj/moc_qdesigner_server.o .obj/moc_qdesigner_appearanceoptions.o .obj/moc_saveformastemplate.o .obj/moc_newform.o .obj/moc_versiondialog.o .obj/moc_appfontdialog.o .obj/moc_preferencesdialog.o .obj/moc_assistantclient.o .obj/moc_mainwindow.o   -L/usr/lib64 -lm -L/home/abuild/rpmbuild/BUILD/qttools-everywhere-src-5.13.0/lib -lQt5DesignerComponents -lQt5Designer -lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Xml -lQt5Network -lQt5Core /usr/lib64/libGL.so -lpthread   
> [ 1035s] /usr/lib64/gcc/powerpc64-suse-linux/9/../../../../powerpc64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/qttools-everywhere-src-5.13.0/lib/libQt5DesignerComponents.so: undefined reference to `LTHUNK9.lto_priv.2'
> [ 1035s] /usr/lib64/gcc/powerpc64-suse-linux/9/../../../../powerpc64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/qttools-everywhere-src-5.13.0/lib/libQt5DesignerComponents.so: undefined reference to `LTHUNK13.lto_priv.1'
> [ 1035s] /usr/lib64/gcc/powerpc64-suse-linux/9/../../../../powerpc64-suse-linux/bin/ld: /home/abuild/rpmbuild/BUILD/qttools-everywhere-src-5.13.0/lib/libQt5DesignerComponents.so: undefined reference to `LTHUNK8.lto_priv.3'

This looks like an LTO related problem to me. 

Because libqt5-qttools encodes a hard dependency on clang8 like this:

  # qdoc hardcodes clang include paths: boo#1109367, QTBUG-70687
  %requires_eq    clang%(rpm -q --qf '%''{version}' clang-devel | cut -d. -f1)

and clang has meanwhile advanced from 8.0.0 to 8.0.1, builds of other packages fail because the dependency clang8 = 8.0.0 can't be fulfilled any more on OpenSUSE:Factory:PowerPC. See e.g. Printing / hplip:


> osc buildinfo -d openSUSE:Factory:PowerPC hplip standard ppc64
>  <error>unresolvable: nothing provides clang8 = 8.0.0 needed by libqt5-qttools-doc</error>
Comment 1 Fabian Vogt 2019-08-27 14:26:05 UTC
Could probably be worked around by disabling LTO for ppc64 in general.

*** This bug has been marked as a duplicate of bug 1112389 ***
Comment 2 Michel Normand 2019-09-03 06:53:18 UTC
(In reply to Fabian Vogt from comment #1)
> Could probably be worked around by disabling LTO for ppc64 in general.

how to do that ?
Comment 3 Fabian Vogt 2019-09-03 07:28:49 UTC
(In reply to Michel Normand from comment #2)
> (In reply to Fabian Vogt from comment #1)
> > Could probably be worked around by disabling LTO for ppc64 in general.
> 
> how to do that ?

By overriding the optflags in openSUSE:Factory:PowerPC for %ifatch ppc64 with some which don't use the %{_lto_cflags} macro.
Comment 4 Michel Normand 2019-09-03 08:55:28 UTC
(In reply to Fabian Vogt from comment #3)
> (In reply to Michel Normand from comment #2)
> > (In reply to Fabian Vogt from comment #1)
> > > Could probably be worked around by disabling LTO for ppc64 in general.
> > 
> > how to do that ?
> 
> By overriding the optflags in openSUSE:Factory:PowerPC for %ifatch ppc64
> with some which don't use the %{_lto_cflags} macro.

Fabian could you do that ? (I do not have maintenance access)
Comment 5 Fabian Vogt 2019-09-03 09:07:18 UTC
(In reply to Michel Normand from comment #4)
> (In reply to Fabian Vogt from comment #3)
> > (In reply to Michel Normand from comment #2)
> > > (In reply to Fabian Vogt from comment #1)
> > > > Could probably be worked around by disabling LTO for ppc64 in general.
> > > 
> > > how to do that ?
> > 
> > By overriding the optflags in openSUSE:Factory:PowerPC for %ifatch ppc64
> > with some which don't use the %{_lto_cflags} macro.
> 
> Fabian could you do that ? (I do not have maintenance access)

Me neither. Dominique?
Comment 6 Dominique Leuenberger 2019-09-03 12:06:32 UTC
Done, changed prjconf to:

%ifnarch ppc64
Optflags: * -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type %{_lto_cflags}
%else
Optflags: * -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type
%endif