From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B8946A0574 for ; Wed, 4 Mar 2020 14:55:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A26CF1BFAB; Wed, 4 Mar 2020 14:55:56 +0100 (CET) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by dpdk.org (Postfix) with ESMTP id A73222C16; Wed, 4 Mar 2020 14:55:53 +0100 (CET) Received: by mail-qk1-f195.google.com with SMTP id m2so1625186qka.7; Wed, 04 Mar 2020 05:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TZBagbGK9j9Gu/IRvpQgNMQXBlTpEhnS72iDGY7Bz6s=; b=H9hyaD8dFfmp2HqZQ8AUWWwNKNydK9+M1VM2zMxuMF746Rxw183w+2t37MxocQ33iC Njwx+fCaR580na2Vfa25tTG5UzGKQmD7ijeuDe7NxZDKmqYxOjABoRCKTnxWitvgwKPx IjvIHkBYk7wmLz/OOdsjlWGz4ubfFEfQ2289Xy/fvL7Fgl5NIrpsnWAPeChI6u6yJzu+ OXY5CMVJok9jOO9mT9zEaQPW8NRF6EsUSSM9Yd1T2CeNj5IandwXo0Gk4Qd9BaELjI6R gAUDyZLm6lYfR3J3bRyK66j9ugFUzLHqxamipNtiloQGMb1FkqYjYZLmjID+swtMPbH2 0MsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TZBagbGK9j9Gu/IRvpQgNMQXBlTpEhnS72iDGY7Bz6s=; b=PnaYDCtLp5R0GhSkkgwwI9fUx8bj9WTZ35jPB5dtMHeiR77r0GyVexoQhBK3P7TTaV +kFITfaGCSXlvwh8f4pa/fgBS60QD58EzP260DXL5Wa9UBHSZB686I2ueHEeXlEWIloP KaRuO1npdC0QopS7mSIdWAOyaNo/LiqhKAxmDfQVgk2i9uAdip4LpzOYT5Ayir5nIsZL KZI4DL34mQ5zmQkF2Px2sCQZ2M8r7r9X4ErYvm8DjqDN8yzKfPj8kYqSpVBQXGMOyFT8 9xsxtfYnGSsxhkkWq3TMO5PUzrBiZbGfeNqYW8HpQJY/5WNAdxZjvWDPasRf6gX0HmJX Z/zQ== X-Gm-Message-State: ANhLgQ1jyQD2cVn4Y5GZduooU2F8NXgRbJ4+R2WyTiL0KbFmzqutkjpV 8qXeKe9vmDAl0iz9tH4OFZ6psRPaR2L6e1TAPno= X-Google-Smtp-Source: ADFU+vt/l0cpLzYzKeZF3oxCyPJcRZ0u0/57+lIc7oMxXhDcKkZ/Te1tsmWwxLNS5fCGUM9ZAOvmNhG6CYB1fX3qsfU= X-Received: by 2002:a37:7c47:: with SMTP id x68mr3094985qkc.8.1583330152979; Wed, 04 Mar 2020 05:55:52 -0800 (PST) MIME-Version: 1.0 References: <1583146517-7079-1-git-send-email-xiangxia.m.yue@gmail.com> In-Reply-To: From: Tonghao Zhang Date: Wed, 4 Mar 2020 21:55:16 +0800 Message-ID: To: Matan Azrad Cc: Raslan Darawsheh , Ali Alnubani , "dev@dpdk.org" , "stable@dpdk.org" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH dpdk-dev v2] common/mlx5: fix possible building error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Tue, Mar 3, 2020 at 3:15 PM Matan Azrad wrote: > > > Hi > > From: xiangxia.m.yue@gmail.com > > From: Tonghao Zhang > > > > When setting the CONFIG_RTE_BUILD_SHARED_LIB to y, and build the mlx5 > > pmd, there is a building error. > > To fix it, add RTE_IBVERBS_LINK_DLOPEN to include relative codes. > > > > > mlx5_common.o: In function `mlx5_glue_init': > > > drivers/common/mlx5/mlx5_common.c:324: undefined reference to > > `dlclose' > > > > Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library") > > Cc: stable@dpdk.org > > > > Signed-off-by: Tonghao Zhang > > Tested-by: Ali Alnubani > > The title should point to the root cause - not to the results. > > Something like: > > common/mlx5: fix dynamic loading reference > > > drivers/common/mlx5/mlx5_common.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/common/mlx5/mlx5_common.c > > b/drivers/common/mlx5/mlx5_common.c > > index 610fb48..570a3f4 100644 > > --- a/drivers/common/mlx5/mlx5_common.c > > +++ b/drivers/common/mlx5/mlx5_common.c > > @@ -209,8 +209,6 @@ enum mlx5_class > > */ > > RTE_INIT_PRIO(mlx5_glue_init, CLASS) > > { > > - void *handle = NULL; > > - > > /* Initialize common log type. */ > > mlx5_common_logtype = rte_log_register("pmd.common.mlx5"); > > if (mlx5_common_logtype >= 0) > > @@ -249,6 +247,7 @@ enum mlx5_class > > mlx5_glue_path(glue_path, sizeof(glue_path)) : ""), > > }; > > unsigned int i = 0; > > + void *handle = NULL; > > void **sym; > > const char *dlmsg; > > > > @@ -320,8 +319,10 @@ enum mlx5_class > > mlx5_glue->fork_init(); > > return; > > glue_error: > > +#ifdef RTE_IBVERBS_LINK_DLOPEN > > if (handle) > > dlclose(handle); > > +#endif > > > What's about " #include " Is it compiled for you? Yes, still building fail. > If so, why dlclose is not known on your setup? When I fixed it, I found the codes in mlx5_glue_init, use the RTE_IBVERBS_LINK_DLOPEN. but dlclose is not included in it. I think we should add RTE_IBVERBS_LINK_DLOPEN to fix the building fail. > > > > DRV_LOG(WARNING, "Cannot initialize MLX5 common due to > > missing" > > " run-time dependency on rdma-core libraries (libibverbs," > > " libmlx5)"); > > -- > > 1.8.3.1 > -- Thanks, Tonghao