https://techbase.kde.org/api.php?action=feedcontributions&user=Shevegen&feedformat=atomKDE TechBase - User contributions [en]2024-03-28T08:07:55ZUser contributionsMediaWiki 1.40.2https://techbase.kde.org/index.php?title=Getting_Started/Build/Troubleshooting&diff=21899Getting Started/Build/Troubleshooting2008-03-11T14:42:57Z<p>Shevegen: </p>
<hr />
<div>{{Template:I18n/Language Navigation Bar|Getting_Started/Build/KDE4/Troubleshooting}}<br />
<br />
{{TutorialBrowser|<br />
<br />
series=Getting Started|<br />
<br />
name=Building KDE4 From Source/Troubleshooting|<br />
<br />
pre=[[../|KDE SVN Quickstart Guide]]|<br />
<br />
next=[[../|KDE SVN Quickstart Guide]]|<br />
|<br />
}}<br />
<br />
This page contains some troubleshooting tipe for issues you may encounter while building kde4 from source.<br />
<br />
Many of the issues listed here may be out of date.<br />
<br />
== Issues building kdelibs ==<br />
If you have problems compiling kdelibs, first make sure the software in the [[Getting_Started/Build/KDE4#Software_Requirements|Required Software]] section above is installed and works. Other possible hints include:<br />
* If the <tt>cmakekde</tt> command fails stating that CMake requires an out of source build directory, remove {{path|~/kde/src/KDE/kdelibs/CMakeCache.txt}}, and try again.<br />
<br />
If <tt>cmakekde</tt> still gives the same error then try this <br />
cd<br />
cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR \<br />
-DCMAKE_BUILD_TYPE=debugfull \<br />
-DKDE4_BUILD_TESTS=ON \<br />
~/kde/src/KDE/kdelibs<br />
make<br />
make install<br />
* If you received an error stating "Please create a separate build directory and run 'cmake path_to_kdelibs [options]' there.", then you need to change to your build directory before running cmakekde. (e.g <tt>cs KDE/kdelibs && cb && cmakekde</tt>) If the message stays, run 'svn status' in the kdelibs directory and remove all files labeled with '?'.<br />
* If Qt wasn't found or the wrong version of Qt was found, make sure that the qmake from the Qt you need is the first qmake in the path.<br />
* If qmake wasn't found and you are using Debian packages, /usr/bin/qmake probably points to a wrong qmake version. To fix this run as root:<br />
update-alternatives --config qmake<br />
* If the problems persist, try the CMake make-option <tt>--keep-going</tt>.<br />
* Here you need the libungif library, otherwise you will get an error message like "<tt>Could NOT find GIF</tt>".<br />
* Qt-4.3 upgrade: if you get a link error in kjsembed talking about QScriptEngine, edit CMakeCache.txt in kdelibs and remove the lines that talk about QT_QTUITOOLS_LIBRARY, then type make again (that static library has a new dependency, and the cmake code that adds it needs to run).<br />
* if you get <code>CMake Error: KDE Requires Qt to be built with SSL support<br />
</code>, install openssl-devel, remove CMakeCache.txt and re-compile QT.<br />
* if you get <code>kdelibs/kimgio/ico.cpp:188: undefined reference to `QImage::jumpTable()'</code> it means you compiled QT without QT3 support(no, linking to a true QT3 install won't work)<br />
* if none of the errors above match yours, you might just try a quick'n'dirty <code>make clean</code> in kdelibs.<br />
* if you get "The PCRE regular expression library has not been found >=4.5 " then watch out the http://techbase.kde.org/index.php?title=Getting_Started/Build/KDE4/Kubuntu_and_Debian (Getting Started/Build/KDE4/Kubuntu and Debian-> kdelibs dependancies ->Recommended packages ) or <br />
remove ../.. build/kdelibs <br />
cs KDE/kdelibs<br />
cmakekde<br />
<br />
* [stub] What to do if you have a problem like kde-config.cpp:56: undefined reference to `KLocalizedString::~KLocalizedString()' and <br />
/Depot/Temp/kdelibs-4.0.2/kdecore/kde-config.cpp:197: undefined reference to `KConfigGroup::readPathEntry(char const*, QString const&) const' and kde-config.cpp:66: undefined reference to `ki18n(char const*)'?<br />
Seems to happen with some localization stuff<br />
<br />
<br />
<br />
== Issues building kdepimlibs ==<br />
If you have trouble compiling kdepimlibs:<br />
* the cmakekde command may require a later version of the gpgme library. This is available from the project's web site: http://www.gnupg.org/download/index.html - please note that the build of gpgme also requires libgpg-error, also available from the same location. Both libraries are installed by the "./configure", "make" and "sudo make install" sequence, with the gpgme library configured with the additional "--with-gpg-error-prefix" parameter. You may need to overwrite your existing "/usr/bin/gpgme-config" file with the newer version for the kdepimlibs to pick up the new install.<br />
<br />
== Issues building kdebase ==<br />
If you have troubles compiling kdebase:<br />
* XINE is needed to compile kdebase-runtime<br />
* Make sure you have the <tt>libxss headers</tt> installed. (Usually you got undefined references on xscreensaver objects if you do not have those headers)<br />
* <tt>which meinproc</tt> has to deliver {{path|/home/kde-devel/kde/bin/meinproc}}<br />
* if cmakekde can not find the path of kdepimlibs, edit the file {{path|$KDE_BUILD/KDE/kdebase/CMakeCache.txt}} and manually set <tt>KDEPIMLIBS_INCLUDE_DIR:PATH=$KDE_BUILD/kdepimlibs</tt><br />
* if you get an error saying "Please set the following variables: X11_XTest_LIB (ADVANCED)", install the devel package of <tt>Xtst</tt>. On some systems, this is packaged separately from <tt>xext</tt> and called <tt>x11proto-xext-dev</tt> or <tt>libxtst-dev</tt>. You may also need to remove the CMakeCache.txt file in the build dir after installing the package.<br />
* the same for "X11_Xinerama_LIB (ADVANCED)" where you will need the devel package for <tt>xinerama</tt>.<br />
* if you get an error complaining about a missing variable X11_Xrandr_LIB, you need the devel package for libxrandr (libxrandr-devel on ubuntu-systems)<br />
* if you get the error "Please set the following variables: FONTCONFIG_INCLUDE_DIR, FONTCONFIG_LIBRARIES (ADVANCED)", then you need to install the libfontconfig headers<br />
* if you get the error "CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: KMETADATA_LIBRARIES", you need to install soprano from kdesupport and to rebuild kdelibs<br />
* if you get the error "‘XserverRegion’ does not name a type" make sure you have libxcomposite headers installed (<tt>libxcomposite-dev</tt> in ubuntu)<br />
* if you get the error "CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: QT_QTOPENGL_LIBRARY (ADVANCED) ", try editing CMakeCache.txt and setting QT_QTOPENGL_LIBRARY:FILEPATH=/home/kde-devel/qt-copy/lib/libQtOpenGL.so<br />
<br />
* if you get messages as "KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK." then, either find the files containing the offending line and comment it out manually, or run the following script in ~/kde/src/KDE/kdebase: [http://www.plamadeala.com/files/macros_corrector.sh macros_corrector.sh]. It will just REMOVE the line that has "kde4_create_handbook" in it from all the found files.<br />
*If you get an error (in ubuntu) concerning libxtst.so install the libxtst-dev package<br />
* If you get the message "kdebase/workspace/kcontrol/kxkb/x11helper.cpp:131: error: ‘KGlobal’ has not been declared", you might need to install libxklavier development packages.<br />
* If you get "/home/kde-devel/kde/lib/libkio.so: undefined reference to `Strigi::AnalysisResult::AnalysisResult(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, Strigi::IndexWriter&, Strigi::StreamAnalyzer&)'" you probably have an outdated version of strigi installed by your distro. By the way, after update the strigi, you must recompile kdelibs for a new libkio.so.<br />
* If you get the issue "can't find REQUIRED package Blitz", install qimageblitz4 and qimageblitz-dev<br />
<br />
== Running programs ==<br />
<br />
* If you get <br />
KUniqueApplication: Cannot find the D-Bus session server<br />
check if you can access the display, e.g. type<br />
xclock<br />
and see if a clock appears on the screen.<br />
<br />
* If you get something like<br />
Error: standard icon theme "oxygen" not found!<br />
<br />
ASSERT: "!isEmpty()" in file /home/kde-devel/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h, line 245<br />
Aborted (core dumped)<br />
You need to install kdebase - see above. It is enough to install the "runtime" directory from kdebase.<br />
<br />
<br />
== General troubleshooting ==<br />
<br />
What can happen over time, after some <tt>svn up</tt> commands, is that some of the tools used in the KDE build chain change their output format. For example, <tt>kcfg</tt> files are read by <tt>kconfig_compiler</tt> to produce configuration dialogs. CMake cannot detect those changes, and the compilation might fail. A workaround is to always force a re-generation of all such files:<br />
find $KDE_SRC/KDE/kdebase -name "*.kcfg" | xargs touch<br />
The same applies to <tt>ui</tt> files as produced by Qt designer.<br />
<br />
=== Locked sessions ===<br />
When installing KDE 4 as a user, one will not be able to unlock a locked session. To work around this issue you can either:<br />
su chown root.root $KDEDIR/lib/kde4/libexec/kcheckpass<br />
or<br />
chmod 755 $KDEDIR/lib/kde4/libexec/kcheckpass<br />
<br />
Also you have to add a "kde" service in /etc/pam.d/ folder<br />
<br />
For example for RH/Fedora based distros:<br />
<code> <br />
#%PAM-1.0<br />
auth include system-auth<br />
account include system-auth<br />
password include system-auth<br />
session include system-auth<br />
</code><br />
<br />
while for debian/Kubuntu (requires having libpam-dev installed while building kdebase):<br />
<code> <br />
# Standard Un*x authentication.<br />
@include common-auth<br />
@include common-account<br />
@include common-session<br />
@include common-password<br />
</code></div>Shevegen