Building KDevplatform, KDevelop and the PHP plugin from Git
In a follow up to my last post about the PHP plugin for KDevelop and Quanta I want to detail how I setup my build environment. Since I’m only working on KDevelop I only want to compile that. For all other applications, I use the packages my distribution makes available. Below you this is possible.
Note: I use Kubuntu and hence some commands like aptitude
and the package names etc. will have to be adapted to your specific distribution. But the general idea should be the same and the packages should be called at least somewhat similar. You could always take a look at the techbase article on compilation of KDE 4 to get a more general HowTo.
It is generally a very good idea to read some articles on the techbase. Especially in the Getting Started section.
getting the dependencies
First, you’ll need to install some packages to satisfy dependencies and to get a working compile chain (think cmake, gcc and stuff). The following command only lists very few packages but they have a huge list of dependencies which your package manager will take into account automatically. Don’t be suprised by a possibly huge list of packages ;-) So some disk space will be required (though I doubt it’s more than 250MB in total).
Note: You’ll need the KDE 4.2.x versions of the KDE libraries and development packages. When you use Kubuntu, you can follow this article to get up to date packages for the 8.10 release.
# I hope these are all, it's been a time since I did that the last time
# please report if anything is missing
aptitude install kdelibs5-dev kdebase-workspace-dev \
libqt4-dev build-essential subversion kdesdk-scripts \
bison flex
removing old cruft
To prevent binary compatibility issues that will result in crashes, you have to remove all KDevelop & KDevplatform packages provided by your package maintainer. In karmic it should be enough to remove kdevplatform, and it will remove all dependent packages:
aptitude purge kdevplatform libsublime
setting up your environment
Inspired by the techbase article on improved productivity in KDE4, particularly the bashrc listed there, I’ve come up with the following way to configure my system:
First visit my shell helper git repo on GitHub and download the two files kde4_setup_build_environment.sh
and bash_setup_kde4_programming
.
set the environment variables
Move the file kde4_setup_build_environment.sh
to ~/.kde/env
and make it executable. You might want to adapt the paths for the variables KDE_BUILD
, KDE_SRC
and KDEDIR
inside that file to your likings.
This part is required to make sure that compiled programs will act just like normal programs installed globally (e.g. with your package manager) right from the start of your KDE session. I.e. KRunner works fine and custom plugins are found etc.
make your life easier with some bash magic
Now alter your ~/.bashrc
and to the bottom of that file add the following line:
. ~/.bash_setup_kde4_programming
NOTE: This assumes that you saved the afore mentioned bash_setup_kde4_programming
file to ~/.bash_setup_kde4_programming
. You might have to change the path.
NOTE: That file also sources the above script to set the environment variables. I’m not sure it’s required, but it doesn’t hurt. So make sure the path is correct there.
Now to the fun part
Once all that’s done, you have to log out of your bash session to get the environments. Maybe even logout of your KDE session to make it aware of the new paths as well.
checking out KDevplatform, KDevelop and the PHP plugin
Get the latest and greatest directly from Git Master (see also git.kde.org Manual on techbase). But first make sure you setup the Git URL prefixes, by putting the following into your ~/.gitconfig
file:
[url "git://anongit.kde.org/"]
insteadOf = kde:
[url "git@git.kde.org:"]
pushInsteadOf = kde:
Now checkout the sources:
cs # cs is not a typo! see above
git clone kde:kdevplatform
git clone kde:kdevelop
# if you only want KDevelop, you can stop here. The rest is for PHP
git clone kde:kdevelop-pg-qt
git clone kde:kdev-php
git clone kde:kdev-php-docs
compiling and installing
Now it’s time to compile all that code you just checked out. Hopefully you got all required dependencies. If you need all bells and whistles, you’ll have to install some more packages I’m sure. If you run the code below, take a good look at the output of the cmakekde
command (especially at the beginning). It lists not-found dependencies.
Note: cmakekde
is supposed to be run from inside your source folder (e.g. cs $FOLDER; cmakekde
).
for p in kdevplatform kdevelop kdevelop-pg-qt php php-docs; do
cs $p
cmakekde
done;
kbuildsycoca4 # make sure new plugins etc. are found
Pretty easy, hum? Let’s hope everything worked fine :)
staying up to date
That above command is only required once. Everytime after that, you can simply do the following which will make sure you are running the latest and greatest:
for p in kdevplatform kdevelop kdevelop-pg-qt php php-docs; do
cs $p
git pull --rebase && make install
done
The End
Hope I have not forgotten anything and that this (rather lengthy…) HowTo is of some help to a few of you out there. Looking forward to feature requests, bug reports etc.
UPDATE 30/03/11: updated to git.kde.org location
UPDATE 18/05/10: updated to include kdevelop-pg-qt
, introduced for
loops in setup snippets
UPDATE 07/05/10: updated to git locations
UPDATE 08/01/10: updated to extragear location of php & php-docs
UPDATE 01/12/09: added php-docs, updated to extragear location of kdevplatform & kdevelop.
UPDATE 17/12/09: updated to kdereview location of php & php-docs
Comments
Want to comment? Send me an email!
Comment by Eric Drechsel (not verified) (2011-03-30 23:26:00)
Changes:
For quanta:
After that, the build went through
Comment by handy spionage Programm gibt es hier (not verified) (2012-10-29 01:30:00)
Thanks for any other fantastic article. Where else could anybody get that type of information in such an ideal method of writing? I have a presentation next week, and I am on the look for such information.
Comment by Eric Drechsel (not verified) (2011-03-30 23:25:00)
Changes:
For quanta:
After that, the build went through
Comment by jay (not verified) (2010-10-28 11:39:00)
development continues on branch 1.1 what was the source of most of compiling bugs.
example for kdevplatform
git clone git://gitorious.org/kdevelop/kdevplatform.git
cs kdevplatform/
git branch -a // to check available branches
git checkout remotes/origin/1.1 or git checkout -t remotes/origin/1.1 // -t creates local tracked branch. without it its detached branch
If you get PHP::php error while compiling php, delete .build/kde4/php, and try again, and again, and again. This time I was succesfull on the 4th compile :)
Comment by Thales Oliveira (not verified) (2010-09-18 05:24:00)
Holy… this is so hard to install :(
Comment by Milian Wolff (2010-09-18 20:20:00)
Not really. And if you don’t want to develop it: just install it from your package manager, as KDevelop and the PHP plugin are both released in stable versions.
Comment by kompresory (not verified) (2010-08-23 14:39:00)
thank you for this manual
Comment by jay (not verified) (2010-08-15 18:33:00)
Milian, this is not for kde bugs, but for this how-to. Maybe some upgrade ?
A long time I was not able to compile kdev*, quanta, php.
Qjson became dependancy, not only optional. Cmake couldn’t find qjson/parse.h . Only thing worked :
sudo ln -s /opt/kdev/compiled/kde4/include/qjson/ /usr/include/
Comment by Milian Wolff (2010-08-17 00:43:00)
no, QJSON is a pure optional dependency. Make sure you remove your build folders and rerun cmake again. And the howto should still work.
Comment by Rok (not verified) (2010-06-29 09:40:00)
I try to compile from a021093263065ffd024bcbf623e1f2dca0a689d9 (22. 6. 2010) but I get an error:
Kind regards,
Rok
Comment by Milian Wolff (2010-06-29 18:16:00)
just got fixed, in future direct such complaints/bug reports to #kdevelop on irc or bugs.kde.org.
Comment by jay (not verified) (2010-05-28 07:34:00)
php parser doesn’t recognize 5.3 features.
goto, namespaces
Haven’t tryed yet lambda functions, closures and other new features.
Where could i report such missing things? (Sorry I don’t know C++, so I’m unable to help you code directly.)
Comment by Milian Wolff (2010-06-21 11:00:00)
http://bugs.kde.org
but this is known and being worked on.
Comment by Pete (not verified) (2010-05-28 03:56:00)
Hey Milian,
Having duchain test errors when attempting to build from latest master (on a new install). Noticed you commited some changes today, so I checked out revision 5eeca105404b3519f064422f860c004ab7cb5d1c and that built just fine.
Errors received from building from master are below.
Thanks!
Comment by Milian Wolff (2010-06-21 11:00:00)
Remove your build folder and compile again.
Comment by jay (not verified) (2010-05-18 12:53:00)
to compile today you need also :
And then compile php.
But even that is not enough - 2 errors:
I don’t know why.
Comment by Milian Wolff (2010-05-18 22:05:00)
Yes, will update the article. Thanks for reminding me.
And regarding the errors: Clear the
.moc
files (e.g.:find /opt/kdev/.build/kde4/php/ -name "*.moc" -delete
) and runmake install
again. They are probably outdated and won’t get updated automatically by cmake or something strange like that. I mean I don’t have such namespace clashes andDUChainTestBase
is in KDevplatform for quite some time now…Comment by jay (not verified) (2010-05-19 09:50:00)
thanks, worked. (deleted the whole .build :) )
When will xdebug & css move to git ? (or will they ever ? )
Comment by head (not verified) (2010-05-07 11:56:00)
As fisrt, thank you for this manual!
but kdevelop has switched from svn to git so you should update your article, remove svn and add:
Comment by Milian Wolff (2010-05-07 15:15:00)
done, thanks for the heads up
Comment by jay (not verified) (2010-05-03 17:58:00)
For those who have the same problem as GT above: variables not updating on other steps and breakpoints.
You need to change xdebug/variablecontroller.cpp and compile again. tail should look like this:
PS: This is the first piece of C++ code I ever wrote, so it’s most probably garbage. But it works for me. (The event condition is that it should take only debugger stops.)
Comment by Niko Sams (not verified) (2010-05-07 16:54:00)
thanks for your patch, please post it in future on the kdevelop-devel mailinglist or bugs.kde.org.
The problem is now fixed in svn.
Comment by GT (not verified) (2010-03-23 13:21:00)
Hi!
I’m currently using kdevelop for php development, but i have problems with debugging: - the variable panel won’t update when i doing steps after stop - mostly the request running very slow thru the code (much slower then eclipse php plugin) - the request stops somewhere in the code so the browser have open connection forever, however the final content flushed to browser. If i refresh the page, the debug session restrating properly.
I’m using PHP 5.2.13 and the latest xdebug from svn. I’m guessing maybe this combot isn’t best for the kdevelop plugin. Is there any recommanded php and/or xdebug version? If there is, i’m willing to switch to it for better debug sessions.
Thanks
Comment by Niko Sams (not verified) (2010-05-07 16:52:00)
should be fixed now.
The php/xdebug version should be fine. Please report any bugs/wishes you find at bugs.kde.org
Niko
Comment by Anonymous (not verified) (2010-03-04 21:44:00)
Is there a build of the php plugin in any repositories? I’ve updated to kdevplatform 4.4.1 in kubuntu 9.10. I was hoping the php plugin would be available somewhere by now in whatever state it’s in
Comment by Anonymous (not verified) (2010-02-21 23:00:00)
If you try to compile fresh svn kdevplatform and get error like :
install libattica.dev .
Comment by tobias (not verified) (2010-02-10 04:23:00)
Thanks, for answering! Yeah plugin helps me a lot ;) I have had some troubles with Eclipse under Windows.. but that’s an other story ;) Now under Linux Eclipse runs fine, but KDevelop 4 (with PHP) is nicer so I develop currently with KDevelop 4(PHP), very cool ;)
About the Messages in the KDevelop 4 starting process I can say, your are right, it checks the files and if there is anything changed the file content will be checked… Good to know that there are Problem with crashed KDevelop. But nice it’s fast, fast enough for me!
Also good to know where I can follow the development of PHP plugin.
Thanks for all!
Comment by tobias (not verified) (2010-02-09 02:44:00)
Hey Great Plugin;)
Using it also for working on some Projects, works great. But is there an other official repository for the Plugin .. I think I have read something about an extra temp. git repository? And is it normal, that everytime KDevelop is starting it checks again all projects, at the terminal, can I read something about “including new projects” that’s sounds for me like it will including existing projects as new projects, is this normal because it is under development or is this appearing because there is something broken?
With friendly greets, and thanks for the great plugin! Works good! Where can I post bugs / on official bug tracker ? and is this the up to date web-page about the state of kdevelop 4 plugin “php” ?
Comment by Milian Wolff (2010-02-09 15:35:00)
Great to hear that it seems to help you on your work. To answer your questions:
Comment by tom (not verified) (2010-02-02 11:57:00)
OMG! The PHP plugin is freaking amazing :D
Thank you so much xxx
Comment by mschnee (not verified) (2010-01-29 17:45:00)
I’ve been setting up two different systems for development here in the office, one gentoo based and one ubuntu based. I don’t use [Gentoo] Portage to build kdevelop (I don’t want all the extras stuff that emerge wants to pull in) so I stick to subversion. No problems compiling and installing the plugin on the gentoo system, however the ubuntu system fails because it cannot find <valgrind/callgrind.h>. The gentoo system had valgrind installed already, the ubuntu system didn’t. One
apt-get install valgrind; cs php; cmakekde
later, it builds fine.It looks like it’s just a dependency issue. I don’t know how cmake works - never cared to learn, actually ;) - however, it seems that if it’s possible to list valgrind as some kind of dependency or required package, it should be added. It’s entirely possible that most people who are compiling this plugin already have valgrind, but if it’s a dep, it should be listed as such.
Comment by Milian Wolff (2010-01-31 13:32:00)
Oh bummer - thanks for the report. I fixed it. This was a plain optional dependency that was only useful for developers anyways. When you update, you won’t need valgrind anylonger.
Comment by Anonymous (not verified) (2009-12-11 02:12:00)
Hi, did anybody have any problem with switching to new svn ? I get an error when try to copy files from svn. But it happens only on my one pc, but on other everything goes right. I know that it has to be my system vault. But i don’t know where is the problem. Here is what i get when try to copy or update files from kdevplatform svn
after
svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevplatform
:Of course later i can’t compile kdeplatform cause of missing parts. I’ve deleted everything with kdev from my system and kdevplatform old config files. Any ideas what’s wrong ? Network connection ? Svn settings ?
Comment by Gnurou (not verified) (2010-01-14 03:42:00)
Same problem here. I have been trying to checkout the source for 3 days but always get this error and thus cannot compile the source.
Comment by Milian Wolff (2010-01-14 18:37:00)
works for me, and I’m sorry but problems with anonsvn are out of my reach. You could try to contact the KDE sysadmins: https://bugs.kde.org/enter_sysadmin_request.cgi
Comment by Gnurou (not verified) (2010-01-15 04:23:00)
Just tried again today and it worked. Looks like the external item that is fetched into ‘plugins/quickopen/expandingtree’ is only randomly accessible, for what it’s worth.
But finally, can’t wait to get it compiled and try it again! :) I was very impressed by the features of the last beta, only the random crashes prevented me to use it on a daily basis. But once things get stable again, I cannot imagine how huge an event the 4.0 release of Kdevelop will be. Thanks a lot guys.
Comment by Angel Angelov (not verified) (2009-12-20 10:15:00)
I’m getting the same error. What can I do? Wait?
Comment by Milian Wolff (2009-12-20 18:21:00)
yes, please be patient.
Comment by Anonymous (not verified) (2009-12-12 03:51:00)
Today everything works. Now i can use kdevelop on my all machines. I don’t know what has changed, but the most important is that i use kdevelop again. PS. Sorry for not using right syntax for code in previous comment .
Comment by Milian Wolff (2009-12-12 18:06:00)
no problem, glad that it works for you. I imagined it was some kind of anonsvn hickup, happens far too often :-/
Comment by jay (not verified) (2009-11-30 18:05:00)
please update with new svn paths
svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevplatform
svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop
(phpparser currently doesn’t compile)
Comment by Milian Wolff (2009-12-01 16:54:00)
thanks, did so.
Comment by jay (not verified) (2009-11-30 18:41:00)
php parser compiles finaly :)
If you have error like “11/29/2009 - 03:27 — vmatherly”, you need to remove ALL kdev packages with synaptic/apt-get (on ubuntu :) ).
Comment by Milian Wolff (2009-12-01 16:54:00)
You should generally do that, packages will be generally incompatible to kdevelop installed from source. It might/will result in crashes due to binary compatibility issues. I added a paragraph about it, thanks.
Comment by Anonymous (not verified) (2009-11-30 15:14:00)
So, I’ve been a happy user of kdev4 through the above howto and have been updating it about once a week or so.. I try it today and apparently, the svn target doesn’t exist anymore. I went to take a look in the websvn (http://websvn.kde.org/trunk/KDE/) and there’s no kdevplatform or kdevelop anymore.. php however does still work..
Did the reposit move or is this totally me missing something important along the way?
cheers, T
Comment by Milian Wolff (2009-12-01 16:51:00)
yes, kdevelop moved to extragear. updated.
Comment by vmatherly (not verified) (2009-11-29 03:27:00)
All but the PHP plugin build fine for me with Karmic. Can you point me in the right direction?
Comment by Milian Wolff (2009-11-29 13:00:00)
You are using a too old kdevplatform, or - my guess - you have still some packages installed. Remove them and re-build.
Comment by Marc (not verified) (2009-11-18 23:37:00)
Hi, in ubuntu karmic, compilation is OK but when i launch kdevelop, i hav a segmentation fault. Any idea ?
Comment by Milian Wolff (2009-11-22 16:03:00)
libc 2.10 issue: https://bugs.kde.org/show_bug.cgi?id=206775
Comment by Anonymous (not verified) (2009-11-10 14:23:00)
Looks like you didn’t logout from your kde and cs couldn’t work. After restart cs was known for your kde.
“Once all that’s done, you have to log out of your bash session to get the environments. Maybe even logout of your KDE session to make it aware of the new paths as well.”
Comment by Jurian Sluiman (not verified) (2009-11-12 00:08:00)
Well, I have logged out and even rebooted the whole system. But well, everything works fine now :)
I have another issue to mention. I don’t know if it’s a bug in the php plugin or just something else, but I think it’s worth to post it here (is there a bug tracker for specific the php plugin?). I use the Zend Framework to write my php applications. We (at my company) have our own library besides the Zend library. Now we write our controllers extending the company’s library action controller. This action controller extends the Zend action controller (so CustomController extends CompanyController extends ZendController).
Inside the CustomController we use (of course) some methods defined in ZendController. The highlighting marks them as a “semantic problem” (uncheck the checkbox at the configuration window doesn’t highlight them anymore). When I open the CompanyController, reload it (F5), open the ZendController, reload it (F5): the highlighting of the semantic problem is vanished. Apperently the plugin is unable to find the method itself, but walking through the overloaded classes (where the plugin can find the parent classes without any problem) it resolves the problem.
Comment by Milian Wolff (2009-11-12 15:17:00)
I think you hit a known bug, but I always though reloading the file with the semantic problems alone should make it vanish. Do you have full-project parsing enabled? Has the project-parsing finished?
Also please report bugs to http://bugs.kde.org , when asked for a component search (via the line edit) for Language Support: PHP.
Comment by Jurian Sluiman (not verified) (2009-11-08 23:49:00)
Hi, I tried to run this installer at an old Kubuntu Intrepid box but that was too old (required a more decent KDE version). Now I recently upgraded to Karmic which causes another problem: the workspace-dev package isn’t available anymore! Still I tried to continue and loaded the .bash_setup_kde4_programming and that raises no errors. But if I try to execute the cs command, Kubuntu doesn’t recognize it and tells me I should install csound to have the cs command available (which is of course not the right thing to do).
Any tricks about how to make sure the environment is fine for building KDevelop at Kubuntu Karmic?
Comment by Jurian Sluiman (not verified) (2009-11-09 19:14:00)
Ok, nevermind. Don’t know what I did wrong (or what I’m doing well), but the scripts work fine now. Atm it’s compiling so let’s hope. And sorry for the double posts…
Comment by Jurian Sluiman (not verified) (2009-11-08 19:00:00)
Hi, I tried to run this installer at an old Kubuntu Intrepid box but that was too old (required a more decent KDE version). Now I recently upgraded to Karmic which causes another problem: the workspace-dev package isn’t available anymore! Still I tried to continue and loaded the .bash_setup_kde4_programming and that raises no errors. But if I try to execute the cs command, Kubuntu doesn’t recognize it and tells me I should install csound to have the cs command available (which is of course not the right thing to do).
Any tricks about how to make sure the environment is fine for building KDevelop at Kubuntu Karmic?
Comment by scummos (not verified) (2009-10-23 20:37:00)
How to install the XDebug plugin for kdevelop:
cs
svn co svn://anonsvn.kde.org/home/kde/trunk/playground/devtools/kdevelop4-extra-plugins/xdebug
svn co svn://anonsvn.kde.org/home/kde/trunk/playground/devtools/kdevelop4-extra-plugins/executebrowser
svn co svn://anonsvn.kde.org/home/kde/trunk/playground/devtools/kdevelop4-extra-plugins/executescript
cs executescript
vim CMakeLists.txt
After line 27 (starting with target_link_libraries(…) add a line containing: ${KDE4_KIO_LIBS}
cmakekde
cs executebrowser
cmakekde
cs xdebug
cmakekde
Good luck! :p
Comment by Ratko (not verified) (2009-09-06 19:44:00)
Ahhh, ok. Well, thx Milian and i’m really looking forward to it.
Comment by Ratko (not verified) (2009-09-06 00:17:00)
Hey,
i use debian experimental and have tried to compile the php plugin. kdevelop4 comes with debian, so i only downloaded the php plugin from svn.
if i do:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
and then
make
i get:
Building CXX object duchain/CMakeFiles/kdev4phpduchain.dir/classdeclaration.o /usr/src/kde/php/duchain/classdeclaration.cpp: In constructor ‘Php::ClassDeclaration::ClassDeclaration(const KDevelop::SimpleRange&, KDevelop::DUContext )’: /usr/src/kde/php/duchain/classdeclaration.cpp:35: error: no matching function for call to ‘KDevelop::ClassDeclaration::ClassDeclaration(Php::ClassDeclarationData &, const KDevelop::SimpleRange&, KDevelop::DUContext&)’
/usr/include/kdevplatform/language/duchain/classdeclaration.h:98: note: candidates are: KDevelop::ClassDeclaration::ClassDeclaration(const KDevelop::SimpleRange&, KDevelop::DUContext*)
/usr/include/kdevplatform/language/duchain/classdeclaration.h:97: note: KDevelop::ClassDeclaration::ClassDeclaration(KDevelop::ClassDeclarationData&)
/usr/include/kdevplatform/language/duchain/classdeclaration.h:96: note: KDevelop::ClassDeclaration::ClassDeclaration(const KDevelop::ClassDeclaration&)
what could be the problem?
Comment by Milian Wolff (2009-09-06 05:48:00)
The “problem” is that the PHP plugin is still bleeding edge. You need kdevplatform + kdevelop from trunk to use it.
If you want toutilize kdevelop + kdevplatform packages you’ll have to wait for the next beta. We’ll release some kind of alpha with that for sure.
Comment by Anonymous (not verified) (2009-09-16 23:36:00)
if someone creates packages for ubuntu i guess there will be much more testers.
Comment by Falchest (not verified) (2009-08-23 13:04:00)
Hi, I used a lot of times subversion to compile and install some programs, but there are a lot of people not so experienced to do it, or they run away scared all the have to do to install a sumple plugin when in other aplications (firefox for example) the do it with just a click.
Why dont somebody create a compiled version of the plugin? A .deb and .rpm… It is not neccesary to do it in each version of the plugin, just one time in two months or something like that.
It would be very nice, because there are a lot of people than used kdevelop for code in php, and a lot of them (some friends of mine) are “migrating” to others applications as netbeans, eclipse, etc.
Finally I could not say bye without thank you for your work and efforts answering everybody. A lot of thanks.
Comment by Milian Wolff (2009-08-23 16:16:00)
I bet that as soon as we release the first alpha someone will create a package. So stay tuned.
Comment by Rian Orie (not verified) (2009-07-03 13:33:00)
Hi Milian,
I recently upgraded to Kde4 and was all ready to go test me some kdevelop with integrated php.. but it kept crashing as soon as I tried to create a new project. It took me a few minutes to figure out I was still running on kdevelop 3.5 and had to find a specific kdevelop 4 binary.
pretty cool so far! It SUCH a relieve to finally be able to develop in something native!
Comment by Lafriks (not verified) (2009-05-10 23:03:00)
Great! Just got it working looks very good… one thing that I noticed what was quite strange is that in such code: Session->open(); $app->OnBeginRequest = ‘Application_OnBeginRequest’; $app->run(); ?>
First two $app are correctly recognized as TApplication type variables but last two as string variables… I can think of that is because of prado framework implementation of setters/getters but I think it’s quite common one. Keep up good work.. if such behavior could be detected by parser I would right away switch to KDevelop for developing in php :) Really looking forward on this.. And again thank you for great work!! :)
Comment by Milian Wolff (2009-05-11 16:01:00)
Yep, that’s a limitation in the declaration builder right now. Please report a bug on bugs.kde.org so we can track it properly.
Comment by Patrick Allaert (not verified) (2009-04-02 11:38:00)
I am experiencing a similar problem to Larry Garfield on my Gentoo box (kdesdk-scripts-4.2.1 is installed):
While compiling kdevelop:
Thanks for your help and for enabling PHP development inside the KDE world. Patrick
Comment by Dany (not verified) (2009-07-10 08:52:00)
ok dude put this code in you FindKDevPlatform.cmake file, in my case y was found here /usr/share/kde4/apps/cmake/modules
i was find this code here
http://patches.ubuntu.com/by-release/debian/k/kdevplatform/kdevplatform_…
Comment by Milian Wolff (2009-07-10 11:51:00)
Hi, could you tell me what you need that patch for? What’s not working without it?
Comment by Milian Wolff (2009-04-02 14:12:00)
Have you properly build and installed KDevplatform? The makro is defined in
kdevplatform/cmake/modules/KDevPlatformMacros.cmake
.Also make sure your environment is setup properly, i.e. cmake finds the above file once it’s installed. You can achieve that by following the article under “setting up your environment”.
Good luck!
Comment by Frans Kuipers (not verified) (2009-03-30 08:43:00)
I had upgraded my system & installed packages as you wrote.
But still it complained about kdelibs <4.2.0. So I had to activate inteprid backports & upgrade kde before it worked. Libsvn-dev is not in your article.
Thanks again:-)
Comment by Milian Wolff (2009-03-30 09:51:00)
I know, I’m a pesky little know-it-all but I explicitly link to http://www.kubuntu.org/news/kde-4.2. And SVN support is optional thus I haven’t added it to my article ;-)
But nevermind, hope to get some bug reports in. Though first I have to get back to programming, been lacking on time recently…
Comment by Frans Kuipers (not verified) (2009-03-28 12:45:00)
Thank you so much for this tutorial. I was able to install KDevelop on my Kubuntu 8.10 inteprid notebook.
I had to install some extra/newer packages before cmakekde could finish and include subversion: First of all we need the kdelibs >= 4.2.0, only available in the intrepid-backports repository. Uncomment these lines in /etc/apt/sources.list:
and uncomment these 2 lines:
Now update/upgrade your system and install the extra packages libsvn-dev and kdelibs5-dev:
Now it was working and including the subversion libraries.
Comment by Milian Wolff (2009-03-28 15:49:00)
Yes, as I have written in my article :P But nice to hear that it worked for you.
Comment by Larry Garfield (not verified) (2009-03-18 05:09:00)
Feedback trying to follow the above instructions:
Every time I did a checkout from svn, the first time I got an error that the specified revision was not found. When I repeated the exact same command, it worked fine. Curious.
When I run cmakekde, I get told that “beep” is a dependency. Weird. :-) I aptitude install it, but it won’t run because I’m not in the audio group.
It’s unclear from the instructions that I should not run cmakekde before cs kdevplatform and so forth. It’s obvious that’s what you mean now that I figured it out, but I thought I needed to run it first to check for not-found dependencies. (Remember, non-C++ person here.)
Not directly relevant necessarily, but it looks like the svn dev libraries are not included on my system at present so it skips the subversion integration. Could you add whatever that package is to the list at the start of the instructions? Not PHP-related but it’s just one of those “well of course it makes sense to have” things. :-)
Part way through the first cmakekde, I get a fatal error because makeobj cannot be found. At the suggestion of the script I install simutrans-makeobj and rerun cmakekde. It doesn’t run for very long but gives me what looks like the usage instructions for makeobj. Continuing on to the next steps I get an error:
And at that point I stop. :-(
(Let me know if there’s some other way you want feedback; I figure blog comments are not always the best communication mechanism. :-) )
Comment by Milian Wolff (2009-03-18 11:42:00)
Ok, lets try to answer your questions:
.kde/env
).PS: comments are fine, I follow them regularly. If you’d prefer mail you can find my address on the contact page. There are also some other possibilities listed there.
Comment by Larry Garfield (not verified) (2009-03-19 03:19:00)
OK, comments it is for now.
What it looks like to me is that something in the build script is not calling makeobj correctly, so the cs kdevplatform call (which is finding subversion now, thanks!) is not completing properly. That’s why I’m getting a prompt from makeobj with its proper syntax. Then when I try to compile kdevelop, kdevplatform is not compiled so it can’t complete.
So the question is why makedev is not running correctly. Anything else I should check? I just tried redownloading the two scripts from github to not avail.
Comment by Milian Wolff (2009-03-19 11:08:00)
Try installing
kdesdk-scripts
, it contains the makeobj we need.Comment by Larry Garfield (not verified) (2009-03-21 03:30:00)
So I removed simulatrans-makeobj and installed kdesdk-scripts instead. That failed with an error looking for makeobj in /usr/games/makeobj. I do not know why, since /usr/bin/makeobj existed. For now I symlinked it to /usr/games/makeobj until that gets fixed, and all three compile processes were able to complete. I had to open a file a few times to get it to catch, but I did just get a syntax completion popup so it appears to be working. Woohoo! Thanks!
Now that we know the steps to test, where do you want bug reports filed? (I want to blog this over to some PHP circles as well to get more testers if I can.)
Comment by Milian Wolff (2009-03-22 14:19:00)
Dunno why it looks for the executable in
/usr/games
… But your workaround sounds good.Regarding bugs: You can use http://bugs.kde.org. Make sure to use the kdevelop “product” and the “Language Support: PHP”.
Looking forward to your bug reports :)
Comment by Anonymous (not verified) (2009-03-07 22:20:00)
Thanks for the instructions, this project seems very promising. However I noticed few typos in instructions: cs php should be: cs kdevelop4-extra-plugins/php
and kbuildsycocy4 should be: kbuildsycoca4
I started kdevelop from compile dir. I found PHP from the new project wizard, but I couldn’t find it from the plugins configuration. Should it be there? Also everything PHP related was hidden somewhere (or missing).
Is there some way to make sure that the plugin is really loaded and functioning properly?
Comment by Milian Wolff (2009-03-15 13:07:00)
Fixed, thanks for the report.
And no - you won’t find PHP in the plugin configuration (mainly because there’s nothing to configure right now). That’s also why “everything PHP related was hidden” - actually there’s nothing PHP related in the GUI so far.
Simply open up a PHP file in KDevelop. If you get fancy highlighting with the neato-popups on hover over declarations and the fancy code completion, the PHP plugin is working.
Comment by Kris Daniel (not verified) (2009-03-06 12:13:00)
The shell scripts doesn’t really work with jaunty… I would of been really interested in doing some testing
Comment by Milian Wolff (2009-03-06 12:21:00)
“doesn’t really work” is a very bad error description. Tell me what exactly goes wrong (error messages? which shell script(s)?). Then I might help you.
Comment by Sergei Beilin (not verified) (2009-03-06 08:44:00)
kdevelop4-extra-plugins is really in svn://anonsvn.kde.org/home/kde/trunk/playground/devtools/kdevelop4-extra-plugins/
Comment by Milian Wolff (2009-03-06 12:20:00)
Yes of course! Thanks for the heads up, I fixed the article.
Comment by Emil Sedgh (not verified) (2009-03-06 06:43:00)
Hi.
I tried the kdevelop’s php plugin last week, but now im back to kate.these are the reasons:
1) when you open a php project, you really expect to have options which are useful for it.in my experience, i had lots and lots of buttons like build and execute and such which are not for php.a huge amount of menu and toolbar options you dont need.
2)openning dialogs like find and replace makes the kdevelop winow bigger so it goes below the panel.that drives me crazy.
3) Kate’s krunner plugin which lets you type alt+f2 + session name is so handy.i wish there was something like that for kdevelop.
Comment by Milian Wolff (2009-03-06 12:24:00)
You must not forget that KDevelop is not really meant for webdevelopment. What you are looking for is Quanta of the next generation. But I have to tell you that’s simply not here yet.
I myself still use Kate most of the time for webdevelopment at work. But I really miss all those neat stuff we do with the PHP plugin (think sane auto completion, phpdoc integration etc.). One day all the above should work properly though :) Stay tuned.
Comment by Niko (not verified) (2009-03-06 10:48:00)
so you can expect bugs, unfinished stuff and broken stuff.
But hiding that build stuff for projects that can’t build is a must.
Niko
Comment by Milian Wolff (2009-03-06 12:27:00)
Actually, KDevelop is already in Beta. And if you look at their C++ support this is more than justified.