From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 48E349ABF for ; Thu, 19 May 2016 20:17:25 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id w143so296718wmw.0 for ; Thu, 19 May 2016 11:17:25 -0700 (PDT) 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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=PCa5vwm6BY9toCsgG7JPJx9Jxguxj6RQpkf1ssRZYzc=; b=rtmyZOmrSv/DQguzoTb+xR1jg3Q45sbak45tQhu+buy0aQloZ7jTIX6z/087buHOHq wmDpdunL6YFcKHSDuvad6pwM02G9XVt5uMzd/QN+BOhd+CQ9W/C/lGUJ2oxwgHLULmC8 LovP47vdZfZX6iYqWgeqlkxMCQmsiOgxLLMT2Fqi4cgelgCLT690SlfIhSx10XNJdnLA YO0Hrol8tWA8Ms0af0TT93QNiYqjLm8sf0U7htQXw/taH+ZyOOsDp+MRiQADIYKAvjmx SEs6UHEFxq8rwSQJDv6z/SFp1DXt2pxpJYavO4PwFOU6Mp0HX1uCq3P/qkKglf/SrmNk wgJA== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=PCa5vwm6BY9toCsgG7JPJx9Jxguxj6RQpkf1ssRZYzc=; b=hd6PP5eUmB0gAgjGqR7NdGLfZP8dGbBc3J8BS1oGNKQGxQhMd9d0Pim8EH6w999cQY ++q2sKprsj0OAA4io/IArRaEmFbLmCWxfm8sViW6I116dWF8B8xL4JdSibT9eldJhagF oqJ7SbZQJ34DuXeOhAZmyh9O5LezqAouK+3UwGBTFG4vNTvwC5pxhluzW+JbyFKMthNg YHininh4YvZSUujP+y1Mjh31YjjWdTkpXpNNL7qbUsqQ5UZwUmbjnNSQBddxkD5AfTVU gi65rn/JP5FUsh6adLGNR+eIKfZP33jlyEOWhrvHsUke0TH79OpJaNuIDgQSE1Yuitc9 JEhA== X-Gm-Message-State: AOPr4FVaVPNKRw21fnRkJrWhunBmzu8HYTDvnAD+pwZUlnFcTY99aXPp/i6l6c3BGDpPxBop X-Received: by 10.194.184.44 with SMTP id er12mr15744780wjc.83.1463681845014; Thu, 19 May 2016 11:17:25 -0700 (PDT) Received: from xps13.localnet (111.202.154.77.rev.sfr.net. [77.154.202.111]) by smtp.gmail.com with ESMTPSA id b15sm499109wmd.1.2016.05.19.11.17.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 May 2016 11:17:24 -0700 (PDT) From: Thomas Monjalon To: Christian Ehrhardt Cc: dev@dpdk.org Date: Thu, 19 May 2016 20:17:16 +0200 Message-ID: <2785570.uvvpCYCSoT@xps13> User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] Underlinked libs and overlinked applications - an issue? 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: Thu, 19 May 2016 18:17:25 -0000 2016-05-19 17:38, Christian Ehrhardt: > Hi, > I was working on the new 16.04 build system to adapt deb packaging to it. > I remember somewhen back in the DPDK 2.2 and shared+combined library days I > had some issues with over/underlinking - but it seems those are still > existent or came back. I would say it has always been like that. Thanks for raising the issue. > After a build in almost default config (just disabled the kernel modules) > and set RTE_MACHINE to default I find the following. > > #1 > The libraries are all only linked against external things - even clearly > using internal structures: > ldd usr/lib/x86_64-linux-gnu/librte_lpm.so.2 > linux-vdso.so.1 => (0x00007fff7e7a5000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f175d4dd000) > /lib64/ld-linux-x86-64.so.2 (0x0000558d3afbf000) The DT_NEEDED entries are created only for external dependencies. Probably we should create ones for internal dependencies based on the variable DEPDIRS-y. > #2 > The Application then seem to try to make up for that by realizing all that > is missing. > But looking at the app alone it seems overlinked by that - it is not using > all of these on its own. > ldd usr/bin/cmdline_test > linux-vdso.so.1 => (0x00007ffeec9ea000) > librte_distributor.so.1 => not found > librte_reorder.so.1 => not found > [...] > librte_jobstats.so.1 => not found > [...] > And for example none of the librte_jobstats.so.1 symbols are used > "directly" in there. Yes every libraries are put for every apps in rte.app.mk. Probably that we could better use DEPDIRS-y for apps.