BlogBuilding KDevplatform, KDevelop and the PHP plugin from SVN Syndicate content

Fri, 03/06/2009 - 01:21

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.

  1. # I hope these are all, it's been a time since I did that the last time
  2. # please report if anything is missing
  3. aptitude install kdebase-dev kdelibs5-dev kdebase-workspace-dev \
  4. libqt4-dev build-essential subversion kdesdk-scripts
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:

  1. aptitude remove kdevplatform
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:

  1. . ~/.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 SVN (see also Using Subversion with KDE on techbase):

  1. cs # cs is not a typo! see above
  2. svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevplatform
  3. svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop
  4. svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php
  5. svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/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).

  1. cs kdevplatform
  2. cmakekde
  3. cs kdevelop
  4. cmakekde
  5. cs php
  6. cmakekde
  7. cs php-docs
  8. cmakekde
  9. 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:

  1. cs kdevplatform
  2. svn up && make install
  3. cs kdevelop
  4. svn up && make install
  5. cs php
  6. svn up && make install
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 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

Hi. I tried the kdevelop’s Fri, 03/06/2009 - 06:43 — Emil Sedgh (not verified)

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.

it’s trunk kdevelop is Fri, 03/06/2009 - 10:48 — Niko (not verified)

  • it’s trunk
  • kdevelop is alpha
  • php is not even alpha

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

Actually, KDevelop is already Fri, 03/06/2009 - 12:27 — Milian Wolff

Actually, KDevelop is already in Beta. And if you look at their C++ support this is more than justified.

You must not forget that Fri, 03/06/2009 - 12:24 — Milian Wolff

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.

kdevelop4-extra-plugins is Fri, 03/06/2009 - 08:44 — Sergei Beilin (not verified)

kdevelop4-extra-plugins is really in svn://anonsvn.kde.org/home/kde/trunk/playground/devtools/kdevelop4-extra-plugins/

Yes of course! Thanks for the Fri, 03/06/2009 - 12:20 — Milian Wolff

Yes of course! Thanks for the heads up, I fixed the article.

The shell scripts doesn’t Fri, 03/06/2009 - 12:13 — Kris Daniel (not verified)

The shell scripts doesn’t really work with jaunty… I would of been really interested in doing some testing

“doesn’t really work” is a Fri, 03/06/2009 - 12:21 — Milian Wolff

“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.

Thanks for the instructions, Sat, 03/07/2009 - 22:20 — Anonymous (not verified)

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?

Fixed, thanks for the Sun, 03/15/2009 - 13:07 — Milian Wolff

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.

Feedback trying to follow the Wed, 03/18/2009 - 05:09 — Larry Garfield (not verified)

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:

  1. Could not find module FindKDevPlatform.cmake or a configuration file for
  2. package KDevPlatform.
  3.  
  4. Adjust CMAKE_MODULE_PATH to find FindKDevPlatform.cmake or set
  5. KDevPlatform_DIR to the directory containing a CMake configuration file for
  6. KDevPlatform. The file will have one of the following names:
  7.  
  8. KDevPlatformConfig.cmake
  9. kdevplatform-config.cmake
  10.  
  11. -- Looking for include files HAVE_VALGRIND_H
  12. -- Looking for include files HAVE_VALGRIND_H - not found.
  13. -- Assuming existence of the generated parser files for the parser
  14. CMake Error at app_templates/CMakeLists.txt:8 (kdevplatform_add_app_templates):
  15. Unknown CMake command "kdevplatform_add_app_templates".

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. :-) )

Ok, lets try to answer your Wed, 03/18/2009 - 11:42 — Milian Wolff

Ok, lets try to answer your questions:

  • the SVN error is out of my league, could be due to a Anon-SVN failure, it’s sometimes down.
  • once I’m home I will adapt the cmakekde to make beep optional ;-) I use it to get a hint once the make process has finished.
  • I will adapt the paragraph about cmakekde to prevent future mix-ups
  • for SVN integration see this aritcle: http://techbase.kde.org/Getting_Started/Build/KDE4#Required_packages_from_your_distribution I linked to it from my article, but you might have missed it. E.g. for Kubuntu: http://techbase.kde.org/Getting_Started/Build/KDE4/Kubuntu_and_Debian#kdevplatform
  • Seems like I’m missing makeobj in the dependency list, I’ll investigate once I’m home. But your CMake error looks more like you are trying to compile kdevelop before compiling kdevplatform - is that true? Or you have not properly setup your paths (see the file which should get into .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.

OK, comments it is for Thu, 03/19/2009 - 03:19 — Larry Garfield (not verified)

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.

Try installing Thu, 03/19/2009 - 11:08 — Milian Wolff

Try installing kdesdk-scripts, it contains the makeobj we need.

So I removed Sat, 03/21/2009 - 03:30 — Larry Garfield (not verified)

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.)

