ntrack-014 compilation fails if all libnl[123] are present together

Bug #801407 reported by Zbigniew Luszpinski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntrack
Fix Released
Medium
Alexander Sack

Bug Description

If all libnl libraries are installed on system:
checking for LIBNL3... yes
checking for LIBNL2... yes
checking for LIBNL1... yes
ntrack-014 fails to compile. If ntrack configure detects more than one libnl it should choose newer one and skip all older.
Compile log below:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to disable maintainer-specific portions of Makefiles... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /var/lib/lunar/compilers/ld
checking if the linker (/var/lib/lunar/compilers/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /var/lib/lunar/compilers/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/var/lib/lunar/compilers/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... /var/lib/lunar/compilers/ld
checking if the linker (/var/lib/lunar/compilers/ld) is GNU ld... yes
checking whether the g++ linker (/var/lib/lunar/compilers/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/var/lib/lunar/compilers/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking pkg-config is at least version 0.9.0... yes
checking for a Python interpreter with version >= 2.3.5... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for GLIB... yes
checking for GOBJECT... yes
checking for QTCORE... yes
checking for moc-qt4... no
checking for moc... moc
checking for LIBNL3... yes
checking for LIBNL2... yes
checking for LIBNL1... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating common/Makefile
config.status: creating common/test/Makefile
config.status: creating modules/Makefile
config.status: creating glib/Makefile
config.status: creating glib/test/Makefile
config.status: creating gobject/Makefile
config.status: creating gobject/test/Makefile
config.status: creating qt4/Makefile
config.status: creating qt4/test/Makefile
config.status: creating common/libntrack.pc
config.status: creating glib/libntrack-glib.pc
config.status: creating gobject/libntrack-gobject.pc
config.status: creating qt4/libntrack-qt4.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
/usr/bin/make all-recursive
make[1]: Wejście do katalogu `/usr/src/ntrack-014'
Making all in common
make[2]: Wejście do katalogu `/usr/src/ntrack-014/common'
Making all in test
make[3]: Wejście do katalogu `/usr/src/ntrack-014/common/test'
make[3]: Nie ma nic do zrobienia w `all'.
make[3]: Opuszczenie katalogu `/usr/src/ntrack-014/common/test'
make[3]: Wejście do katalogu `/usr/src/ntrack-014/common'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrack.lo -MD -MP -MF .deps/libntrack_la-ntrack.Tpo -c -o libntrack_la-ntrack.lo `test -f 'ntrack.c' || echo './'`ntrack.c
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackcompare.lo -MD -MP -MF .deps/libntrack_la-ntrackcompare.Tpo -c -o libntrack_la-ntrackcompare.lo `test -f 'ntrackcompare.c' || echo './'`ntrackcompare.c
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntracklist.lo -MD -MP -MF .deps/libntrack_la-ntracklist.Tpo -c -o libntrack_la-ntracklist.lo `test -f 'ntracklist.c' || echo './'`ntracklist.c
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackidpool.lo -MD -MP -MF .deps/libntrack_la-ntrackidpool.Tpo -c -o libntrack_la-ntrackidpool.lo `test -f 'ntrackidpool.c' || echo './'`ntrackidpool.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrack.lo -MD -MP -MF .deps/libntrack_la-ntrack.Tpo -c ntrack.c -fPIC -DPIC -o .libs/libntrack_la-ntrack.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackcompare.lo -MD -MP -MF .deps/libntrack_la-ntrackcompare.Tpo -c ntrackcompare.c -fPIC -DPIC -o .libs/libntrack_la-ntrackcompare.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntracklist.lo -MD -MP -MF .deps/libntrack_la-ntracklist.Tpo -c ntracklist.c -fPIC -DPIC -o .libs/libntrack_la-ntracklist.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackidpool.lo -MD -MP -MF .deps/libntrack_la-ntrackidpool.Tpo -c ntrackidpool.c -fPIC -DPIC -o .libs/libntrack_la-ntrackidpool.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackcompare.lo -MD -MP -MF .deps/libntrack_la-ntrackcompare.Tpo -c ntrackcompare.c -o libntrack_la-ntrackcompare.o >/dev/null 2>&1
mv -f .deps/libntrack_la-ntrackcompare.Tpo .deps/libntrack_la-ntrackcompare.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackmonitor.lo -MD -MP -MF .deps/libntrack_la-ntrackmonitor.Tpo -c -o libntrack_la-ntrackmonitor.lo `test -f 'ntrackmonitor.c' || echo './'`ntrackmonitor.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackidpool.lo -MD -MP -MF .deps/libntrack_la-ntrackidpool.Tpo -c ntrackidpool.c -o libntrack_la-ntrackidpool.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntracklist.lo -MD -MP -MF .deps/libntrack_la-ntracklist.Tpo -c ntracklist.c -o libntrack_la-ntracklist.o >/dev/null 2>&1
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackmonitor.lo -MD -MP -MF .deps/libntrack_la-ntrackmonitor.Tpo -c ntrackmonitor.c -fPIC -DPIC -o .libs/libntrack_la-ntrackmonitor.o
mv -f .deps/libntrack_la-ntrackidpool.Tpo .deps/libntrack_la-ntrackidpool.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrack.lo -MD -MP -MF .deps/libntrack_la-ntrack.Tpo -c ntrack.c -o libntrack_la-ntrack.o >/dev/null 2>&1
mv -f .deps/libntrack_la-ntracklist.Tpo .deps/libntrack_la-ntracklist.Plo
mv -f .deps/libntrack_la-ntrack.Tpo .deps/libntrack_la-ntrack.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT libntrack_la-ntrackmonitor.lo -MD -MP -MF .deps/libntrack_la-ntrackmonitor.Tpo -c ntrackmonitor.c -o libntrack_la-ntrackmonitor.o >/dev/null 2>&1
mv -f .deps/libntrack_la-ntrackmonitor.Tpo .deps/libntrack_la-ntrackmonitor.Plo
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -pedantic -DMODULES_DIR=\"/usr/lib/ntrack/modules/\" -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -export-symbols ./ntrack.symbols -no-undefined -version-info 3:3:3 -s -Wl,-O1 -z combreloc -o libntrack.la -rpath /usr/lib libntrack_la-ntrack.lo libntrack_la-ntrackcompare.lo libntrack_la-ntracklist.lo libntrack_la-ntrackidpool.lo libntrack_la-ntrackmonitor.lo -ldl
libtool: link: echo "{ global:" > .libs/libntrack.ver
libtool: link: cat ./ntrack.symbols | sed -e "s/\(.*\)/\1;/" >> .libs/libntrack.ver
libtool: link: echo "local: *; };" >> .libs/libntrack.ver
libtool: link: gcc -shared .libs/libntrack_la-ntrack.o .libs/libntrack_la-ntrackcompare.o .libs/libntrack_la-ntracklist.o .libs/libntrack_la-ntrackidpool.o .libs/libntrack_la-ntrackmonitor.o -ldl -march=native -mfpmath=sse -Wl,-O1 -Wl,-soname -Wl,libntrack.so.0 -Wl,-version-script -Wl,.libs/libntrack.ver -o .libs/libntrack.so.0.3.3
libtool: link: (cd ".libs" && rm -f "libntrack.so.0" && ln -s "libntrack.so.0.3.3" "libntrack.so.0")
libtool: link: (cd ".libs" && rm -f "libntrack.so" && ln -s "libntrack.so.0.3.3" "libntrack.so")
libtool: link: ar cru .libs/libntrack.a libntrack_la-ntrack.o libntrack_la-ntrackcompare.o libntrack_la-ntracklist.o libntrack_la-ntrackidpool.o libntrack_la-ntrackmonitor.o
libtool: link: ranlib .libs/libntrack.a
libtool: link: ( cd ".libs" && rm -f "libntrack.la" && ln -s "../libntrack.la" "libntrack.la" )
make[3]: Opuszczenie katalogu `/usr/src/ntrack-014/common'
make[2]: Opuszczenie katalogu `/usr/src/ntrack-014/common'
Making all in modules
make[2]: Wejście do katalogu `/usr/src/ntrack-014/modules'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Werror -pedantic -I../common/ -DHAVE_LIBNL3 -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT ntrack_libnl1_la-ntrack-libnl.lo -MD -MP -MF .deps/ntrack_libnl1_la-ntrack-libnl.Tpo -c -o ntrack_libnl1_la-ntrack-libnl.lo `test -f 'ntrack-libnl.c' || echo './'`ntrack-libnl.c
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libnl2 -Wall -Werror -pedantic -I../common/ -DHAVE_LIBNL3 -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -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
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libnl3 -Wall -Werror -pedantic -I../common/ -DHAVE_LIBNL3 -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT ntrack_libnl3_la-ntrack-libnl.lo -MD -MP -MF .deps/ntrack_libnl3_la-ntrack-libnl.Tpo -c -o ntrack_libnl3_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_LIBNL3 -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT ntrack_libnl1_la-ntrack-libnl.lo -MD -MP -MF .deps/ntrack_libnl1_la-ntrack-libnl.Tpo -c ntrack-libnl.c -fPIC -DPIC -o .libs/ntrack_libnl1_la-ntrack-libnl.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libnl2 -Wall -Werror -pedantic -I../common/ -DHAVE_LIBNL3 -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -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
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libnl3 -Wall -Werror -pedantic -I../common/ -DHAVE_LIBNL3 -O2 -march=native -fomit-frame-pointer -mfpmath=sse -pipe -MT ntrack_libnl3_la-ntrack-libnl.lo -MD -MP -MF .deps/ntrack_libnl3_la-ntrack-libnl.Tpo -c ntrack-libnl.c -fPIC -DPIC -o .libs/ntrack_libnl3_la-ntrack-libnl.o
cc1: warnings being treated as errors
In file included from /usr/include/libnl2/netlink/netlink.h:31:0,
                 from ntrack-libnl.c:32:
/usr/include/libnl2/netlink/types.h:26:15: error: comma at end of enumerator listcc1: warnings being treated as errors
In file included from /usr/include/libnl3/netlink/netlink.h:31:0,
                 from ntrack-libnl.c:32:
/usr/include/libnl3/netlink/types.h:25:15: error: comma at end of enumerator list

In file included from /usr/include/libnl3/netlink/netlink.h:32:0,
                 from ntrack-libnl.c:32:
/usr/include/libnl3/netlink/handlers.h:65:9: error: comma at end of enumerator list
/usr/include/libnl3/netlink/handlers.h:81:18: error: comma at end of enumerator list
/usr/include/libnl3/netlink/handlers.h:111:18: error: comma at end of enumerator list
In file included from /usr/include/libnl2/netlink/netlink.h:32:0,
                 from ntrack-libnl.c:32:
/usr/include/libnl2/netlink/handlers.h:65:9: error: comma at end of enumerator list
/usr/include/libnl2/netlink/handlers.h:81:18: error: comma at end of enumerator list
/usr/include/libnl2/netlink/handlers.h:111:18: error: comma at end of enumerator list
In file included from /usr/include/libnl3/netlink/object.h:16:0,
                 from ntrack-libnl.c:33:
/usr/include/libnl3/netlink/utils.h:42:50: error: ISO C90 does not support 'long long'
/usr/include/libnl3/netlink/utils.h:43:49: error: ISO C90 does not support 'long long'
In file included from /usr/include/libnl2/netlink/object.h:16:0,
                 from ntrack-libnl.c:33:
/usr/include/libnl2/netlink/utils.h:42:50: error: ISO C90 does not support 'long long'
/usr/include/libnl2/netlink/utils.h:43:49: error: ISO C90 does not support 'long long'
cc1: warnings being treated as errors
ntrack-libnl.c: In function '_ntrack_arch_new':
ntrack-libnl.c:149:2: error: implicit declaration of function 'nl_socket_alloc'
ntrack-libnl.c:149:18: error: assignment makes pointer from integer without a cast
ntrack-libnl.c:150:31: error: assignment makes pointer from integer without a cast
In file included from /usr/include/libnl3/netlink/msg.h:17:0,
                 from /usr/include/libnl3/netlink/cache.h:16,
                 from /usr/include/libnl3/netlink/route/addr.h:18,
                 from ntrack-libnl.c:35:
/usr/include/libnl3/netlink/attr.h:47:16: error: comma at end of enumerator list
ntrack-libnl.c:164:2: error: passing argument 1 of 'nl_socket_set_nonblocking' from incompatible pointer type
/usr/include/netlink/socket.h:58:14: note: expected 'struct nl_handle *' but argument is of type 'struct NTRACK_nl_handle *'
ntrack-libnl.c: In function '_ntrack_arch_free':
ntrack-libnl.c:223:3: error: passing argument 1 of 'nl_close' from incompatible pointer type
/usr/include/netlink/netlink.h:41:15: note: expected 'struct nl_handle *' but argument is of type 'struct NTRACK_nl_handle *'
ntrack-libnl.c:225:3: error: passing argument 1 of 'nl_close' from incompatible pointer type
/usr/include/netlink/netlink.h:41:15: note: expected 'struct nl_handle *' but argument is of type 'struct NTRACK_nl_handle *'
ntrack-libnl.c: In function 'setup_main_handle':
ntrack-libnl.c:234:2: error: passing argument 1 of 'nl_cache_mngr_alloc' from incompatible pointer type
/usr/include/netlink/cache.h:109:31: note: expected 'struct nl_handle *' but argument is of type 'struct NTRACK_nl_handle *'
ntrack-libnl.c:234:2: error: too many arguments to function 'nl_cache_mngr_alloc'
/usr/include/netlink/cache.h:109:31: note: declared here
ntrack-libnl.c:237:3: error: too many arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:111:26: note: declared here
ntrack-libnl.c:243:3: error: too many arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:111:26: note: declared here
ntrack-libnl.c:249:3: error: too many arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:111:26: note: declared here
ntrack-libnl.c: In function 'setup_smart_handle':
ntrack-libnl.c:259:2: error: passing argument 1 of 'nl_cache_mngr_alloc' from incompatible pointer type
/usr/include/netlink/cache.h:109:31: note: expected 'struct nl_handle *' but argument is of type 'struct NTRACK_nl_handle *'
ntrack-libnl.c:259:2: error: too many arguments to function 'nl_cache_mngr_alloc'
/usr/include/netlink/cache.h:109:31: note: declared here
In file included from /usr/include/libnl3/netlink/cache.h:19:0,
                 from /usr/include/libnl3/netlink/route/addr.h:18,
                 from ntrack-libnl.c:35:
/usr/include/libnl3/netlink/cache-api.h:118:14: error: comma at end of enumerator list
ntrack-libnl.c:272:2: error: too many arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:111:26: note: declared here
ntrack-libnl.c:278:2: error: too many arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:111:26: note: declared here
/usr/include/libnl3/netlink/cache-api.h:190:20: error: ISO C90 does not support flexible array members
ntrack-libnl.c:284:2: error: too many arguments to function 'nl_cache_mngr_add'
/usr/include/netlink/cache.h:111:26: note: declared here
In file included from /usr/include/libnl2/netlink/msg.h:17:0,
                 from /usr/include/libnl2/netlink/cache.h:16,
                 from /usr/include/libnl2/netlink/route/addr.h:18,
                 from ntrack-libnl.c:35:
/usr/include/libnl2/netlink/attr.h:47:16: error: comma at end of enumerator list
ntrack-libnl.c: In function 'cmp_rtnl_route_metric':
ntrack-libnl.c:324:2: error: implicit declaration of function 'rtnl_route_get_priority'
In file included from ntrack-libnl.c:36:0:
/usr/include/libnl3/netlink/route/link.h:83:23: error: comma at end of enumerator list
ntrack-libnl.c: In function 'update_connectivity':
ntrack-libnl.c:422:3: error: implicit declaration of function 'rtnl_route_get_nnexthops'
ntrack-libnl.c:424:4: error: implicit declaration of function 'rtnl_route_nexthop_n'
ntrack-libnl.c:424:10: error: assignment makes pointer from integer without a cast
ntrack-libnl.c:426:3: error: implicit declaration of function 'rtnl_route_nh_get_ifindex'
In file included from /usr/include/libnl2/netlink/cache.h:19:0,
                 from /usr/include/libnl2/netlink/route/addr.h:18,
                 from ntrack-libnl.c:35:
/usr/include/libnl2/netlink/cache-api.h:118:14: error: comma at end of enumerator list
/usr/include/libnl2/netlink/cache-api.h:190:20: error: ISO C90 does not support flexible array members
In file included from /usr/include/libnl3/netlink/route/route.h:19:0,
                 from ntrack-libnl.c:38:
/usr/include/libnl3/netlink/route/nexthop.h:27:22: error: comma at end of enumerator list
In file included from ntrack-libnl.c:36:0:
/usr/include/libnl2/netlink/route/link.h:49:23: error: comma at end of enumerator list
In file included from /usr/include/libnl2/netlink/route/route.h:19:0,
                 from ntrack-libnl.c:38:
/usr/include/libnl2/netlink/route/nexthop.h:27:22: error: comma at end of enumerator list

Temporary ugly workaround: before compiling ntrack uninastall all libnl releases except one. Then compile ntrack and reinstall removed libnl libraries.

Revision history for this message
Zbigniew Luszpinski (zbiggy) wrote :

More easy workaround:

if you have libnl 123 installed:
sed -i 's/libnl-2.0/lib-bad-nl-2.0/g' configure
sed -i 's/libnl-1/lib-bad-nl-1/g' configure
this way ntrack will be built with libnl3 only and will not fail.

if you have libnl 12 installed:
sed -i 's/libnl-1/lib-bad-nl-1/g' configure
this way ntrack will be built with libnl2 only and will not fail.

Revision history for this message
Alex Merry (randomguy3) wrote :

Here's a patch that should fix this bug - it only looks for libnl 2 if libnl 3 was not found, and only looks for libnl 1 if neither 2 nor 3 were found.

Tested on a system without libnl and where only libnl 1 is present. Can't test right now on any other systems.

Revision history for this message
Alex Merry (randomguy3) wrote :

Note that to test it, you will need to run "./autogen.sh" after applying the patch.

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

hmm. wonder if we could build all backends in case all headers are available. in that way you could produce one binary biuld that would run on systems that have nl1 nl2 or nl3 installed.

Revision history for this message
Alex Merry (randomguy3) wrote :

You would need to have a way of selecting the correct one at runtime, though. My patch would probably be a useful intermediate fix, though.

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

------------------------------------------------------------
revno: 325
committer: Alexander Sack <email address hidden>
branch nick: ntrack
timestamp: Sun 2011-10-16 02:27:17 +0200
message:
  modules[libnl]: add support to build all libnl version backends in one shot lp:801407
------------------------------------------------------------

Changed in ntrack:
status: New → Fix Committed
assignee: nobody → Alexander Sack (asac)
importance: Undecided → Medium
milestone: none → 015
Revision history for this message
Alexander Sack (asac) wrote :

as a side note, while working on adding support for the most recent libnl versions (3.1, 3.2.1, 3.2.2) I ran into issue that strengthened my believe that libnl is a bloody mess and should not be continued much longer ... I landed fix for lp:448400 (pure kernel/rtnetlink backend) which - if working out well - will supersede all libnl backends AND should be stable and working on all linux kernels that are not completely ancient. If that arrives we can probably kill the whole plugin concept as you don't need to support multiple backends to support shipping binaries that work on various linux versions/distributiouns.

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

ntrack 015 is available including the fix for this bug: https://launchpad.net/ntrack/main/015

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.