2010-01-06

FreeBSD - Compilation errors on port KDE4 in FreeBSD 8.0

While adding GUI Desktop environment into my development box, an error encountered when compiling KDE4, the stable and nice looking Desktop environment. Compiling KDE4 can take quite some time as it depends on few hundred other ports. Alternatively, you can install KDE4 from the packages by using the command :
pkg_add -r kde4

But installing programs using ports is always my preference. Although ports takes additional time to compile but the flexibility to configure what options to enable or disable is preferred. By using ports, it also allows us to search (make quicksearch name=port-name) the local repository (/usr/ports) on what other related programs we can have.

Back to the topic. Halfway ports compiling KDE4, it halted with an error compiling the port "kdebase-runtime-4.3.4". Instead of searching the errors in a one big whole of logs, manually compile /usr/ports/x11/kdebase4-runtime to zoom in the error. Below is what the ports complained about while installing /usr/ports/x11/kdebase4-runtime (which is part of the dependencies of KDE4) :
[  2%] Built target kcm_mailtransport_automoc
[  2%] Built target mailtransport_automoc
[  2%] Built target microblog_automoc
[  2%] Built target kpimtextedit_automoc
[  2%] Built target syndication_automoc
Scanning dependencies of target gpgmepp
[  2%] Building CXX object gpgme++/CMakeFiles/gpgmepp.dir/gpgmepp_automoc.o
Linking CXX shared library ../lib/libgpgme++.so
[  7%] Built target gpgmepp
Scanning dependencies of target gpgmepp-pthread
[  7%] Building CXX object gpgme++/CMakeFiles/gpgmepp-pthread.dir/gpgmepp-pthread_automoc.o
Linking CXX shared library ../lib/libgpgme++-pthread.so
[ 11%] Built target gpgmepp-pthread
[ 11%] Building CXX object akonadi/CMakeFiles/akonadi-kde.dir/itemserializer.o
In file included from /usr/local/include/boost/parameter/aux_/arg_list.hpp:14,
from /usr/local/include/boost/parameter/aux_/tagged_argument.hpp:10,
from /usr/local/include/boost/parameter/aux_/tag.hpp:8,
from /usr/local/include/boost/parameter/keyword.hpp:10,
from /usr/local/include/boost/parameter/name.hpp:8,
from /usr/local/include/boost/graph/named_function_params.hpp:15,
from /usr/local/include/boost/graph/depth_first_search.hpp:21,
from /usr/local/include/boost/graph/topological_sort.hpp:16,
from /usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.3.4/akonadi/itemserializer.cpp:40:
/usr/local/include/boost/parameter/aux_/maybe.hpp:13:53: error: boost/python/detail/referent_storage.hpp: No such file or directory
In file included from /usr/local/include/boost/parameter/aux_/arg_list.hpp:14,
from /usr/local/include/boost/parameter/aux_/tagged_argument.hpp:10,
from /usr/local/include/boost/parameter/aux_/tag.hpp:8,
from /usr/local/include/boost/parameter/keyword.hpp:10,
from /usr/local/include/boost/parameter/name.hpp:8,
from /usr/local/include/boost/graph/named_function_params.hpp:15,
from /usr/local/include/boost/graph/depth_first_search.hpp:21,
from /usr/local/include/boost/graph/topological_sort.hpp:16,
from /usr/ports/deskutils/kdepimlibs4/work/kdepimlibs-4.3.4/akonadi/itemserializer.cpp:40:
/usr/local/include/boost/parameter/aux_/maybe.hpp:90: error: 'boost::python' has not been declared
/usr/local/include/boost/parameter/aux_/maybe.hpp:90: error: expected unqualified-id before '<' token
/usr/local/include/boost/parameter/aux_/maybe.hpp: In member function 'typename boost::add_reference::type>::type boost::parameter::aux::maybe::construct2(const U&) const':
/usr/local/include/boost/parameter/aux_/maybe.hpp:59: error: 'm_storage' was not declared in this scope
/usr/local/include/boost/parameter/aux_/maybe.hpp: In member function 'void boost::parameter::aux::maybe::destroy()':
/usr/local/include/boost/parameter/aux_/maybe.hpp:72: error: 'm_storage' was not declared in this scope
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 1

Stop in /usr/ports/deskutils/kdepimlibs4.

From the errors, it seems kdepimlibs4 is missing of a dependencies related to "boost::python".

The next thing to do will be searching the ports for any ports related to "boost-python" and it turns out that there a port named "devel/boost-python-libs". Since this problem is related to dependencies, installing "devel/boost-python-libs" seems to be a good idea. After installing "devel/boost-python-libs", compiling "deskutils/kdepimlibs4" went smoothly. Then proceed to compile KDE4 also end up good.

In summary, "deskutils/kdepimlibs4" depends on "devel/boost-python-libs" but the port maintainer seems forgot to specify it. In this case, we will need to manually fulfill the dependencies before we can proceed installing KDE4. All in all, it went well.

Adios !!!

No comments: