From: Stephen Hemminger <stephen@networkplumber•org>
To: Hangbin Liu <liuhangbin@gmail•com>
Cc: netdev@vger•kernel.org, David Ahern <dsahern@kernel•org>,
Andrea Claudi <aclaudi@redhat•com>, Ying Xu <yinxu@redhat•com>
Subject: Re: [PATCH iproute2] lib: move rtnl_echo_talk from libnetlink to utils
Date: Tue, 11 Jul 2023 09:00:11 -0700 [thread overview]
Message-ID: <20230711090011.4e4c4fec@hermes.local> (raw)
In-Reply-To: <20230711073117.1105575-1-liuhangbin@gmail.com>
On Tue, 11 Jul 2023 15:31:17 +0800
Hangbin Liu <liuhangbin@gmail•com> wrote:
> In commit 6c09257f1bf6 ("rtnetlink: add new function rtnl_echo_talk()"),
> some json obj functions were exported in libnetlink. Which cause build
> error like:
> /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
>
> Commit 6d68d7f85d8a ("testsuite: fix build failure") only fixed this issue
> for iproute building. But if other applications include the libnetlink.a,
> they still have this problem, because libutil.a is not exported to the
> LDLIBS. So let's move the rtnl_echo_talk() from libnetlink.c to utils.c
> to avoid this issue.
>
> After the fix, we can also remove the update by c0a06885b944 ("testsuite: fix
> testsuite build failure when iproute build without libcap-devel").
>
> Reported-by: Ying Xu <yinxu@redhat•com>
> Fixes: 6c09257f1bf6 ("rtnetlink: add new function rtnl_echo_talk()")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail•com>
I don't see this when iproute2 is built.
Libnetlink is not a public API. And there is no guarantee about
compatibility if an application links with it. Collect2 should be
using a supported library like libmnl instea.
next prev parent reply other threads:[~2023-07-11 16:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 7:31 [PATCH iproute2] lib: move rtnl_echo_talk from libnetlink to utils Hangbin Liu
2023-07-11 16:00 ` Stephen Hemminger [this message]
2023-07-12 3:11 ` Hangbin Liu
2023-07-13 22:28 ` Stephen Hemminger
2023-07-14 3:28 ` Hangbin Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230711090011.4e4c4fec@hermes.local \
--to=stephen@networkplumber$(echo .)org \
--cc=aclaudi@redhat$(echo .)com \
--cc=dsahern@kernel$(echo .)org \
--cc=liuhangbin@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=yinxu@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox