]> git.ipfire.org Git - thirdparty/iproute2.git/commit
testsuite: fix build failure
authorAndrea Claudi <aclaudi@redhat.com>
Sun, 23 Oct 2022 15:37:11 +0000 (17:37 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 26 Oct 2022 15:52:02 +0000 (08:52 -0700)
commit6d68d7f85d8af5fb414229f11dc7c73fadb88e40
treed43568a82dfda08e99d3fa6892a09b8151585b24
parent9b1e0201c64bafba836a0f6785f295d3e829e882
testsuite: fix build failure

After commit 6c09257f1bf6 ("rtnetlink: add new function
rtnl_echo_talk()") "make check" results in:

$ make check

make -C testsuite
make -C iproute2 configure
make -C testsuite alltests
make -C tools
    CC       generate_nlmsg
/usr/bin/ld: /tmp/cc6YaGBM.o: in function `rtnl_echo_talk':
libnetlink.c:(.text+0x25bd): undefined reference to `new_json_obj'
/usr/bin/ld: libnetlink.c:(.text+0x25c7): undefined reference to `open_json_object'
/usr/bin/ld: libnetlink.c:(.text+0x25e3): undefined reference to `close_json_object'
/usr/bin/ld: libnetlink.c:(.text+0x25e8): undefined reference to `delete_json_obj'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:6: generate_nlmsg] Error 1
make[1]: *** [Makefile:40: generate_nlmsg] Error 2
make: *** [Makefile:130: check] Error 2

This is due to json function calls included in libutil and not in
libnetlink. Fix this adding libutil.a to the tools Makefile, and linking
against libcap as required by libutil itself.

Fixes: 6c09257f1bf6 ("rtnetlink: add new function rtnl_echo_talk()")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Acked-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
testsuite/tools/Makefile