Dunno why it looks for the Sun, 03/22/2009 - 14:19 — Milian Wolff

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 :)

Thank you so much for this Sat, 03/28/2009 - 12:45 — Frans Kuipers (not verified)

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:

  1. sudo vi|nano|kate /etc/apt/sources.list
and uncomment these 2 lines:
  1. deb http://nl.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
  2. deb-src http://nl.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
Now update/upgrade your system and install the extra packages libsvn-dev and kdelibs5-dev:
  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install libsvn-dev kdelibs5-dev

Now it was working and including the subversion libraries.

Yes, as I have written in my Sat, 03/28/2009 - 15:49 — Milian Wolff

Yes, as I have written in my article :P But nice to hear that it worked for you.

I had upgraded my system & Mon, 03/30/2009 - 08:43 — Frans Kuipers (not verified)

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:-)

I know, I’m a pesky little Mon, 03/30/2009 - 09:51 — Milian Wolff

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…

I am experiencing a similar Thu, 04/02/2009 - 11:38 — Patrick Allaert (not verified)

I am experiencing a similar problem to Larry Garfield on my Gentoo box (kdesdk-scripts-4.2.1 is installed):

While compiling kdevelop:

  1. $ cmakekde
  2. -- Found Qt-Version 4.5.0 (using /usr/bin/qmake)
  3. -- Found X11: /usr/lib/libX11.so
  4. -- Adding /home/ext039/projects/compiled/kde4/share/apps/cmake/modules to CMAKE_MODULE_PATH
  5. -- Phonon Version: 4.3.0
  6. -- Found KDE 4.2 include dir: /usr/include
  7. -- Found KDE 4.2 library dir: /usr/lib
  8. -- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
  9. -- Found automoc4: /usr/bin/automoc4
  10. -- Assuming existence of the generated parser files for the parser
  11. CMake Error at app_templates/CMakeLists.txt:8 (kdevplatform_add_app_templates):
  12. Unknown CMake command "kdevplatform_add_app_templates".
  13.  
  14.  
  15. -- Configuring incomplete, errors occurred!
  16. ...

Thanks for your help and for enabling PHP development inside the KDE world. Patrick

Have you properly build and Thu, 04/02/2009 - 14:12 — Milian Wolff

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!

ok dude put this code in you Fri, 07/10/2009 - 08:52 — Dany (not verified)

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_…

  1. macro(kdevplatform_add_app_templates _templateNames)
  2. foreach(_templateName ${ARGV})
  3.  
  4. get_filename_component(_tmp_file ${_templateName} ABSOLUTE)
  5. get_filename_component(_baseName ${_tmp_file} NAME_WE)
  6. if(WIN32)
  7. set(_template ${CMAKE_CURRENT_BINARY_DIR}/${_baseName}.zip)
  8. else(WIN32)
  9. set(_template ${CMAKE_CURRENT_BINARY_DIR}/${_baseName}.tar.bz2)
  10. endif(WIN32)
  11.  
  12.  
  13. file(GLOB _files "${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}/*")
  14. set(_deps)
  15. foreach(_file ${_files})
  16. get_filename_component(_fileName ${_file} NAME)
  17. string(COMPARE NOTEQUAL ${_fileName} .kdev_ignore _v1)
  18. string(REGEX MATCH "\\.svn" _v2 ${_fileName} )
  19. if(WIN32)
  20. string(REGEX MATCH "_svn" _v3 ${_fileName} )
  21. else(WIN32)
  22. set(_v3 FALSE)
  23. endif(WIN32)
  24. if ( _v1 AND NOT _v2 AND NOT _v3 )
  25. set(_deps ${_deps} ${_file})
  26. endif ( _v1 AND NOT _v2 AND NOT _v3 )
  27. endforeach(_file)
  28.  
  29. add_custom_target(${_baseName} ALL DEPENDS ${_template})
  30.  
  31. if(WIN32)
  32. add_custom_command(OUTPUT ${_template}
  33. COMMAND zip ARGS -r
  34. ${_template} .
  35. -x .svn _svn .kdev_ignore
  36. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
  37. DEPENDS ${_deps}
  38. )
  39. else(WIN32)
  40. add_custom_command(OUTPUT ${_template}
  41. COMMAND tar ARGS -c -C ${CMAKE_CURRENT_SOURCE_DIR}/${_templateName}
  42. --exclude .kdev_ignore --exclude .svn
  43. -j -f ${_template} .
  44. DEPENDS ${_deps}
  45. )
  46. endif(WIN32)
  47.  
  48.  
  49. #install( FILES ${_templateName}/${_templateName}.kdevtemplate
  50. # DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates )
  51. #install( FILES ${_templateName}/${_templateName}.png
  52. # DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard )
  53. install( FILES ${_template} DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates )
  54. macro_additional_clean_files(${_template})
  55.  
  56. endforeach(_templateName)
  57. endmacro(kdevplatform_add_app_templates)

