(Update Qt errors.)
|Line 1:||Line 1:|
|Note: This page is about KDE 4. It isn't applicable for KDE 3 development.|
This page focuses on building KDE SC trunk on FreeBSD. For building and using stable KDE SC releases on FreeBSD, you should use the ports collection. See the KDE/FreeBSD website for more information.
The page on building KDE SC 4 trunk makes a few assumptions about your environment. Note that FreeBSD's dbus and cmake ports will work (so those sections can be skipped).
Sometimes, building with make can fail on some modules. You should try using gmake instead.
The kdesrc-build script can be used on FreeBSD. Note that if there are errors building qt-copy or libs, look at the issues below and fix them, then continue the build using kdesrc-build.
For some reason, the configure system will sometimes put -I/usr/local/include (which contains the ports version of Qt 3 headers) into the general CXXFLAGS variable. Note that there is an INCPATH variable for these include paths which should also contain -I/usr/local/include. The difference is in the compile line; CXXFLAGS's appears first, whereas the paths in INCPATH are ordered properly such that the local (current build) headers are checked first. You need to go into the directory where the build is failing (use the previous lines before the error message), and open the Makefile. You should see the the -I/usr/local/include line in the CXXFLAGS line, and you can safetly remove it if there is a -I/usr/local/include line in INCPATH. This seems to usually happen in build_dir/qt-copy/src/plugins/sqldrivers/psql/Makefile.
Sometimes, /usr/local/bin/qmake-qt4 insists on being found instead of qt-copy's qmake, which in turn makes cmake use the system-wide Qt during compilation. If everything else fails, you can pass -DQT_QMAKE_EXECUTABLE=/your/path/qmake to cmake.
If all polkit-related ports are correctly installed and the error persists, you most likely need to export LIBRARY_PATH and include /usr/local/lib in it.