From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3CAE7A0A0A; Tue, 23 Mar 2021 22:21:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6D6C4014D; Tue, 23 Mar 2021 22:21:51 +0100 (CET) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id 87C4C40143 for ; Tue, 23 Mar 2021 22:21:50 +0100 (CET) Received: by mail-lf1-f49.google.com with SMTP id f3so20429610lfu.5 for ; Tue, 23 Mar 2021 14:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eqvzVDRVTms1+FH5OyNpsMJxe6PUljlhOhYYEp1fQAo=; b=F2AUDxDlbznyb0vVKNtR2HPxT6FY9M4PRaqKlBdrVU323EXlRz7PdlybAr8lJOvA42 BlLo85TLcjQeVZSaeOjgFkSPMxq9CzgxMZvzOkuzaOr0/s2O+/OzHYD0dfTeyxn06v8I bpXcdDBHC7KHia8vBTIOxWrKDUL9Z/yAkEAPNfvUVH8R6qI4cnJHGbuCiIK1HpqydGj+ 8l7jBpy1n/oU51XcMJM45I+mk5ar/SCZ8tdng56eoHIYgDfbe2Trp90Y6Yn+8cxufQ0n yAIMXfNL9HiZVWvjasMoVyO04kJGB8ob5vwsxEhnnT2Ur/OMSXJr/bDklyxvmpGohyNp JTVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eqvzVDRVTms1+FH5OyNpsMJxe6PUljlhOhYYEp1fQAo=; b=gR6qJsCUIRc17tITF67kFXTRIfHIgWOWvWRAjxb2Nc7XQseMdSDu5ovH/bRpodrwCi DSOju0sUq2b1eCRum45IEkKgYOtA5AWvLYWh0eVVzGCT0TEXPU+sU5hd/er82kaApufN Xdy0sjo85g8/x2exYqTeBBjzkhzP7rPobcNcyrw9zVf164WENt4QMrzHNHyDTP4DVq9l KBXFmJ94YwQzqHybrikONX55wHp0qA14hAZueTEbqv4pfDqNED09iy1TVMwXDiiX54nZ P9BHZZIUdf4hLnaPF1zJ9d/eCYEi1K8QMYHp48PCQkotw3SJEfntPUW6IO2HDbm+jojG MvnQ== X-Gm-Message-State: AOAM532qnOh5pyOqGk+lkD4pJeH2SirQUq7U887u2DN369SZ/cPrTmTo mpK9TWMgUAztkdMtNIbq5Rs= X-Google-Smtp-Source: ABdhPJwInQ+f4c+nGBDGzJ/82pSGtI3B3qkcb9jomOiORxupQET96Vl/cp57iHAqqcYuTDxhGXRT4A== X-Received: by 2002:a05:6512:b26:: with SMTP id w38mr16873lfu.152.1616534509994; Tue, 23 Mar 2021 14:21:49 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id 21sm21731lfh.231.2021.03.23.14.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 14:21:49 -0700 (PDT) Date: Wed, 24 Mar 2021 00:21:48 +0300 From: Dmitry Kozlyuk To: Nick Connolly , Gabriel Ganne Cc: Bruce Richardson , Kevin Laatz , dev@dpdk.org, olivier.matz@6wind.com, thierry.herbelot@6wind.com, "Dmitry Malloy (MESHCHANINOV)" , tal Shnaiderman , "Menon, Ranjit" , Thomas Monjalon , Tyler Retzlaff Message-ID: <20210324002148.5d7e008d@sovereign> In-Reply-To: <7f3f5e7c-6731-1062-49ef-52e071a076d1@mayadata.io> References: <20210322140757.7888-1-gabriel.ganne@6wind.com> <20210323011800.2a50fde8@sovereign> <7f3f5e7c-6731-1062-49ef-52e071a076d1@mayadata.io> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 2021-03-23 13:35 (UTC+0000), Nick Connolly: [...] > 2. Adding -lpthread to libdpdk.pc is more problematic. The application > is almost > certain to be using a threads library. If this is a 3rd party > library, then the link > command will potentially include two libraries defining the same > exports. > Which one takes precedence will depend upon the ordering in the > application's > build system which seems somewhat arbitrary given that the DPDK > introduced > dependency is not required. Agreed. In my tests it's "-pthread", not "-lpthread", but still. See also comments here: https://github.com/mesonbuild/meson/issues/553 Summary: dependency('threads') meaning is vague on Windows. As a exotic case, I'm using NixOS which provides MinGW-w64 built with mcfgthread (https://github.com/lhmouse/mcfgthread) and it doesn't even recognize -pthread compiler flag, so this patch breaks cross-build for me. > I'd still advocate for: >=20 > if not is_windows > =C2=A0=C2=A0=C2=A0 threads_dep =3D dependency('threads') > endif It's more like, in lib/librte_telemetry/meson.build: if not is_windows ext_deps +=3D threads_dep endif Gabriel, by the way, why is it needed for librte_metrics? Isn't librte_telemetry enough since it's a dependency to EAL?