From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by dpdk.org (Postfix) with ESMTP id 1AFEDC448 for ; Wed, 29 Jul 2015 15:56:49 +0200 (CEST) Received: by wibxm9 with SMTP id xm9so202596511wib.0 for ; Wed, 29 Jul 2015 06:56:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=372l3giD4bfHL5B8AfeS2hzfoSE9ZlTpk/8+pFhCKGk=; b=jtZcjmmuJ0QOtXH1kXeOlL63+GbCshBAnAd4YoS8gvd7cHzbZ0fzFtdcwBaN+XTwGy GkcNjCEN4phF2oDWy2NdfgZ3D5LAZKXNNFURrAeSfS6slnzjirE4gQOQ8SoA+jwACXcj gf2MM8zggkLjvduKkOxeFygCHShZ2XDEyHgstH6gWUuuwHxYWiVIt8QkYuj3vvEWEdPM zg8l44/9tssNPOwFosAQqzaWfj/IxJAPjSF1GdV8cigseRyH0Ii22lRNmkOCIhwtny7O 0t3j+cGl10dNoY9SR0/AjEyaju7vmk38j+YKqZ5nFJ1yJS/vSEwT+orNeUVgz/fUD0Ww bIyQ== X-Gm-Message-State: ALoCoQkIB4ViAM27pCB6ky/nv6AGvU/9k3yv3gNvdjV8Jml3JSl0KkSVDD/p46iNNmFNMT3FTmLA X-Received: by 10.181.12.111 with SMTP id ep15mr17258420wid.15.1438178208816; Wed, 29 Jul 2015 06:56:48 -0700 (PDT) Received: from ping.vm.6wind.com (6wind.net2.nerim.net. [213.41.151.210]) by smtp.gmail.com with ESMTPSA id hd6sm24504169wib.19.2015.07.29.06.56.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jul 2015 06:56:48 -0700 (PDT) From: Nelio Laranjeiro To: dev@dpdk.org Date: Wed, 29 Jul 2015 15:56:18 +0200 Message-Id: <1438178178-5062-2-git-send-email-nelio.laranjeiro@6wind.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438178178-5062-1-git-send-email-nelio.laranjeiro@6wind.com> References: <1438178178-5062-1-git-send-email-nelio.laranjeiro@6wind.com> Subject: [dpdk-dev] [PATCH 2/2] mlx4: add missing library dependency when compiling in shared library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2015 13:56:49 -0000 librte_pmd_mlx4.so needs to be linked with libiverbs otherwise, the PMD is not able to open Mellanox devices and the following message is printed by testpmd at startup "librte_pmd_mlx4: cannot access device, is mlx4_ib loaded?". Applications dependency on libverbs are moved to be only valid in static mode, in shared mode, applications do not depend on it anymore, librte_pmd_mlx4.so keeps this dependency and thus is linked with libverbs. Signed-off-by: Nelio Laranjeiro Acked-by: Olivier Matz --- drivers/net/mlx4/Makefile | 1 + mk/rte.app.mk | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index 14cb53f..d2f5692 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -50,6 +50,7 @@ CFLAGS += -g CFLAGS += -I. CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -libverbs # A few warnings cannot be avoided in external headers. CFLAGS += -Wno-error=cast-qual diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 97719cb..04af756 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -100,7 +100,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse endif -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs _LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lz _LDLIBS-y += --start-group @@ -140,6 +139,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) += -lrte_pmd_ring _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += -lrte_pmd_null +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs endif # ! $(CONFIG_RTE_BUILD_SHARED_LIB) -- 1.9.1