Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214574 - app-office/lyx: add pch useflag
Summary: app-office/lyx: add pch useflag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
: 220807 (view as bug list)
Depends on:
Blocks: gcc-4.3
  Show dependency tree
 
Reported: 2008-03-24 19:02 UTC by Rafał Mużyło
Modified: 2008-11-10 13:37 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to build with --disable-pch (pch-fix.patch,472 bytes, patch)
2008-03-24 19:03 UTC, Rafał Mużyło
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mużyło 2008-03-24 19:02:03 UTC
As many other packages have this useflag, I will simply give my result.
standard ebuild (lyx 1.5.4):
${S} size at the end of src_install - 443065538b
genlop -t: 59 minutes and 45 seconds
--disable-pch --without-included-boost:
${S} size at the end of src_install - 108779392b
genlop -t: 32 minutes and 16 seconds
Of course, my use of ccache may have had some impact on the time, but not to this level

And about boost: I asked about using system boost and last time it was rejected, but I'm not sure whether it was a real issue or ebuild maintainer dodging
I needed a little patch, one part of it I'm almost sure is correct (limits), the other one I'm not sure, but it seems to work. This patch was probably needed, cause I'm using gcc 4.3.0 and it was triggered by pch, not boost.
Comment 1 Rafał Mużyło 2008-03-24 19:03:19 UTC
Created attachment 147160 [details, diff]
patch to build with --disable-pch
Comment 2 Rafał Mużyło 2008-03-24 19:04:24 UTC
Forgot to add: dev-libs/boost-1.34.1-r2
Comment 3 pavel sanda 2008-03-24 20:44:11 UTC
hi, fyi:

- pch are should be disabled by default from upstream in the forthcomming 1.6.
- the ebuild i have prepared for 1.6 have also boost flag.
- wrt compilation time monolithic flag should be working in 1.6 too

to the attachments - if you are sure --disable-pch && gcc 4.3.0 cause compilation to fail it would be good to come in lyx devel list with your patches if no from other reasons than to review.

"I'm not sure, it seems to work" patches are imho not good idea to put directly into portage.
Comment 4 Rafał Mużyło 2008-03-24 21:12:31 UTC
Well, the problem with this patch is:
while #include <limits> seem to match some of the error I can google,
abort() thing is a guess, cause I'm not sure why it fails in the first place, as <stdlib.h> is included and std::abort() didn't work.
Comment 5 pavel sanda 2008-03-28 15:48:20 UTC
this is not the place where to discuss these patches.
Comment 6 pavel sanda 2008-03-31 08:52:19 UTC
should be fixed in 1.5.5
http://www.lyx.org/trac/changeset/24069
Comment 7 Vladimir Lushnikov 2008-05-08 22:19:29 UTC
*** Bug 220807 has been marked as a duplicate of this bug. ***
Comment 8 pavel sanda 2008-05-11 21:44:56 UTC
1.5.5 in portage
Comment 9 Leonardo Valeri Manera 2008-05-12 20:06:18 UTC
And still no pch USE :)

Can we please, please have pch as an option, and also have it use system boost?
I don't like having to keep a copy of release LyX in my overlay just for this :P
Comment 10 pavel sanda 2008-05-13 07:32:54 UTC
i promised these for 1.6 series.
as far as 1.5 concerned i prefer stability over optimalization tweaking.
Comment 11 Rafał Mużyło 2008-05-13 22:12:10 UTC
Well, I've just tested it (1.5.5) and it's still broken
with --disable-pch --without-included-boost.
Compilation fails at src/support/abort.cpp again.
However the fix for it is a bit silly.
All that needs to be done is move the block

#include <cstdlib> 

#ifdef HAVE_STDLIB_H 
# include <stdlib.h> 
#endif

outside of 
namespace lyx {...}
Comment 12 pavel sanda 2008-05-13 22:25:51 UTC
:D at least you see why i'm hesitant to change these things.
Comment 13 Rafał Mużyło 2008-05-13 22:50:35 UTC
But it seems it was a true lyx bug.
If I understand correctly what pch.h did,
it was including all those c++ headers at global scope,
when it was taken out, those includes in abort.cpp were simply at the wrong place to work.
Comment 14 Rafał Mużyło 2008-06-05 00:17:07 UTC
I just noticed that the latest note on 1.5.X svn branch is :
uwestoehr:  installer: sync with new version from trunk and prepare for LyX 1.5.6
but this bug is still not fixed.
Any chances on getting the fixed I proposed (moving the includes outside namespace  lyx{}) into 1.5.6 ?
Comment 15 pavel sanda 2008-06-05 08:07:51 UTC
is it better with lyx 1.6.0_beta3 ?
Comment 16 Rafał Mużyło 2008-06-05 11:18:41 UTC
It's hard to tell, as I haven't tested 1.6.0beta.
I tend to stay away from betas, unless there's a very good reason not to,
like there's no such thing as a stable version of the package or stable is so far behind svn, that 100% svn is a better route.

And anyway, I don't see that file in 1.6.0 svn tree.
Comment 17 Leonardo Valeri Manera 2008-06-05 11:20:03 UTC
(In reply to comment #15)
> is it better with lyx 1.6.0_beta3 ?
> 

I've been using a live svn ebuild i made for the 1.6 branch for a while now - all combinations of pch, boost and monolithic (think kdeenablefinal) seem to work correctly.
Comment 18 pavel sanda 2008-06-05 11:24:49 UTC
i was talking about  http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-office/lyx/lyx-1.6.0_beta3.ebuild
and gcc 4.3.

as far 1.5.6 unless you raise this issue on lyx devel list, its very unprobable this is going to be fixed.
Comment 19 Rafał Mużyło 2008-06-05 11:32:42 UTC
> as far 1.5.6 unless you raise this issue on lyx devel list, its very unprobable
> this is going to be fixed.
> 
Could you please do it, cause you're already acknowledged there ?
Comment 20 pavel sanda 2008-06-05 11:38:19 UTC
i have already asked 4.3 people to confirm your last report and they haven't 
suceeded. if this doesn't reappear in 1.6 i'm not going to spend more time on it,
so its up to you.
Comment 21 Rafał Mużyło 2008-06-05 12:03:00 UTC
Well, only thing I've done was:
EXTRA_ECONF="--without-included-boost --disable-pch" emerge lyx
That was enough to trigger the bug.
And as I said, it's `--disable-pch` part that's important,
cause the precompiled header includes those headers correctly 
at global scope, while abort.cpp file includes them (it seems incorrectly) inside
namespace lyx. That's why I had that problem in comment 4, cause there was no ::abort when those headers were included in lyx namespace.
Comment 22 pavel sanda 2008-08-29 18:30:27 UTC
pch is disabled in 1.6 ebuilds and we are not going to change it in 1.5 -> closing
Comment 23 Alexis Ballier gentoo-dev 2008-09-05 08:02:16 UTC
(In reply to comment #22)
> pch is disabled in 1.6 ebuilds and we are not going to change it in 1.5 ->
> closing

moreover i've had build problems when enabling pch in 1.6 series; but let's wait until 1.6 is officially out to close this one as for now the best visible lyx version still has the issue.
Comment 24 Alexis Ballier gentoo-dev 2008-11-10 13:37:46 UTC
(In reply to comment #23)
> (In reply to comment #22)
> > pch is disabled in 1.6 ebuilds and we are not going to change it in 1.5 ->
> > closing
> 
> moreover i've had build problems when enabling pch in 1.6 series; but let's
> wait until 1.6 is officially out to close this one as for now the best visible
> lyx version still has the issue.
> 

lyx 1.6.0 is out and unmasked -> fixed