From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93E8FC43381 for ; Tue, 12 Jan 2021 12:21:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A35E21D93 for ; Tue, 12 Jan 2021 12:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733259AbhALMVw (ORCPT ); Tue, 12 Jan 2021 07:21:52 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:17325 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727687AbhALMVv (ORCPT ); Tue, 12 Jan 2021 07:21:51 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 12 Jan 2021 04:21:11 -0800 Received: from yaviefel (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 12 Jan 2021 12:21:08 +0000 References: <20210112103317.978952-1-roid@nvidia.com> User-agent: mu4e 1.4.10; emacs 27.1 From: Petr Machata To: Roi Dayan CC: , Petr Machata , David Ahern , Stephen Hemminger Subject: Re: [PATCH iproute2 v4 1/1] build: Fix link errors on some systems In-Reply-To: <20210112103317.978952-1-roid@nvidia.com> Date: Tue, 12 Jan 2021 13:21:04 +0100 Message-ID: <87h7nm73db.fsf@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1610454071; bh=utXdyayaJZDXILvAgWy5RKXlSzbarRo9UAtn/7e9Ph4=; h=References:User-agent:From:To:CC:Subject:In-Reply-To:Date: Message-ID:MIME-Version:Content-Type:X-Originating-IP: X-ClientProxiedBy; b=DEISHSRIiTmM2i7IuqWO/A9QjCr6d6kpgfSWZbBOasIDlc/6AJcU7WqgNRMvkmddY TqdG6ewuIDvN69Ded8jrrOk9A+RFg4oHLJOuHMVBkHy311xrz88H4w2PpbAD6MgWzn Mg5dj9ZeSNqbymRIrNf21Y7UAkBQnBprMeggyYnvx09XC0as9CN628gOaUyTcBvJmR llTDl/X4ehViqZPeIzxWQpKJAIXWAGfTVMf83CnN5ZtNbVfpUm5qhC+xK/EEelfL4x SkbFZqd/P3ovnL/9SrgPXyQ/LGk9DCP1B4Mrnfxi4nBARR6Xe2TOIt3BoQUGCjYN7D fNhAsEE4ECh6g== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Roi Dayan 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 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 Tested-by: Petr Machata