ntrack 011 does not compile with libnl2

Bug #736058 reported by Michael Uleysky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntrack
Fix Released
High
Alexander Sack

Bug Description

I am LFS user and try to compile kdebase-runtime-4.6.1.
I found that ntrack-011 doesn't compile with libnl2. Here log of make:

Making all in modules
make[2]: Entering directory `/tmp/save/ntrack-011/modules'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -I../common/ -DHAVE_LIBNL2 -g -O2 -MT ntrack_libnl2_la-ntrack-libnl.lo -MD -MP -MF .deps/ntrack_libnl2_la-ntrack-libnl.Tpo -c -o ntrack_libnl2_la-ntrack-libnl.lo `test -f 'ntrack-libnl.c' || echo './'`ntrack-libnl.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -I../common/ -DHAVE_LIBNL2 -g -O2 -MT ntrack_libnl2_la-ntrack-libnl.lo -MD -MP -MF .deps/ntrack_libnl2_la-ntrack-libnl.Tpo -c ntrack-libnl.c -fPIC -DPIC -o .libs/ntrack_libnl2_la-ntrack-libnl.o
ntrack-libnl.c: In function 'setup_main_handle':
ntrack-libnl.c:240:3: error: too few arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:114:14: note: declared here
ntrack-libnl.c:246:3: error: too few arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:114:14: note: declared here
ntrack-libnl.c:252:3: error: too few arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:114:14: note: declared here
ntrack-libnl.c: In function 'setup_smart_handle':
ntrack-libnl.c:275:2: error: too few arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:114:14: note: declared here
ntrack-libnl.c:281:2: error: too few arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:114:14: note: declared here
ntrack-libnl.c:287:2: error: too few arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:114:14: note: declared here
make[2]: *** [ntrack_libnl2_la-ntrack-libnl.lo] Error 1
make[2]: Leaving directory `/tmp/save/ntrack-011/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/save/ntrack-011'
make: *** [all] Error 2

I think it is error in modules/ntrack-libnl.c. Macro NL_CACHE_MNGR_ADD in case of libnl2 defined as nl_cache_mngr_add (mngr, name, 0, &cache_o) (with 4 arguments), but according to /usr/include/netlink/cache.h and libnl documentation (http://www.infradead.org/~tgr/libnl/doc/group__cache__mngr.html#g3e146ccb5a6945dc4dfc443fc5b19ae1) this function is declared as
extern int nl_cache_mngr_add(struct nl_cache_mngr *, const char *, change_func_t, void *, struct nl_cache **);
and have 5 arguments.

Related branches

Revision history for this message
Alexander Sack (asac) wrote :

Hmm ... I was quite sure I tested 0.11 with libnl2 ;) ... let me check what happens here.

Revision history for this message
Alexander Sack (asac) wrote :

during configure I see:

checking for LIBNL2... yes
checking for LIBNL1... no
configure: creating ./config.status

build succeeds.

dpkg -l libnl2-dev on maverick
ii libnl2-dev 1.99+git20091216-2 development library and headers for libnl2

which could mean that API changed after 1.99

and in netlink/cache.h I have:
extern int nl_cache_mngr_add(struct nl_cache_mngr *,
                                                  const char *,
                                                  change_func_t,
                                                  struct nl_cache **);

checking in final 2.0 and current git master, your signature seems to be right.

Unfortunately, I saw that debian updated to final 2.0 without bumping package soname. That's bad. Anyway, let me poke this a bit once I have sorted this packaging problem.; but from what I see its a data field. passing a 0 pointer in the macro as parameter position 3 might be fine for you.

Changed in ntrack:
assignee: nobody → Alexander Sack (asac)
importance: Undecided → High
milestone: none → 012
status: New → Triaged
Revision history for this message
Alexander Sack (asac) wrote :

ok, I guess I shouldn't care that much about 1.99+git snapshot that was packaged in ubuntu etc. I will just fix it for 2.0+real and declare it a regression that experimental libnl2 backend received after upstream moved to final 2.0 API.

Folks that use maverick or natty have libnl1.1 anyway by default.

While looking I saw that libnl 3.0 is available as well; would you be willing to try that out and report back?

Revision history for this message
Alexander Sack (asac) wrote :

for anyone interested, filed http://bugs.debian.org/619753 on the SONAME issue. lets see what they are willing to do. Its a bit of a mess to fix this, so I guess we have to live that debian/ubuntu have broken libnl2 packaged.

summary: - ntrack does'nt compile with libnl2
+ ntrack does not compile with libnl2
summary: - ntrack does not compile with libnl2
+ ntrack 11 does not compile with libnl2
Revision history for this message
Alexander Sack (asac) wrote : Re: ntrack 11 does not compile with libnl2

i fixed this in trunk i think.

Try bzr branch lp:ntrack and see if that source works better.

Changed in ntrack:
status: Triaged → Fix Committed
Alexander Sack (asac)
summary: - ntrack 11 does not compile with libnl2
+ ntrack 011 does not compile with libnl2
Revision history for this message
Alexander Sack (asac) wrote :

012 is released, fixing this bug: https://launchpad.net/ntrack/main/012

Changed in ntrack:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.