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 98365A0564; Sat, 29 Feb 2020 11:27:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D76AF1BFE0; Sat, 29 Feb 2020 11:27:27 +0100 (CET) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id D23081BFD1; Sat, 29 Feb 2020 11:27:26 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id l184so461735pfl.7; Sat, 29 Feb 2020 02:27:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=GL/HiAlpGkIh8Z3I8VlnCIGGwx4fVtokRpLm7xSygOo=; b=vaCnhFs9VRL99DTX7GTH3+QKtV+FbwQLhHXnARqCQeNIfe0Sb/tUg+nwDCoGFabx4x kQ7PnwlbAAM7giJhKDtgM+O4JpO5j8FvY5QGrVY4p6FM5aj5DZcz1ngGPMXytHpfn8tv OqSk+++vaOcsO4Ja5RRdVsPMw/FczMgY6Z3BtN89k0cBwpJ1Qcg/ZkGVIHNwqAxvZ6/F L9MM+SdY7g+i8Zkn1PNmq4k36fG6mgc5gY/zb8tuRQdhMxVvr4Kxachp+kycNbBX91e6 fZ2u8HyCwAk/7+fVaL0SHdJG5KS+4bLAtNoRwFe/Or3/uXkyUtFvuxTL8rcgyOKoEZB4 xbjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GL/HiAlpGkIh8Z3I8VlnCIGGwx4fVtokRpLm7xSygOo=; b=i0n4P/+Pe9b7agRz3vJu44gIfr1li6D1sNeEE/kqcdm8EUmkFfazYSUVKsBKtQe2+u EuBZvA2N1nwrkUdOk77CX8IwqMoAwQbTlYYxdEPMsS0gRSUtJe4J1UFrSb+kNxlGq8lJ FG88XC/T1ua/00ihB3Wzy+Vacnu0IQemW3BsXShrqZbHLXa2GtF3dRpqc8ZnqMTaIJCm PBYkgm8kLDXS3QbkcZcwAjD2EKp/3WXao7A5m/Cg6KuV1aW9lzWxdKUl+IRHvCNkJ+p8 1n5z3TvpysPPs61IB3lPT+sHHtBK2uirV44xQanWvHi3JJiOMBxCkkLzch9cM1/2JgKP QkHA== X-Gm-Message-State: APjAAAXPyArVnXECS8W0CdeYKRoUmXMedYC1xsQObeKAjWooCQUCQtSU HDnANWMOUp0ANNZnrMu/ieM= X-Google-Smtp-Source: APXvYqxt73S4x/OeHAC5NZD25A2RKnnKfvLS8EqxeqHJ9ZnSGoqrukDUhlIaUq3xQdUOmwUiikDK1g== X-Received: by 2002:aa7:9aa7:: with SMTP id x7mr8436230pfi.78.1582972045821; Sat, 29 Feb 2020 02:27:25 -0800 (PST) Received: from local.opencloud.tech.localdomain ([219.143.129.147]) by smtp.gmail.com with ESMTPSA id m18sm5152866pff.7.2020.02.29.02.27.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Feb 2020 02:27:25 -0800 (PST) From: xiangxia.m.yue@gmail.com To: matan@mellanox.com, dev@dpdk.org Cc: Tonghao Zhang , stable@dpdk.org Date: Sat, 29 Feb 2020 18:27:20 +0800 Message-Id: <1582972040-7026-1-git-send-email-xiangxia.m.yue@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [dpdk v1] net/mlx5: fix possible building error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 DRV_LOG(WARNING, "Cannot initialize MLX5 common due to missing" " run-time dependency on rdma-core libraries (libibverbs," " libmlx5)"); -- 1.8.3.1