From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com [209.85.192.48]) by dpdk.org (Postfix) with ESMTP id E2A1337A6 for ; Mon, 13 Jun 2016 11:24:20 +0200 (CEST) Received: by mail-qg0-f48.google.com with SMTP id l44so63756988qgd.0 for ; Mon, 13 Jun 2016 02:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QWuvRna7G5u7z0izTNkRv7+wQ1D3mxkYCNSDcAVxCCQ=; b=hI/3WVfKk4RfhxCieNPGeDN3FBd5sHDqn/4R47DdaEFiNpJIh444J1I3DKrLCbC/GJ kSZAhOMeT9F50ZECf0NkPROZ67CQo2AclJztniqD8LXSsTeK/ewPk9g94nAr5jPetsyG L4Ot7Bw8ltQtFHHgRMDdQp8kDqujLNp+FKMLPZZEuBdDtkwzgwqYnyoHAl9Kknk7ithF PyrESpSkqd6G8YodQMSUOp5O6WgFMbyZwch7Gu4w8W8bupxT/Phxv72lI5Ipt6/Yh3+u tBPkaxucwSNL0rhFKnNmJUgr95BMeX4jV5AKKIGmHZrNmhw5Uub47td510FBdscSfF9v +kXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QWuvRna7G5u7z0izTNkRv7+wQ1D3mxkYCNSDcAVxCCQ=; b=Wd/TUdWwhIje2yGMZnTm7PsgUK0E3Bwju3oQl4gkdnd58G7LO2VuvZuQuHuEpq8B1V l+W7XjfhptPV1qFFGuy9s/DfbN1mhKqk+/2wUMLRuQaVj6oBRRa9qG1CQLMll1XXJCCY ukn/7wjdXCf5s9VBoj+d+nFoAVv8uwXPNsgedbgCbGSb4Ge9zynyMPcnOHE4LoZJylJJ sqnvIJBCsxJmevzRwOFvUtrgolGm9Ns6LdbT798jaDdEWk9e66QfoLnVgfNojebW/8a9 HnvY1Op29tpSMdLYw9fPm/Bj4LbYJVzHb6wNaYv1lv//JI6gj1uUyjtKUD4cNoQyInFN oIGA== X-Gm-Message-State: ALyK8tJBHIcsfsYvQBWNYX47Ij26s/U4VYerH7vb2GJ+BuWlhngy7AfM9Rsqp8R4JM08KAKbj2mdqRLJEUhHLQMv X-Received: by 10.141.2.212 with SMTP id e203mr956789qhd.12.1465809860073; Mon, 13 Jun 2016 02:24:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.162.9 with HTTP; Mon, 13 Jun 2016 02:24:00 -0700 (PDT) In-Reply-To: <575E7776.2010206@intel.com> References: <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> <1465583550-21020-1-git-send-email-ferruh.yigit@intel.com> <1465583550-21020-7-git-send-email-ferruh.yigit@intel.com> <2540990.UDeWx5vTGn@xps13> <575E7776.2010206@intel.com> From: Christian Ehrhardt Date: Mon, 13 Jun 2016 11:24:00 +0200 Message-ID: To: Ferruh Yigit Cc: Thomas Monjalon , dev , Panu Matilainen Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 6/6] mk: prevent overlinking in applications 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: Mon, 13 Jun 2016 09:24:21 -0000 Hi, great work on cleaning that up already. I applied v3 of the series and see already much better results. But I found some more that should be part of this. I don't know how generally available a similar solution is, but usually in our build dpkg-shlibdeps checks for under/overlinking issues. I let that run on a dir built from git plus v3 of the series in discussion here. There are two way of open dependency issues left: 1. some libraries use symbols of other libraries they are not linked with correctly yet 2. the appliactions are still overlinking We need to finalize #1 first before being able to tackle #2 without breaking something. I'll send a patch for the following so it can be part of your v4 $ for binfile in $(find debian/build/shared-root/lib -executable -type f; find debian/build/shared-root/app -executable -type f;); do printf "\n\n\nTesting %s\n" $binfile; dpkg-shlibdeps -e $binfile -ldebian/build/shared-root/lib/ | grep -v "installed in their package's directory"; done Testing debian/build/shared-root/lib/librte_port.so.3 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_sched_port_dequeue used by debian/build/shared-root/lib/librte_port.so.3 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_sched_port_enqueue used by debian/build/shared-root/lib/librte_port.so.3 found in none of the libraries dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_pmd_bond.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_mempool_create used by debian/build/shared-root/lib/librte_pmd_bond.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_ring_create used by debian/build/shared-root/lib/librte_pmd_bond.so.1 found in none of the libraries Testing debian/build/shared-root/lib/librte_pipeline.so.3 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol per_lcore__lcore_id used by debian/build/shared-root/lib/librte_pipeline.so.3 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_eal_has_hugepages used by debian/build/shared-root/lib/librte_pipeline.so.3 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_mem_virt2phy used by debian/build/shared-root/lib/librte_pipeline.so.3 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_free used by debian/build/shared-root/lib/librte_pipeline.so.3 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_log used by debian/build/shared-root/lib/librte_pipeline.so.3 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_zmalloc_socket used by debian/build/shared-root/lib/librte_pipeline.so.3 found in none of the libraries Testing debian/build/shared-root/lib/librte_pmd_null_crypto.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_ring_create used by debian/build/shared-root/lib/librte_pmd_null_crypto.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_kvargs_parse used by debian/build/shared-root/lib/librte_pmd_null_crypto.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_kvargs_free used by debian/build/shared-root/lib/librte_pmd_null_crypto.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_kvargs_process used by debian/build/shared-root/lib/librte_pmd_null_crypto.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_ring_lookup used by debian/build/shared-root/lib/librte_pmd_null_crypto.so.1 found in none of the libraries dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_pmd_vhost.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_eal_driver_register used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_log used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol pthread_join used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol pthread_cancel used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_eal_has_hugepages used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_mem_virt2phy used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_zmalloc_socket used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol pthread_create used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol per_lcore__lcore_id used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_socket_id used by debian/build/shared-root/lib/librte_pmd_vhost.so.1 found in none of the libraries dpkg-shlibdeps: warning: 2 other similar warnings have been skipped (use -v to see them all) dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_pmd_fm10k.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_kvargs_count used by debian/build/shared-root/lib/librte_pmd_fm10k.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_kvargs_free used by debian/build/shared-root/lib/librte_pmd_fm10k.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_kvargs_parse used by debian/build/shared-root/lib/librte_pmd_fm10k.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_kvargs_process used by debian/build/shared-root/lib/librte_pmd_fm10k.so.1 found in none of the libraries dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_pmd_pcap.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_eal_driver_register used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_cycles_vmware_tsc_map used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_zmalloc_socket used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_get_tsc_hz used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_free used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_eal_has_hugepages used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_socket_id used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol eal_timer_source used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_mem_virt2phy used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_log used by debian/build/shared-root/lib/librte_pmd_pcap.so.1 found in none of the libraries dpkg-shlibdeps: warning: 2 other similar warnings have been skipped (use -v to see them all) dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_sched.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_zmalloc used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol __rte_panic used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol per_lcore__lcore_id used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_free used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_eal_has_hugepages used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_get_tsc_hz used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_mem_virt2phy used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_log used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_cycles_vmware_tsc_map used by debian/build/shared-root/lib/librte_sched.so.1 found in none of the libraries dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_pmd_af_packet.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_eal_has_hugepages used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_zmalloc_socket used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_free used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_socket_id used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_mem_virt2phy used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_eal_driver_register used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol per_lcore__lcore_id used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_log used by debian/build/shared-root/lib/librte_pmd_af_packet.so.1 found in none of the libraries Testing debian/build/shared-root/lib/librte_port.so.2 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_sched_port_enqueue used by debian/build/shared-root/lib/librte_port.so.2 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_sched_port_dequeue used by debian/build/shared-root/lib/librte_port.so.2 found in none of the libraries dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_pmd_null.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_zmalloc_socket used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_mem_virt2phy used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_socket_id used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_cpu_get_flag_enabled used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_log used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_eal_has_hugepages used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_free used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol per_lcore__lcore_id used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_eal_driver_register used by debian/build/shared-root/lib/librte_pmd_null.so.1 found in none of the libraries dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Testing debian/build/shared-root/lib/librte_ip_frag.so.1 dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory dpkg-shlibdeps: warning: symbol rte_eal_has_hugepages used by debian/build/shared-root/lib/librte_ip_frag.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_log used by debian/build/shared-root/lib/librte_ip_frag.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol per_lcore__lcore_id used by debian/build/shared-root/lib/librte_ip_frag.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_zmalloc_socket used by debian/build/shared-root/lib/librte_ip_frag.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_cpu_get_flag_enabled used by debian/build/shared-root/lib/librte_ip_frag.so.1 found in none of the libraries dpkg-shlibdeps: warning: symbol rte_mem_virt2phy used by debian/build/shared-root/lib/librte_ip_frag.so.1 found in none of the libraries dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd On Mon, Jun 13, 2016 at 11:05 AM, Ferruh Yigit wrote: > On 6/11/2016 7:34 AM, Thomas Monjalon wrote: > > Hi Ferruh, > > > > 2016-06-10 19:32, Ferruh Yigit: > >> --- a/mk/rte.app.mk > >> +++ b/mk/rte.app.mk > >> @@ -50,6 +50,14 @@ ifeq ($(NO_LDSCRIPT),) > >> LDSCRIPT = $(RTE_LDSCRIPT) > >> endif > >> > >> +ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) > >> +# Workaround to eal <-> mempool cyclic dependency > >> +_LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool > >> +endif > >> + > >> +# Link only the libraries used in the application > >> +_LDLIBS-y += --as-needed > > > > I think we do not need this workaround. > > The dependency of EAL logs on mempool is now removed. > > We only have the dependency of EAL ivshmem on librte_ivshmem header > > (which needs mempool and rings headers). > > > > I missed that dependency removed, this is good, I will send a new > version of the patch. > > Thanks, > ferruh >