Hi, could you tell me what Fri, 07/10/2009 - 11:51 — Milian Wolff

Hi, could you tell me what you need that patch for? What’s not working without it?

Great! Just got it working Sun, 05/10/2009 - 23:03 — Lafriks (not verified)

Great! Just got it working looks very good… one thing that I noticed what was quite strange is that in such code:

  1. $app = new TApplication();
  2. $app->Session->open();
  3. $app->OnBeginRequest = 'Application_OnBeginRequest';
  4. $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!! :)

Yep, that’s a limitation in Mon, 05/11/2009 - 16:01 — Milian Wolff

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.

Hi Milian, I recently Fri, 07/03/2009 - 13:33 — Rian Orie (not verified)

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!

Hi, I used a lot of times Sun, 08/23/2009 - 13:04 — Falchest (not verified)

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.

I bet that as soon as we Sun, 08/23/2009 - 16:16 — Milian Wolff

I bet that as soon as we release the first alpha someone will create a package. So stay tuned.

Hey, i use debian Sun, 09/06/2009 - 00:17 — Ratko (not verified)

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&amp;, const KDevelop::SimpleRange&amp;, 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?

The “problem” is that the PHP Sun, 09/06/2009 - 05:48 — Milian Wolff

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.

if someone creates packages Wed, 09/16/2009 - 23:36 — Anonymous (not verified)

if someone creates packages for ubuntu i guess there will be much more testers.

Ahhh, ok. Well, thx Milian Sun, 09/06/2009 - 19:44 — Ratko (not verified)

Ahhh, ok. Well, thx Milian and i’m really looking forward to it.

How to install the XDebug Fri, 10/23/2009 - 20:37 — scummos (not verified)

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

Hi, I tried to run this Sun, 11/08/2009 - 19:00 — Jurian Sluiman (not verified)

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?

Hi, I tried to run this Sun, 11/08/2009 - 23:49 — Jurian Sluiman (not verified)

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?

Ok, nevermind. Don’t know Mon, 11/09/2009 - 19:14 — Jurian Sluiman (not verified)

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…

Looks like you didn’t logout Tue, 11/10/2009 - 14:23 — Anonymous (not verified)

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.”

Well, I have logged out and Thu, 11/12/2009 - 00:08 — Jurian Sluiman (not verified)

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.

I think you hit a known bug, Thu, 11/12/2009 - 15:17 — Milian Wolff

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.

Hi, in ubuntu karmic, Wed, 11/18/2009 - 23:37 — Marc (not verified)

