From: Petr Machata <petrm@nvidia.com>
To: Roi Dayan <roid@nvidia.com>
Cc: <netdev@vger.kernel.org>, Petr Machata <petrm@nvidia.com>,
David Ahern <dsahern@gmail.com>,
Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH iproute2 v4 1/1] build: Fix link errors on some systems
Date: Tue, 12 Jan 2021 13:21:04 +0100 [thread overview]
Message-ID: <87h7nm73db.fsf@nvidia.com> (raw)
In-Reply-To: <20210112103317.978952-1-roid@nvidia.com>
Roi Dayan <roid@nvidia.com> writes:
> Since moving get_rate() and get_size() from tc to lib, on some
> systems we fail to link because of missing math lib.
> Move the functions that require math lib to their own c file
> and add -lm to dcb that now use those functions.
>
> ../lib/libutil.a(utils.o): In function `get_rate':
> utils.c:(.text+0x10dc): undefined reference to `floor'
> ../lib/libutil.a(utils.o): In function `get_size':
> utils.c:(.text+0x1394): undefined reference to `floor'
> ../lib/libutil.a(json_print.o): In function `sprint_size':
> json_print.c:(.text+0x14c0): undefined reference to `rint'
> json_print.c:(.text+0x14f4): undefined reference to `rint'
> json_print.c:(.text+0x157c): undefined reference to `rint'
>
> Fixes: f3be0e6366ac ("lib: Move get_rate(), get_rate64() from tc here")
> Fixes: 44396bdfcc0a ("lib: Move get_size() from tc here")
> Fixes: adbe5de96662 ("lib: Move sprint_size() from tc here, add print_size()")
>
> Signed-off-by: Roi Dayan <roid@nvidia.com>
Looking good:
$ ldd ip/ip | grep libm.so
$ ldd dcb/dcb | grep libm.so
libm.so.6 => /lib64/libm.so.6 (0x00007f204d0c2000)
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
next prev parent reply other threads:[~2021-01-12 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 10:33 [PATCH iproute2 v4 1/1] build: Fix link errors on some systems Roi Dayan
2021-01-12 12:21 ` Petr Machata [this message]
2021-02-22 10:36 ` Roi Dayan
2021-02-22 10:39 ` Roi Dayan
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=87h7nm73db.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roid@nvidia.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).