Compilation issue with libnl

Helmut Schaa hschaa at suse.de
Mon Jun 4 15:37:16 CEST 2007


Ping ;-)

Am Montag, 14. Mai 2007 schrieb Helmut Schaa:
> Hi Thomas,
>
> KNetworkManager now uses libnl for getting network statistics but some
> people got compilation issues due to the libnl inclusion. I was able to
> track the problem down on an Ubuntu system (libnl 1.0-pre6) and it appears
> that its enough to include "netlink/netlink.h" in an empty sourcefile and
> compilation reports a lot of errors like "error: __u32 does not name a
> type".
>
> I attached a sourcefile which produces a long list of errors when compiled
> using the following command:
> 	g++ `pkg-config --libs --cflags libnl-1` main.cc
>
> You can work around the problem by including  "linux/types.h"
> before "netlink/netlink.h". This workaround was also discussed on the
> KNetworkManager list but I do not like the idea of including kernel headers
> in KNM, right?
>
> So is it really necessary to have all the *-kernel includes
> in "netlink/netlink.h" (like "netlink-kernel.h")?
>
> And can you give some hints how to prevent compilation problems like the
> one mentioned above?
>
> Thanks,
> Helmut


More information about the kde-networkmanager mailing list