Hi, in ubuntu karmic, compilation is OK but when i launch kdevelop, i hav a segmentation fault. Any idea ?

  1. Application: KDevelop (kdevelop), signal: Segmentation fault
  2. The current source language is "auto; currently c".
  3. [KCrash Handler]
  4. #5 _int_malloc (av=0x7f00a758ee40, bytes=112) at malloc.c:4404
  5. #6 0x00007f00a729e7ee in *__GI___libc_malloc (bytes=112) at malloc.c:3638
  6. #7 0x00007f00a7af564d in operator new(unsigned long) () from /usr/lib/libstdc++.so.6
  7. #8 0x00007f00a7f84d86 in ?? () from /usr/lib/libQtGui.so.4
  8. #9 0x00007f00a7f8536b in QImage::QImage(int, int, QImage::Format) () from /usr/lib/libQtGui.so.4
  9. #10 0x00007f00a7f85bdb in QImage::copy(QRect const&) const () from /usr/lib/libQtGui.so.4
  10. #11 0x00007f00a7f85ffb in QImage::detach() () from /usr/lib/libQtGui.so.4
  11. #12 0x00007f00a7f870c5 in QImage::bits() () from /usr/lib/libQtGui.so.4
  12. #13 0x00007f00a93dab75 in KIconEffect::colorize(QImage&, QColor const&, float) () from /usr/lib/libkdeui.so.5
  13. #14 0x00007f00ab3c9ce7 in WorkingSet (this=<value optimized out>, id=<value optimized out>, icon=<value optimized out>) at /home/kde-devel/kde/src/kdevplatform/shell/workingsetcontroller.cpp:675
  14. #15 0x00007f00ab3ccabd in KDevelop::WorkingSetController::getWorkingSet (this=0x26f7ab0, id=) at /home/kde-devel/kde/src/kdevplatform/shell/workingsetcontroller.cpp:137
  15. #16 0x00007f00ab3d235d in KDevelop::WorkingSetController::areaCreated (this=0x26f7ab0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=<value optimized out>)
  16. at /home/kde-devel/kde/src/kdevplatform/shell/workingsetcontroller.h:276
  17. #17 KDevelop::WorkingSetController::qt_metacall (this=0x26f7ab0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=<value optimized out>)
  18. at /home/kde-devel/kde/build/kdevplatform/shell/workingsetcontroller.moc:350
  19. #18 0x00007f00a8ca3ddc in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
  20. #19 0x00007f00a53edbf2 in Sublime::Controller::areaCreated (this=0x60938, _t1=0x26f8fa0) at /home/kde-devel/kde/build/kdevplatform/sublime/controller.moc:165
  21. #20 0x00007f00a53ef31d in Sublime::Controller::addDefaultArea (this=0x272d270, area=0x26f8fa0) at /home/kde-devel/kde/src/kdevplatform/sublime/controller.cpp:224
  22. #21 0x00007f00ab3f3a44 in UiControllerPrivate (this=0x272d7d0, controller=<value optimized out>) at /home/kde-devel/kde/src/kdevplatform/shell/uicontroller.cpp:79
  23. #22 0x00007f00ab3f1995 in UiController (this=0x272d270, core=0x26ebea0) at /home/kde-devel/kde/src/kdevplatform/shell/uicontroller.cpp:173
  24. #23 0x00007f00ab3ed734 in KDevelop::CorePrivate::initialize (this=0x26ee2d0, mode=KDevelop::Core::Default) at /home/kde-devel/kde/src/kdevplatform/shell/core.cpp:102
  25. #24 0x0000000000405904 in main (argc=<value optimized out>, argv=<value optimized out>) at /home/kde-devel/kde/src/kdevelop/app/main.cpp:148

All but the PHP plugin build Sun, 11/29/2009 - 03:27 — vmatherly (not verified)

All but the PHP plugin build fine for me with Karmic. Can you point me in the right direction?

  1. Building CXX object parser/CMakeFiles/kdev4phpparser.dir/generated/phpparser.o
  2. /home/vmatherly/projects/kde4/php/parser/generated/phpparser.cpp: In member function ‘void Php::Parser::reportProblem(Php::Parser::ProblemType, const QString&)’:
  3. /home/vmatherly/projects/kde4/php/parser/generated/phpparser.cpp:81: error: ‘class KDevelop::Problem’ has no member named ‘setSeverity’
  4. /home/vmatherly/projects/kde4/php/parser/generated/phpparser.cpp:81: error: ‘Error’ is not a member of ‘KDevelop::ProblemData’
  5. /home/vmatherly/projects/kde4/php/parser/generated/phpparser.cpp:84: error: ‘class KDevelop::Problem’ has no member named ‘setSeverity’
  6. /home/vmatherly/projects/kde4/php/parser/generated/phpparser.cpp:84: error: ‘Warning’ is not a member of ‘KDevelop::ProblemData’
  7. /home/vmatherly/projects/kde4/php/parser/generated/phpparser.cpp:87: error: ‘class KDevelop::Problem’ has no member named ‘setSeverity’
  8. /home/vmatherly/projects/kde4/php/parser/generated/phpparser.cpp:87: error: ‘Hint’ is not a member of ‘KDevelop::ProblemData’
  9. make[2]: *** [parser/CMakeFiles/kdev4phpparser.dir/generated/phpparser.o] Error 1
  10. make[1]: *** [parser/CMakeFiles/kdev4phpparser.dir/all] Error 2
  11. make: *** [all] Error 2
  12. kbuildsycoca4 running...

