Summary: | x11-libs/wxGTK:2.8 fails to compile with gcc-4.7.2 -flto / LTO enabled - configure tests are not LTO save and deliver wrong results | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | cmuelle8 <cmue81> |
Component: | [OLD] Library | Assignee: | Gentoo wxWidgets project <wxwidgets> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | kredba, mkyral |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=468958 | ||
Whiteboard: | https://github.com/wxWidgets/wxWidgets/commit/32632baf6d4a9c9d03fb8b17a7a9a4a2aa339999 | ||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963, 618550 | ||
Attachments: |
build log thread.h error - 1366160365-install-x11-libs_wxGTK-2.8.12.1:2.8::gentoo.out.gz
build log -ldl error - 1366163053-install-x11-libs_wxGTK-2.8.12.1:2.8::gentoo.out.gz files/wxGTK-2.8.12.1-setconcurrency-backport.patch wxGTK-2.8.12.1.ebuild.patch wxGTK-2.8.12.1.ebuild.patch |
Description
cmuelle8
2013-04-18 02:58:56 UTC
Created attachment 345850 [details]
build log thread.h error - 1366160365-install-x11-libs_wxGTK-2.8.12.1:2.8::gentoo.out.gz
Created attachment 345852 [details]
build log -ldl error - 1366163053-install-x11-libs_wxGTK-2.8.12.1:2.8::gentoo.out.gz
Created attachment 345854 [details, diff]
files/wxGTK-2.8.12.1-setconcurrency-backport.patch
backport pthread_setconcurrency usage from 2.9*
Created attachment 345856 [details, diff]
wxGTK-2.8.12.1.ebuild.patch
- add sed commands to make AC_CHECK_FUNC configure tests lto save
- test for pthread_setconcurrency instead of thr_setconcurrency
If wxGTK is compiled with lto (with the help of the patches here), then sci-visualization/gnuplot with wxwidgets use flag can't be linked. While I appreciate the analysis and work you've done here, we don't support systemwide lto. It has unfortunate consequences not only when linking in other libraries but also during compiler upgrades. Maybe upstream is interested? (In reply to comment #6) > While I appreciate the analysis and work you've done here, we don't support > systemwide lto. It has unfortunate consequences not only when linking in > other libraries but also during compiler upgrades. Maybe upstream is > interested? 'During' CC upgrades? iirc wxGTK is not part of a cc toolchain. You do not _force_ anyone to actually use it by applying the patch. You just give people the choice to more easily tinker around with it and see what goes. Gentoo is about choices, the patch does not break usual builds, so I do not understand your rejection. As for linking issue with gnuplot: I do not seem to have this issue. Compiling gnuplot with lto'd wxGTK:2.8 works here. (In reply to comment #5) > If wxGTK is compiled with lto (with the help of the patches here), then > sci-visualization/gnuplot with wxwidgets use flag can't be linked. Can you open another bug for this and attach the build log there? I cannot seem to reproduce this, just double checked. gcc-4.8.0 ebuild says: LTO support is still experimental and unstable. Any bug reports about LTO that do not include an upstream patch will be closed as invalid. Apparently this bug fell victim to this policy. Since upstream is unlikely to patch up on released versions, as experienced previously, we'll gladly wait another one to two years until the lto playground is labeled safe to play with by the authorities. Greetings sorry, changing state was unintentional, people should try hard to find this. Created attachment 347688 [details, diff]
wxGTK-2.8.12.1.ebuild.patch
- revised patch that checks {C,CXX,LD}FLAGS for "flto" or "-O4" (clang -O4 implies flto)
- build files are made lto-save depending on *FLAGS
tested successfully on amd64/x86 with gcc -flto and clang -O4
(In reply to comment #8) > (In reply to comment #5) > > If wxGTK is compiled with lto (with the help of the patches here), then > > sci-visualization/gnuplot with wxwidgets use flag can't be linked. > > Can you open another bug for this and attach the build log there? Again, I cannot confirm this. Neither on amd64 nor x86. On both archs gnuplot builds fine with lto'd wxGTK:2.8 - regardless of whether it has been built using "gcc -flto" or "clang -O4". Use flags in use here # cave show -f sci-visualization/gnuplot sci-visualization/gnuplot-4.6.2-r1:0::installed Description Command-line driven interactive plotting program Homepage http://www.gnuplot.info/ From repositories gentoo Installed time Wed May 08 04:58:28 CEST 2013 Installed using paludis-1.2.0 License gnuplot GPL-2 bitmap? ( free-noncomm ) Use flags (X) (-aqua) (-bitmap) (cairo) (doc) (-emacs) (examples) (gd) (ggi) (latex) (lua) (plotutils) (qt4) (readline) (-svga) (-thin-splines) (wxwidgets) (-xemacs) build_options: -trace Upstream is unlikely to add this to 2.8 branch since it's long been released. This isn't security related, it's more a "feature" request wrt build system. Requesting a second review, see revised ebuild patch. They still make 2.8 releases. I suppose I'll have a look at this. I just hate messing around in wxGTK's build system. It's such a mess. Comment on attachment 347688 [details, diff] wxGTK-2.8.12.1.ebuild.patch >+ sed -e '/^for ac_func in thr_/ s:thr:pthread:' \ Is this just because of the broken eautoreconf? I'd rather backport the full patch from upstream if we can. cmuelle8: Thank you. I really appreciate your effort on this. (I am one of that lto system wide guys.) wxGTK:2.8 has been last rited in bug 661284, thus marking this bug here as obsolete, as presumably the referenced commit in whiteboard would be in the 3.0 versions |