KDevelop安装配置流程详解.
kdevelop是需要在kde环境下使用的!!!!!!!
NOTE: This is a copy of a page in our Wiki, please consult it for the most
recent version of this document. See:
http://www.kdevelop.org/mediawiki/index.php?title=KDevelop_4/compiling&action=edit
The way to download, compile, install and run KDevelop depends on how you want
to download it and where do you want to install it to.
So follow the step by step instructions below.
== 1. Get the requirements ==
:Make sure to install the required KDE development packages, see
http://www.kdevelop.org/mediawiki/index.php/KDevelop_4/requirements
for a list of requirements.
In particular make sure to install KDE4 kdelibs development packages:
kdelibs-devel, kdeworkspace-devel (or build from sources).
:”’WARNING:”’ You have to remove all KDevelop/KDevplatform/Sublime packages
provided by your distribution. If you don’t do that, binary compatibility issues
will eventually lead to crashes and undefined behavior. To make sure, you can
search for KDevelop libraries with this command:
:
find /usr/ -type f -name “*kdev*.so*”
:If no results are returned, you should be on the safe side.
== 2. Get the sources (assumes ”$HOME/src” but you can replace it with
something else) ==
* By downloading it to ”$HOME/src”
** download ”kdevplatform.tar.bz2” and ”kdevelop.tar.bz2” from
http://download.kde.org/download.php?url=unstable/kdevelop/
** unpack them:
cd $HOME/src
tar xvjf kdevplatform.tar.bz2
tar xvjf kdevelop.tar.bz2
* ”’Or”’, by getting the latest sources directly out of the SVN server
svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevplatform $HOME/src/kdevplatform
svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop $HOME/src/kdevelop
== 3. Configure and install KDevPlatform ==
::In both cases you need set the KDEDIRS environment variable to point to the
installation directory of both KDE4 and KDevPlatform.
::This will tell KDE core components where to search for plugins and other data
related to KDE apps and contains just a list of paths (aka prefixes) where KDE
libraries and/or applications have been installed.
::Assuming that you have the KDE4 libraries installed in ”/usr” (these are
often from packages and installed in ”/usr” or ”/opt/kde” and is distro
specific, if unsure ask your distro where it is), you’ll have to append it to
the KDEDIRS below.
* To be installed with the system libraries (you ”’need root permissions”’ to
do this)
mkdir -p $HOME/src/kdevplatform/build
cd $HOME/src/kdevplatform/build
cmake ../ #可能报错,可能的解决办法在下边error
make #需要一段时间等待吧
sudo make install
export KDEDIRS=/usr/local:/usr
kbuildsycoca4
* ”’Or”’, to be installed locally on ”$HOME/kdevelop4” but you can replace
it with something else (you do ”’not need root permissions”’ to do this)
mkdir -p $HOME/src/kdevplatform/build
cd $HOME/src/kdevplatform/build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/kdevelop4 ../
make
make install
export KDEDIRS=$HOME/kdevelop4:/usr
kbuildsycoca4
== 4. Configure and install KDevelop ==
* To be installed with the system libraries (you ”’need root permissions”’ to
do this)
mkdir -p $HOME/src/kdevelop/build
cd $HOME/src/kdevelop/build
cmake ../
make
sudo make install
kbuildsycoca4
* ”’Or”’, to be installed locally on ”$HOME/kdevelop4” but you can replace
it with something else (you do ”’not need root permissions”’ to do this)
mkdir -p $HOME/src/kdevelop/build
cd $HOME/src/kdevelop/build
cmake -DCMAKE_PREFIX_PATH=$HOME/kdevelop4 -DCMAKE_INSTALL_PREFIX=$HOME/kdevelop4 ../
make
make install
::In this case you need set the KDEDIRS environment variable to point to the
installation directory of both KDE4, KDevPlatform and KDevelop.
::This will tell KDE core components where to search for plugins and other data
related to KDE apps and contains just a list of paths (aka prefixes) where KDE
libraries and/or applications have been installed.
::Assuming that you have the KDE4 libraries installed in ”/usr” (these are
often from packages and installed in ”/usr” or ”/opt/kde” and is distro
specific, if unsure ask your distro where it is) and that you want to install
KDevelop4 into ”$HOME/kdevelop4” then you need to:
export KDEDIRS=$HOME/kdevelop4:/usr
kbuildsycoca4
== 5. Get and install plugins (optional) ==
If you need extra functionality, you can get and install additional plugins for
KDevelop4 at [[KDevelop 4/compiling/plugins]].
== 7. Run KDevelop ==
* If installed in the system
kdevelop
* ”’Or”’, if installed in ”$HOME/kdevelop4” local directory
$HOME/kdevelop4/bin/kdevelop
This assumes you’re running KDevelop4 from a terminal and not via the run dialog
or via a menu entry, if you want that to work you need to find out how to set
environment for the whole X11 session – thats usually distro-specific.
== 8. Contact the development team, or report bugs or wishes ==
:If you find any compile problems with KDevelop4 please don’t report them on
bugs.kde.org, please report them on our
[http://www.kdevelop.org/index.html?filename=mailinglist.html developer
mailing-list] instead.
:The [http://bugs.kde.org/ bugzilla bug database] is only for bugs, and
”’not”’ for compilation issues.
== 9. Keeping it up-to-date with the latest fixes ==
:If you got the sources from SVN on step 2. then you can update by issuing the
following commands:
* with ”’root permissions”’ do this
cd $HOME/src/kdevelop/build && sudo make uninstall
cd $HOME/src/kdevplatform/build && sudo make uninstall
svn up .. && make && sudo make install
kbuildsycoca4
cd $HOME/src/kdevelop/build
svn up .. && make && sudo make install
kbuildsycoca4
* ”’Or”’ if installed in local directory
cd $HOME/src/kdevelop/build && make uninstall
cd $HOME/src/kdevplatform/build && make uninstall
svn up .. && make && make install
kbuildsycoca4
cd $HOME/src/kdevelop/build
svn up .. && make && make install
kbuildsycoca4
You can also see the
[http://www.kdevelop.org/index.html?filename=4.0/ChangeLog_kdevplatform.html
latest changes and bug fixes of KDevPlatform] and the
[http://www.kdevelop.org/index.html?filename=4.0/ChangeLog.html latest changes
and fixes of KDevelop] on-line, updated every hour.
******************************************error*************************************************
== 3. 出现问题
[root@localhost kdevelop-4.4.1]# cd build/
[root@localhost build]# cmake ../
*******
CMake Warning (dev) at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:436 (include):
A logical block opening on the line
/usr/share/kde4/apps/cmake/modules/KDELibsDependencies.cmake:3 (if)
closes on the line
/usr/share/kde4/apps/cmake/modules/KDELibsDependencies.cmake:5 (endif)
with mis-matching arguments.
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindKDE4.cmake:81 (FIND_PACKAGE)
CMakeLists.txt:12 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
– Phonon Version: 4.3.1
– Found Phonon: /usr/lib64/libphonon.so
– Found Phonon Includes: /usr/include/KDE;/usr/include
– Performing Test _OFFT_IS_64BIT
– Performing Test _OFFT_IS_64BIT – Success
– Performing Test HAVE_FPIE_SUPPORT
– Performing Test HAVE_FPIE_SUPPORT – Success
– Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
– Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL – Success
– Performing Test __KDE_HAVE_GCC_VISIBILITY
– Performing Test __KDE_HAVE_GCC_VISIBILITY – Success
– Found KDE 4.3 include dir: /usr/include/kde4
– Found KDE 4.3 library dir: /usr/lib64/kde4/devel
– Found the KDE4 kconfig_compiler4 preprocessor: /usr/bin/kconfig_compiler4
– Found automoc4: /usr/bin/automoc4
CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1195 (message):
ERROR: the installed kdelibs version 4.3.4 is too old, at least version
4.5.0 is required
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindKDE4.cmake:81 (FIND_PACKAGE)
CMakeLists.txt:12 (find_package)
– Configuring incomplete, errors occurred!
解决办法:安装kdevplatform-0.10.0.tar.bz2吧,地址:http://download.kde.org/unstable/kdevelop/3.10.0/src/
**********************************参考资料**********************************************
http://techbase.kde.org/Projects/KDevelop4/HowToCompile