From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id BE72C9221 for ; Fri, 4 Dec 2015 19:44:40 +0100 (CET) Received: by wmww144 with SMTP id w144so76378643wmw.0 for ; Fri, 04 Dec 2015 10:44:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=yORS8bPhtjPpGsDl5qbdxmxImEg1NjHVeFV3E1dqQKI=; b=UYC9/jlzDjWL82DzDZQ5pA8fRUoLNip5F8+tDOfsTEjyy2LBieg1iuGgyObYGaOzb1 j9UbysTr3YxR4XRGevxBTPZ2jIQqzX5S3tv+buOJf+ww6b74YiBsini6na7PXTS0htvo qvOr7W11//wnwvnwEzrzSWT7VzAVEyUbb5QB5vsU1zvfrgQ8vu1IvcYpLyb9hhhG+Zxo o2GEALWl6d5S/x/sVrgWoKVh0kFY+4BvGB9gUAFE9WDbTWnalWOtXrvFjDhUTr6kIFyv EMJMrmLlgIsZsaFPwfe1wxhjwNP2i8faA3fmNHJRd4zL/twSt9QUDBklFkR6xi9CmU6J KLgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=yORS8bPhtjPpGsDl5qbdxmxImEg1NjHVeFV3E1dqQKI=; b=gKrHn5r3z/DxhQyRBv6zSusNu6o3uJpHhWkEiPGsrAV4l9ftLtEByipDd5dOp8t3Gc kO8IoAP4iN7ZRCCo/Ad8J53PO6nRxoQJ5f3DYKVy1uwu0aiuiJdJIPl+bF0JOEX3RPjf 6+Io/pycEJq9+fU+9JjKgfD13VnrOQHBTV8u0Mw/IlNUiGJnbkEUYbRsfnrGvl/ik143 OFusLRMXKIKNvOyuNucXqm9e/A6TuORZ0zjNE5dt2ELAxkp2I1I9cNhRsLcsDhIJqhhU zt/G+t5HEJRMDqkXcyielktnIDxjN13NvNRFhLvkZVX80NaMknuIOC7u0CR0bAyBbGkp 8dcQ== X-Gm-Message-State: ALoCoQkp+uB5Kqh1Fw7nL6BseD62z+OAbD5lOzXMglS7o6Adqi8hyr+wfiv4F716uTSSn3XAaLx7 X-Received: by 10.194.82.229 with SMTP id l5mr21552018wjy.140.1449254680611; Fri, 04 Dec 2015 10:44:40 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id t5sm4643236wmt.1.2015.12.04.10.44.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Dec 2015 10:44:39 -0800 (PST) From: Thomas Monjalon To: David Marchand Date: Fri, 04 Dec 2015 19:43:30 +0100 Message-ID: <2454571.EZpaR9m7WP@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151204173114.GH5048@6wind.com> References: <1449239893-4012-1-git-send-email-david.marchand@6wind.com> <1449249063-9792-1-git-send-email-david.marchand@6wind.com> <20151204173114.GH5048@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] mk: fix objects/library order when linking 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: Fri, 04 Dec 2015 18:44:40 -0000 2015-12-04 18:31, Adrien Mazarguil: > On Fri, Dec 04, 2015 at 06:11:03PM +0100, David Marchand wrote: > > The initial problem has been seen while building mlx4 pmd as a shared library > > on Ubuntu 14.04 (gcc 4.8.4-2ubuntu1~14.04). > > > > Resulting .so will lack the DT_NEEDED entry for libibverbs: > > > > marchand@ubuntu1404:~/dpdk$ ldd ./build/lib/librte_pmd_mlx4.so > > linux-vdso.so.1 => (0x00007fff87ebb000) > > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2ced21a000) > > /lib64/ld-linux-x86-64.so.2 (0x00007f2ced821000) > > > > And trying to load it in testpmd triggers this error: > > > > [...] > > EAL: librte_pmd_mlx4.so: undefined symbol: ibv_query_port > > [...] > > > > After some strace, the problem comes from the --as-needed option passed to the > > linker. > > > > It is safer to specify libraries we depend on after the objects we are linking > > into a shared library, especially when the linker is invoked with options like > > --as-needed. > > > > Fixes: bef06a8a0655 ("mk: set library dependencies in shared object file") > > > > Signed-off-by: David Marchand > > --- > > > > Changes since v1: > > - added some details in commitlog since Thomas does not like "safer" > > argument :-) Yes, that's better justified with these details :) > Obvious issue that did not show up in our tests under Debian. > > Acked-by: Adrien Mazarguil Applied, thanks