When emerging kdebase, the following error occurs. As a result; kde cannot be compiled. In file included from xftlex.l:27, from xftlex-kfi.c:23: xftint.h:392: parse error before '*' token make[4]: *** [xftlex-kfi.lo] Error 1 make[4]: *** Waiting for unfinished jobs.... In file included from xftgram.y:29, from xftgram-kfi.c:23: xftint.h:392: parse error before '*' token In file included from xftgram-kfi.c:23: /usr/share/bison.simple: In function `KfiXftConfigparse': /usr/share/bison.simple:443: warning: implicit declaration of function `KfiXftConfiglex' make[4]: *** [xftgram-kfi.lo] Error 1 make[4]: Leaving directory `/var/tmp/portage/kdebase-3.0.4/work/kdebase-3.0.4/kcontrol/kfontinst/kfontinst' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/kdebase-3.0.4/work/kdebase-3.0.4/kcontrol/kfontinst' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/kdebase-3.0.4/work/kdebase-3.0.4/kcontrol' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/kdebase-3.0.4/work/kdebase-3.0.4' make: *** [all] Error 2 !!! ERROR: The ebuild did not complete successfully. !!! Function kde_src_compile, Line -6648, Exitcode 2 !!! died running emake, kde_src_compile:make
i can confirm this exact behaviour... fresh install from iso and stage 3 tarball... same error message.
The following solution /does/ work: * emerge xfree 4.2.0 * emerge kde and all other packages needed * unemerge xfree 4.2.0 * emerge xfree 4.2.1.
*** Bug 9469 has been marked as a duplicate of this bug. ***
It might work for you, but not for me. hehe. I did the following: emerge unemerge xfree 4.2.1 emerge xfree 4.2.0 (also tried xfree-4.2.0) I got: Calculating dependencies..... emerge: There are no masked or unmasked ebuilds to satisfy "xfree 4.2.0". What now?
type this (literally): emerge unmerge xfree emerge =x11-base/xfree-4.2.0-r12 emerge kde emerge unmerge =x11-base/xfree-4.2.0-r12 emerge =x11-base/xfree-4.2.1
Thanks! Now I just have to wait on ibiblio.org to come back up! Man, I love Gentoo. And it's got immediate tech support. In case someone else forgot... THANKS! For all your hard work. All your help, knowledge, etc.
The merging trick is not a real fix... It will break emerge -e world, because it doesn't make KDE instantly like XFree86 4.2.1.. So how do we do that, anyone have an idea for a real fix?
It's a workaround, not a fix ;)
Well, we need a fix then... :)
Well, I can't reproduce it, but here's my take on things, after some digging: xfree has a file xftint.h which is used when compiling but for some reason is not installed. kdebase therefore includes its own copy of xftint.h in kcontrol/kfontinst/kfontinst. However this copy is outdated and doesn't work well with xfree 4.2.1. If we replace it with the copy that comes with xfree 4.2.1 itself, it should work. But: the copy that comes with kdebase is different from that revision in the xfree cvs. KDE has apparently added some changes of its own. Yuck... kdebase-3.0.4 has xftint.h cvs revision 1.15, plus its own custom changes. xfree-4.2.0-r12 has revision 1.28. xfree-4.2.1 has 1.34. Unfortunately, revision 1.29 brings in Xft2 and fontconfig stuff, so I couldn't make kdebase compile with rev 1.34 (after adding the custom kde changes back in). I've made a version based on 1.28 with the kdebase changes (attached). It compiles with it here; it may or may not fix your problem (hard to say since I still can't reproduce it). Please test it - replace the xftint.h in the kdebase working directory with it and run make. BTW this whole directory was changed radically in the kde 3.1 tree, so no good checking for fixes there. It doesn't even have an xftint.h anymore.
Created attachment 4981 [details] xftint.h 1.28 + kde changes This is the file I'd like you to test.
Created attachment 4982 [details, diff] The custom kde changes to xftint.h rev 1.15
Created attachment 4983 [details] Original xftint.h rev 1.28 for reference
Created attachment 4984 [details] Original xftint.h rev 1.15 for reference For other people's reference, so they don't have to search for these files the way I did
Hi Dan. xfree-4.2.1 has Xft-1.1, not Xft-2.0. It does have the fontconfig stuff however :/ If you need help, just give me a shout. It will take time however to get kde downloaded if that is needed.
Have not tested (used workaround in comment 2), but i'm pretty sure it still won't compile with attachment 4981 [details]. AIUI it fails because |XftValueList| isn't defined, and this type is still used. I tried to extend x11-base/xfree/files/XFree86-4.2.1-Xft11-hack.patch by adding +typedef FcValueList XftValueList; but then it fails with type conflicts (IIRC const vs non-const).
xfree has /usr/include/X11/Xft/Xft.h defining XftValueList, but fcpackage.2_0 overwrites it with a new version not defining XftValueList.
Created attachment 5007 [details] original Xft.h v 1.19 extracted from X420src-1.tgz
Azarah: I know it doesn't have xft2, that's exactly why the xftint.h which has xf2 stuff in it can't be used. 1@c07.de: you're probably right, I must have lost track of the various revs. Making a good header is difficult when I can't reproduce the problem ion the first place. Could you or someone else test the various headers and try to come up with one that works?
I'm not an expert in this area, but here's what i believe after digging around: kfontinst has it's own copy of parts of Xft, but relies on matching global include files. But after emerging xfree 4.2.1 these files have been replaced with incompatible ones contained in fcpackage.2_0. I've successfully compiled kfontinst (a simple make in its directory) after making these changes: - Copy xc/lib/Xft/Xft.h and xc/lib/Xft/XftFreetype.h from X420src-1.tgz to kcontrol/kfontinst/kfontinst in kdebase. - Change references in kcontrol/kfontinst/kfontinst/ to use the local copies of Xft.h and XftFreetype.h. 3 files include them: xftint.h, XftConfig.cpp, XftConfigEditor.cpp. Additionally, XftFreetype.h includes Xft.h. This must also made to use the local copy. I don't know if it actually will run or do the right thing, but basically it has the same effect as building it with xfree 4.2.0 installed and upgrading to 4.2.1 later. BTW, the declaration causing the parse error is never used, but commenting it out is not enough. There are type mismatches with both KDE's xftint.h and attachment 4981 [details], and KDE's XftConfig.cpp still fails to compile.
*** Bug 9738 has been marked as a duplicate of this bug. ***
My previous comment is an outline for a possible patch to kdebase. If you look for an easy workaround you can just temporarily replace /usr/include/X11/Xft/Xft.h by attachment 5007 [details] (the xfree 4.2.0 version of it) while emerging kdebase.
HUH? **n00b alert!** I am getting the same error. Newly installed system with 1.4 iso and stage1 and trying to emerge kde 3.0.4. What exactly do I do to fix this? Too many people offering up too many suggestions with explanations that I am sure most of you understand, but are a little in a grey area for me... A summary would be very helpful for me. :) Thanks.
*** Bug 9777 has been marked as a duplicate of this bug. ***
*** Bug 9831 has been marked as a duplicate of this bug. ***
*** Bug 9686 has been marked as a duplicate of this bug. ***
*** Bug 9765 has been marked as a duplicate of this bug. ***
William: # cd /usr/include/X11/Xft # mv Xft.h Xft.h.save # wget -O Xft.h 'http://bugs.gentoo.org/showattachment.cgi?attach_id=5007' # emerge kde # mv Xft.h.save Xft.h
*** Bug 9876 has been marked as a duplicate of this bug. ***
I don't know if this helps, but kde 3.0.4 merged fine with xfree 4.2.1 installed on my gentoo 1.2 system.
Nevermind. It appears I merged kde 3.0.4 before xfree 4.2.1 was merged. It breaks the same way if kde is merged after X. Sorry for the confusion.
Why is it that everyone but me seems to be able to reproduce this?... Sorry to leave this hanging, I spent the last 2 days recompiling KDEs for the new BIC qt and only now reached kde 3.0.4 again. I've changed the kdebase-3.0.4 ebuild to apply the changes outlined in comment #20. I'm making this into a masked kdebase-3.0.4-r1 ebuild for now. Once I'm sure it's ok I'll backport it to the 3.0.4 ebuild (since it's a compile fix a new revision isn't really needed). I still can't reproduce the problem myself. So please, everyone test kdebase-3.0.4-r1! Tests with xfree 4.2.0 (or earlier, or xdirectfb) appreciated also. If it compiles for you, please make sure kfontinst actually works as well (it's the Font Installer module in kcontrol).
Curse that linebreaking bug! Here it is again, with hardcoded linebreaks: Why is it that everyone but me seems to be able to reproduce this?... Sorry to leave this hanging, I spent the last 2 days recompiling KDEs for the new BIC qt and only now reached kde 3.0.4 again. I've changed the kdebase-3.0.4 ebuild to apply the changes outlined in comment #20. I'm making this into a masked kdebase-3.0.4-r1 ebuild for now. Once I'm sure it's ok I'll backport it to the 3.0.4 ebuild (since it's a compile fix a new revision isn't really needed). (I still can't reproduce the problem myself.) So please, everyone test kdebase-3.0.4-r1! Tests with xfree 4.2.0 (or earlier, or xdirectfb) appreciated also. If it compiles for you, please make sure kfontinst actually works as well (it's the Font Installer module in kcontrol).
Ok, its a one liner to /usr/X11R6/include/X11/Xft/Xft.h. In attatched patch. Ill update xfree as soon as we can get it verified.
Created attachment 5188 [details, diff] xft_h-kdebase-fix.patch
Created attachment 5189 [details, diff] xft_h-kdebase-fix.patch Ok, im stupid, had the thing reversed. Here is the proper one.
Created attachment 5190 [details, diff] xft_h-kdebase-fix.patch Ok, im stupid, had the thing reversed. Here is the proper one.
Martin, your patch prevents the parse error, but there are other errors: In file included from kcm_fontinst_la.all_cpp.cpp:41: XftConfig.cpp: In function `void printTest(QCString&, XftTest*, bool)': XftConfig.cpp:279: ambiguous overload for `QCString& += const FcChar8*&' operator /usr/qt/3/include/qcstring.h:222: candidates are: QCString& QCString::operator+=(const char*) <near match> /usr/qt/3/include/qcstring.h:223: QCString& QCString::operator+=(char) <near match> In file included from kcm_fontinst_la.all_cpp.cpp:41: XftConfig.cpp: In function `CXftConfig::TEntry* createEntry(char*)': XftConfig.cpp:557: invalid conversion from `char*' to `const FcChar8*' In file included from kcm_fontinst_la.all_cpp.cpp:41: XftConfig.cpp: In member function `CXftConfig::TEntry* CXftConfig::findFamilyEntry(const QString&, const char*)': XftConfig.cpp:783: invalid conversion from `const FcChar8*' to `const char*' XftConfig.cpp:783: initializing argument 1 of `static int CMisc::stricmp(const char*, const char*)' In file included from kcm_fontinst_la.all_cpp.cpp:41: XftConfig.cpp: In function `void XftTestDestroy(XftTest*)': XftConfig.cpp:801: invalid conversion from `const void*' to `void*' In file included from kcm_fontinst_la.all_cpp.cpp:44: XftConfigEditor.cpp: In member function `CXftConfig::TEntry* CXftConfigEditor::display(CXftConfig::TEntry*)': XftConfigEditor.cpp:472: invalid conversion from `const FcChar8*' to `char*' In file included from kcm_fontinst_la.all_cpp.cpp:44: XftConfigEditor.cpp: In member function `bool CXftConfigEditor::getValue(XftValue&, const QString&, const QString&, bool)': XftConfigEditor.cpp:658: invalid conversion from `char*' to `const FcChar8*' XftConfigEditor.cpp:661: invalid conversion from `const FcChar8*' to `char*' XftConfigEditor.cpp:663: invalid conversion from `const FcChar8*' to `char*' XftConfigEditor.cpp:750: invalid conversion from `char*' to `const FcChar8*' XftConfigEditor.cpp:751: invalid conversion from `const FcChar8*' to `char*' make: *** [kcm_fontinst_la.all_cpp.lo] Error 1 I've already tried this some days ago (see comment 16).
Created attachment 5191 [details, diff] kde-xft1.1-fix.patch Ok, spoke too soon. KDE itself need some attention. This patch fixes it, and should be backward compadible, as it only type cast the Xft only variables.
Yep, sorry, commited while it was still compiling again :P What box you got ? Or was it already on that borkage ? If from scratch .. damn its fast :P
> What box you got ? Duron 700, 128MB, slow hard disk. I made the same patch last week and already noted that it doesn't work. The log is a saved one from previous tries.
Oh, ok. Anyhow, it works if second patch is included (tested this time :P).
At this point being merely interested in getting KDE working, (soon) I'm confused as to which route is currently best. Should I follow the method described in #28? Should I rather merge kdebase-3.0.4-r1 as sugested in #33? Or do I apply the patch in #39, in which case being utterly new to portage I wonder how and when I apply this patch. Is ther some method for instructing portage to merge this patch as part of the "emerge kdebase" process or must I fetch the kdebase sources and unpack them to apply the patch by hand and then have portage merge and build?
Azrah, can you give a description of your patch? I.e. would it work with xfree <4.2, xdirectfb etc. (and how much we should worry about those - you know better than I do). Anyway, I can't test anything since I can't reproduce the problem. If/when you consider the patch to be ok & tested enough, feel free to commit/unmasked a new kdebase.
Dan, its two patches. xft_h-kdebase-fix.patch: Add the missing typedef to Xft.h. This I will include in the xfree ebuild, so dont worry about it. The users who test it, should just make sure they apply it to Xft.h in /usr/X11R6/include/X11/Xft. kde-xft1.1-fix.patch: This should work with any version of xfree. It is a patch to kdebase (cd ${S}; patch -p1 < kde-xft1.1-fix.patch). It does not do much, except type cast the Xft variables that have slightly different types to old Xft, to the ones the KDE expects. Just to note: they are still the same types, in the new Xft.h, they are just 'typedef' as Fc* and not Xft* types. You should really be testing the kde-xft1.1-fix.patch, as it works with new Xft.h in 4.2.1, but not tested with Xft.h from 4.2.0. BTW: I think why you do not get the problem, is because you merged one of the first revisions of 4.2.1, that did not have Xft-1.1 in ...
I've applied attachement 5190 to Xft.h and I fetched Kdebase, uncompressed, and applied attachment 5191 [details, diff]. I then recompressed it and altered the md5 digest. So far emerge has completed kdebase and is in the middle of some other dependancy on it's way to kde. Once the build completes I'll make sure kde is kosher, check kfontinst, and post an update.
I ran into this bug this morning, trying to install a fresh Gentoo 1.4 onto an Athlon 2400+ XP box. Unmasking (in two places!! Keyword + packages.masq ... why masq it in two different places?) and emerging kdebase-3.0.4-r1 fixed the problem, and the installation of kde was able to proceed. This was with xfree 4.2.1, gcc 3.2, Athlon XP, with the following CFLAGS CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
*** Bug 9979 has been marked as a duplicate of this bug. ***
*** Bug 9983 has been marked as a duplicate of this bug. ***
AFTER figuring out how to unmask the keyword (that was just evil) and unmkasking i n package mask, this all now works properly for me.
Azarah: your fix is probably better than mine -r1, because you actually know what you're doing and had the bug in front of you. Can we commit it? It's important to have something working and unmasked ni portage ASAP, this is a major issue. We just need the ebuild to test for xfree 4.2.1 (with your patch) since we don't know what'll happen with earlier versions (or xdirectfb etc). What test would you suggest? And, please make the xfreee 4.2.1 ebuid with the patch in it an 4.2.1-r1 so that people upgrade, and so that we can depend on it. There have been enough fixes since the original 4.2.1 ebuild to warrant that, I think.
Dan, I at least have major issues with fontconfig on gcc3. With gcc-2.95.3 it is stable :( So I think im going to do a 4.2.1-r1 in the next few days that have an unchanged Xft. I will however submit a patch to kdebase that should fix this issue for all versions of xfree.
Ok, kdebase-3.0.4-r2 should be in portage. Please test. Dan, just check that there is nothing that could be problematic with kde eclasses.
Yesterday I announced that I had applied the experimental 3.0.4-r1 ebuild and KDE had built successfully. That was true, but I may have spoken too soon on the positive results. KDE is built, and runs, but it is not very stable. In particular, I can consistently hang the window manager and end up with deadlocked processes that will not go away until the machine is rebooted, if I use kmail to access an IMAP mailbox, and try to delete a mail message. kmail crashes, and the entire desktop hangs soon thereafter (mouse still works, and non-kde apps that are up and running still work, though no new apps will start as they cannot talk to the WM). Since this behavior has only appeared since compiling kde against X 4.2.1 using the experimental ebuild posted here, I suspect it may be related to whatever work around was used (which is why I'm posting this here and not opening a new bug).
kdebase-3.0.4-r2 compiled successfully but ebuild stopped with error since there is no ${FILESDIR}/startkde-${PVR}-gentoo.diff for -r2. (see # startkde script) Just copy ${FILESDIR}/startkde-3.0.4-r1-gentoo.diff under startkde-3.0.4-r2-gentoo.diff and do an ebuild merge.
Azarah: the ebuild is ok AFAICS. There's nothing left to do with kdebase now, right? Everyone, please test r2 if you haven't yet.
I added the missing patch, so all should be well.
3.0.4-r2 built successfully, however it gave me this, while installing: /bin/install -c -p startkde /usr/src/gentoo/tmp/portage/kdebase-3.0.4-r2/image//usr/kde/3/bin/startkde (blah blah Important blah blah) make[2]: Leaving directory `/usr/src/gentoo/tmp/portage/kdebase-3.0.4-r2/work/kdebase-3.0.4' make[1]: Leaving directory `/usr/src/gentoo/tmp/portage/kdebase-3.0.4-r2/work/kdebase-3.0.4' /usr/sbin/ebuild.sh: /usr/src/gentoo/portage/kde-base/kdebase/files/startkde-3.0.4-r2-gentoo.diff: No such file or directory !!! ERROR: The ebuild did not complete successfully. !!! Function src_install, Line -240, Exitcode 1 !!! (no error message) The next day (after doing my nightly emerge rsync system...) I looked at the error, saw the file was there, and did an ebuild install qmerge without problems. The control center seems to working, particularly the font selection. Haven't restarted kde yet.
I got the same build result as Tim. Unlike Tim, I don't know how to fix it. :( Dan.
Daniel: just do an emerge rsync and it should work.
OK, this seems to be fixed. Thanks Azarah :-)
Yes it seems to be working, thanks indeed! :)
WFM too. Thanks!
kdebase-3.0.4-r2 has successfully installed on 3 different machines, and KDE appears to behave properly (no mysterious crashes as with -r1, though I'm only 50% certain that was -r1 related and not something else). It has worked both on an upgraded machine and a fresh install. Thanks to everyone who provided the fix(es)!
*** Bug 10183 has been marked as a duplicate of this bug. ***
I think this bug should be reopened. 3.0.5a is back to doing the exact same thing. Users are neglecting to report it because the forum thread for this bug has been locked.
Hm, I don't see it. The first time I've emerged 3.0.5a something went wrong but the second time everything went smoothly.
Should be fixed with kdebase-3.0.5a-r1 again. Please test and let me know. NOTE: If you have Xft2.0 installed, clicking on: System->Font Installer->Anti-Alias->Advance does make it crash. I am working on this though.
Created attachment 6724 [details, diff] kdebase-3.0.5a-xft2.0-fix.diff Ok, this fixes the segfault for fontconfig enabled Xft, and clicking on: System->Font Installer->Anti-Alias->Advanced Basically just me that casted things improperly with kde-xft1.1-fix.patch, and not checking when I added the Xft2 stuff.
*** Bug 12670 has been marked as a duplicate of this bug. ***
*** Bug 11179 has been marked as a duplicate of this bug. ***
I have just recompiled 3.0.5a and it seems to be working beautifully. Thanks. Recommend closing the bug again for now.
3.05a-r1 seems to do the trick for me.
OK, I guess this is fixed then (again). Thanks Martin!