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 54ADCA0613 for ; Tue, 24 Sep 2019 08:46:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8689B2BAB; Tue, 24 Sep 2019 08:46:29 +0200 (CEST) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id C4045E07 for ; Tue, 24 Sep 2019 08:46:27 +0200 (CEST) Received: by mail-lj1-f194.google.com with SMTP id n14so662079ljj.10 for ; Mon, 23 Sep 2019 23:46:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JtsHafVXhYqct0UC/+6nRJAHhNFJ4shVVOm3Z0EJuow=; b=aEkor3VGsCzxu4lBzwx5VK6OK0eFWqKm209ot7K1IRl+o74hXvfpMdVJLOAnEasUrb Qb3Oi/qJPcy9iG8PMcJFWVK0Ud54g2t5NlL7eqtUMW6tm4aWhhuJLNc+70ny89TpfBzo xpKMde1N8XTtVd712IzHpz+KjDm8uIuYaEBih7fA/RA7spotYD5IWOWBrFjyWDT1aBoq ieRwdt2cEYN07bCavK8i3SSceZyt6l7PD+sRoA+o3ecpnfisEsVpvZkzJuqefvFwY1Kw OJ1WDqqc6DErlYTTCNy+Rl46YceY1t3UhLB6rQTXvwokAuE98cK2W7HLb5KddulhyVrN ZK7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JtsHafVXhYqct0UC/+6nRJAHhNFJ4shVVOm3Z0EJuow=; b=pMpD/scvp8QG9MFyDcAxydgPjsQaJK1itZSBopJsaLTgp8reTE+D1KO1GVHuC2VmlJ 38sIiGvQlAz9CaOgsBHTnEH1kUcITlZcxlmjtcD1Xh2+AGyijiI1LVFVbqirU0ThyO6m 2kzog/l0pEUBcP4SqG40eFp7DBcnvpjEQj0WQoZE83Eel8gYFLH+2jKiYYfZYan6toiV 8cbwXrgAfkZbJhXU/uebSBmzZDmvVJOgQVr5o4AN5A12KGqtrJ79Yt8vU6WQPSTk2yQt 6kYMa0ISnLHMFq6dQPId0vYgMsznO5xHGJ3Lq+YDs3QkBjtMF/KCn7fPai1RwWYshbIY rcvg== X-Gm-Message-State: APjAAAVOKp3sAvTGU6I/MDEdqDm0XNelS7p9PDgBPkv13pu0nJrcDH2t MTr7jV/FaagDjl+TF0OVbWnv7Q== X-Google-Smtp-Source: APXvYqxDr51pbL1H3MRYCDCBBeLSrpev5fpEcPbSKHYeYQNvq1ZlRqJPkh5ZvXuMLMrEoOcwBAFH2A== X-Received: by 2002:a2e:91d0:: with SMTP id u16mr875179ljg.164.1569307587405; Mon, 23 Sep 2019 23:46:27 -0700 (PDT) Received: from [10.0.0.72] (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v1sm204412lji.89.2019.09.23.23.46.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Sep 2019 23:46:26 -0700 (PDT) To: Bruce Richardson Cc: Thomas Monjalon , Ray Kinsella , dev@dpdk.org, Aaron Conole , Michael Santana , John McNamara , Marko Kovacevic , David Hunt , Vladimir Medvedkin , Robert Sanford , Erik Gabriel Carrillo , mattias.ronnblom@ericsson.com, stephen@networkplumber.org, Andrzej Ostruszka References: <20190917075754.8310-1-amo@semihalf.com> <20190919151624.GA1999@bricha3-MOBL.ger.corp.intel.com> <1873473.QF300kEeir@xps> <20190923120658.GA2003@bricha3-MOBL.ger.corp.intel.com> <20190923161326.GB2003@bricha3-MOBL.ger.corp.intel.com> From: Andrzej Ostruszka Message-ID: <42bc3e03-768f-b90c-5f81-5a1cb525bb2f@semihalf.com> Date: Tue, 24 Sep 2019 08:46:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190923161326.GB2003@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 01/10] build: add an option to enable LTO build 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" On 9/23/19 6:13 PM, Bruce Richardson wrote: [...] > However, testing on my system with the meson build, I'm getting lots of > link errors [See below]. Any suggestions? > > /Bruce > > /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans93.ltrans.o: in function `ena_stop': > :(.text+0x9ed6): undefined reference to `rte_timer_stop' [...] What is 'default_library'? It should be 'shared' as mentioned in the docs. The problem is that RTE_BUILD_SHARED_LIB is statically defined in rte_config.h used by meson build. This results in broken static libraries (those that are using versioned symbols - like timer/lpm/distributor) - since the MAP_STATIC_SYMBOL macro defining the default alias is empty. With LTO compiler (or rather linker) is quite aggressive in removing stuff that it thinks is not needed. Regards Andrzej PS. IMHO this SHARED_LIB define should be removed from the rte_config.h and meson.build should be updated to detect 'default_library' and add it as needed. Don't know exactly how meson behaves if 'default_library' is 'both' - the docs say that it reuses objects from static build, so we might have to work around it for LTO & 'both'.