Are you trying to compile kdebase-workspace-4.0.2 with support for your beloved NetworkManager package, but cmake just does not admit you HAVE the goddamn network-manager-dev package installed?
Code: Select all
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ NetworkManager (any version): NetworkManager is a daemon for user
controlled networking <http://www.gnome.org/projects/NetworkManager>
-----------------------------------------------------------------------------The problem seems to be that, unfortunately, the default debian network-manager packages do not install all that KDE 4 needs. Because of this, we have to manually compile and install the NetworkManager sources in order to have KDE include it. Don't worry, though! It shouldn't be hard, now that I already spent my late night hours deciphering NetworkManager's ridiculously lame and obscure compile-time bugs
In summary, what we have to do is this:
1. Compile and install NetworkManager from source
2. Remove cmake's cache (rm CMakeCache.txt) and run cmake again
First of all, download NetworkManager's source here. I used version 0.6.5, which was the latest as of April 1st 2008.
Now, before you start configuring and compiling, I recommend using apt-get to fetch the build dependencies. Might save you some headache.
Code: Select all
apt-get build-dep network-managerConfiguring NetworkManager
From the new directory, do:
Code: Select all
./configureIf you get the following error:
Code: Select all
configure: error: wireless-tools >=28pre9 not installed or not functionalIf everything has gone well, go to the next step.
Compiling NetworkManager
Compiling NetworkManager got really tricky here. Let's see if you get luckier than me
Run
Code: Select all
makeCode: Select all
make -j2Everything went well? No? Wow...
Compiling error #1: libnl too new
The first compile-time error I got was this:
Code: Select all
NetworkManager-0.6.5/src/NetworkManagerSystem.c:229: undefined reference to `nl_handle_alloc_nondefault'
NetworkManager-0.6.5/src/NetworkManagerSystem.c:230: undefined reference to `nl_handle_set_pid'Now that you installed libnl, don't forget to configure NetworkManager's installation again, so it finds the newly-installed old libs
Code: Select all
make clean && ./configure && makeCode: Select all
nm-vpn-properties.c:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
nm-vpn-properties.c:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
nm-vpn-properties.c: In function ‘vpn_druid_vpn_validity_changed’:
nm-vpn-properties.c:258: error: ‘druid’ undeclared (first use in this function)
nm-vpn-properties.c:258: error: (Each undeclared identifier is reported only once
nm-vpn-properties.c:258: error: for each function it appears in.)
nm-vpn-properties.c: At top level:
nm-vpn-properties.c:266: error: expected ‘)’ before ‘*’ token
** SNIP ** more unexpected stuff ** SNIP **
nm-vpn-properties.c: In function ‘add_cb’:
nm-vpn-properties.c:423: error: ‘druid’ undeclared (first use in this function)
** SNIP ** even more unexpected stuff (make is so naive) ** SNIP **
make[3]: *** [nm_vpn_properties-nm-vpn-properties.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/andre/download/NetworkManager-0.6.5/gnome/vpn-properties'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/andre/download/NetworkManager-0.6.5/gnome'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/andre/download/NetworkManager-0.6.5'
make: *** [all] Error 2This error is due to NetworkManager trying to use deprecated GNOME libraries, even though NM's default makefiles have flags set disabling use of deprecated structures. Go figure.
The flag that is erroneously set is GNOME_DISABLE_DEPRECATED. We just have to remove references to it from the makefiles to fix the compilation.
If you look for the flag's name inside all files in the source directory, for example with
Code: Select all
grep -R GNOME_DISABLE_DEPRECATED *Code: Select all
gnome/vpn-properties/Makefile.in: -DGNOME_DISABLE_DEPRECATED \
gnome/vpn-properties/Makefile.am: -DGNOME_DISABLE_DEPRECATED \
libnm-util/Makefile.in: -DGNOME_DISABLE_DEPRECATED \
libnm-util/Makefile.am: -DGNOME_DISABLE_DEPRECATED \
utils/Makefile.in: -DGNOME_DISABLE_DEPRECATED \
utils/Makefile.am: -DGNOME_DISABLE_DEPRECATED \Don't forget to clean the current build and to run configure again after fixing the files, in order to generate new Makefile files.
Code: Select all
make clean && ./configure && makeIf you don't get any more errors, it's time to install the newly-compiled package.
Code: Select all
su -c 'make install'Now let's go back to compiling kdebase-workspace!
Configuring kdebase-workspace
Now that you have a complete, made-from-scratch NetworkManager build freshly installed, cmake should be able to recognize it. Just running cmake . again on kdebase-workspace directory won't be enough, though. You have to remove the cache from the previous cmake run.
In kdebase-workspace source directory, do:
Code: Select all
rm CMakeCache.txtCode: Select all
cmake .Code: Select all
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ BlueZ
+ NetworkManager 0.6.5
+ lm-sensors
+ Compositing support
+ Captury framework
+ libusb
+ libxft
Congratulations! All external packages have been found.
-----------------------------------------------------------------------------I really like NetworkManager and its simplicity, and I'm glad it has made into KDE's Solid. Also, I endlessly appreciate open-source initiatives, and refrain as best as I can from criticizing them, given the effort and good will from developers in making our lifes easier for the sake of it.
I would just like to tell the maintainers of NetworkManager and its Debian packages that all this headache should not be necessary. I feel that the network-package-dev package should provide Debian users with all the files they need, and, if it does not, there is no apparent good reason for GNOME's NetworkManager to be so hard to compile.
Other than that, thanks, maintainers, for the good work so far, and good luck, users, with your NetworkManager-enabled KDE 4!