You are using a too old Sun, 11/29/2009 - 13:00 — Milian Wolff

You are using a too old kdevplatform, or - my guess - you have still some packages installed. Remove them and re-build.

So, I’ve been a happy user of Mon, 11/30/2009 - 15:14 — Anonymous (not verified)

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

yes, kdevelop moved to Tue, 12/01/2009 - 16:51 — Milian Wolff

yes, kdevelop moved to extragear. updated.

please update with new svn Mon, 11/30/2009 - 18:05 — jay (not verified)

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)

php parser compiles finaly Mon, 11/30/2009 - 18:41 — jay (not verified)

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 :) ).

You should generally do that, Tue, 12/01/2009 - 16:54 — Milian Wolff

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.

thanks, did so. Tue, 12/01/2009 - 16:54 — Milian Wolff

thanks, did so.

Hi, did anybody have any Fri, 12/11/2009 - 02:12 — Anonymous (not verified)

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:

  1. ...
  2. Fetching external item into 'kdevplatform/plugins/quickopen/expandingtree'
  3. svn: warning: Network connection closed unexpectedly

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 ?

Today everything works. Now i Sat, 12/12/2009 - 03:51 — Anonymous (not verified)

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 .

no problem, glad that it Sat, 12/12/2009 - 18:06 — Milian Wolff

no problem, glad that it works for you. I imagined it was some kind of anonsvn hickup, happens far too often :-/

I’m getting the same error. Sun, 12/20/2009 - 10:15 — Angel Angelov (not verified)

I’m getting the same error. What can I do? Wait?

yes, please be patient. Sun, 12/20/2009 - 18:21 — Milian Wolff

yes, please be patient.

Same problem here. I have Thu, 01/14/2010 - 03:42 — Gnurou (not verified)

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.

works for me, and I’m sorry Thu, 01/14/2010 - 18:37 — Milian Wolff

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

Just tried again today and it Fri, 01/15/2010 - 04:23 — Gnurou (not verified)

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.

I’ve been setting up two Fri, 01/29/2010 - 17:45 — mschnee (not verified)

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.

Oh bummer - thanks for the Sun, 01/31/2010 - 13:32 — Milian Wolff

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.

OMG! The PHP plugin is Tue, 02/02/2010 - 11:57 — tom (not verified)

OMG! The PHP plugin is freaking amazing :D

Thank you so much xxx

Hey Great Plugin;) Using it Tue, 02/09/2010 - 02:44 — tobias (not verified)

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” ?

Great to hear that it seems Tue, 02/09/2010 - 15:35 — Milian Wolff

Great to hear that it seems to help you on your work. To answer your questions:

  • The official repository is in extragear, see the link up there in the article.
  • I dunno what message exactly you mean with “including new projects” but most probably you can simply ignore it. Restarting KDevelop means opening Projects anew hence it parses every file and looks for changes. Note that - if no change is found - it doesn’t do much if anything at all. Maybe there is one thing or another that could still be improved, but it should even now be much faster on consecutive KDevelop starts (when it didn’t crash) compared to the initial start.
  • Bugs should be reported on bugs.kde.org - when asked for a component insert “php” in the search line and select “Language Support: PHP”.
  • There is no official website for the PHP plugin, you should probably simply read the Planet KDE or aggregate Niko’s (nsams) and mine blogs.

Thanks, for answering! Yeah Wed, 02/10/2010 - 04:23 — tobias (not verified)

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!

If you try to compile fresh Sun, 02/21/2010 - 23:00 — Anonymous (not verified)

If you try to compile fresh svn kdevplatform and get error like : <code>geshi:code|missing file attica/something.h|code</code> install libattica.dev .

Is there a build of the php Thu, 03/04/2010 - 21:44 — Anonymous (not verified)

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

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options