* [PATCH iproute2-next] devlink: Fix link errors on some systems
@ 2021-06-22 5:42 Roi Dayan
2021-06-22 5:43 ` Roi Dayan
0 siblings, 1 reply; 2+ messages in thread
From: Roi Dayan @ 2021-06-22 5:42 UTC (permalink / raw)
To: netdev; +Cc: Roi Dayan, David Ahern, Dmytro Linkin
On some systems we fail to link because of missing math lib.
add -lm to devlink.
LINK devlink
../lib/libutil.a(utils_math.o): In function `get_rate':
utils_math.c:(.text+0xcc): undefined reference to `floor'
../lib/libutil.a(utils_math.o): In function `get_size':
utils_math.c:(.text+0x384): undefined reference to `floor'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:16: devlink] Error 1
make: *** [Makefile:64: all] Error 2
Fixes: 6c70aca76ef2 ("devlink: Add port func rate support")
Signed-off-by: Roi Dayan <roid@nvidia.com>
---
devlink/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/devlink/Makefile b/devlink/Makefile
index d540feb3c012..d37a4b4d0241 100644
--- a/devlink/Makefile
+++ b/devlink/Makefile
@@ -7,6 +7,7 @@ ifeq ($(HAVE_MNL),y)
DEVLINKOBJ = devlink.o mnlg.o
TARGETS += devlink
+LDLIBS += -lm
endif
--
2.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH iproute2-next] devlink: Fix link errors on some systems
2021-06-22 5:42 [PATCH iproute2-next] devlink: Fix link errors on some systems Roi Dayan
@ 2021-06-22 5:43 ` Roi Dayan
0 siblings, 0 replies; 2+ messages in thread
From: Roi Dayan @ 2021-06-22 5:43 UTC (permalink / raw)
To: netdev; +Cc: David Ahern, Dmytro Linkin, Jiri Pirko
+jiri
On 2021-06-22 8:42 AM, Roi Dayan wrote:
> On some systems we fail to link because of missing math lib.
> add -lm to devlink.
>
> LINK devlink
> ../lib/libutil.a(utils_math.o): In function `get_rate':
> utils_math.c:(.text+0xcc): undefined reference to `floor'
> ../lib/libutil.a(utils_math.o): In function `get_size':
> utils_math.c:(.text+0x384): undefined reference to `floor'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:16: devlink] Error 1
> make: *** [Makefile:64: all] Error 2
>
> Fixes: 6c70aca76ef2 ("devlink: Add port func rate support")
> Signed-off-by: Roi Dayan <roid@nvidia.com>
> ---
> devlink/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/devlink/Makefile b/devlink/Makefile
> index d540feb3c012..d37a4b4d0241 100644
> --- a/devlink/Makefile
> +++ b/devlink/Makefile
> @@ -7,6 +7,7 @@ ifeq ($(HAVE_MNL),y)
>
> DEVLINKOBJ = devlink.o mnlg.o
> TARGETS += devlink
> +LDLIBS += -lm
>
> endif
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-22 5:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-22 5:42 [PATCH iproute2-next] devlink: Fix link errors on some systems Roi Dayan
2021-06-22 5:43 ` Roi Dayan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox