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 5B0FCA0A0C; Thu, 1 Jul 2021 11:22:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C0D440141; Thu, 1 Jul 2021 11:22:42 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 4256C40040 for ; Thu, 1 Jul 2021 11:22:40 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id BED047F57F; Thu, 1 Jul 2021 12:22:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru BED047F57F DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1625131359; bh=kec+TmCKOl77ngoXBASIFK9yp5Mkm7WHsYHcwv6n+rU=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=H2Zg+nQG1Dyo78bgbp566HEcIprGbTDd0HgD5pdTomyLTY4Us9CHCX4MJQ8Id6rOk hRy6slHR3HFDintgwPeV2K5w9/X3cu3PN7bxJGpCMDJu6+9VATT5KbYmeBL4doItiy DCAKbE8OGXAHBKU17CBGI1myP/jcagAS8UvhX8is= To: Thomas Monjalon , Bruce Richardson Cc: dev@dpdk.org, Igor Romanov , Andy Moreton , Ivan Malov , David Marchand References: <20210527152510.1551026-1-andrew.rybchenko@oktetlabs.ru> <20210618134032.1922012-20-andrew.rybchenko@oktetlabs.ru> <23888533.A65Z59arLz@thomas> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <8a3c653e-65db-fc48-253c-db78037635f3@oktetlabs.ru> Date: Thu, 1 Jul 2021 12:22:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <23888533.A65Z59arLz@thomas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 19/20] net/sfc: support flow action COUNT in transfer rules 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" On 6/21/21 12:30 PM, Thomas Monjalon wrote: > 21/06/2021 10:28, David Marchand: >> On Fri, Jun 18, 2021 at 3:41 PM Andrew Rybchenko >>> +# for gcc compiles we need -latomic for 128-bit atomic ops >>> +if cc.get_id() == 'gcc' >>> + ext_deps += cc.find_library('atomic') >>> +endif >> >> This patch breaks compilation on rhel/fedora (most failures in UNH for >> this series are linked to this issue) when the libatomic rpm is not >> installed. > [...] >> """ >> Running compile: >> Working directory: >> /home/dmarchan/builds/build-gcc-static/meson-private/tmpdu27j15z >> Command line: gcc -L/home/dmarchan/intel-ipsec-mb/install/lib >> -I/home/dmarchan/intel-ipsec-mb/install/include >> /home/dmarchan/builds/build-gcc-static/meson-private/tmpdu27j15z/testfile.c >> -o /home/dmarchan/builds/build-gcc-static/meson-private/tmpdu27j15z/output.exe >> -pipe -D_FILE_OFFSET_BITS=64 -O0 -Wl,--start-group -latomic >> -Wl,--end-group -Wl,--allow-shlib-undefined >> >> Code: >> int main(void) { return 0; } >> >> Compiler stdout: >> >> Compiler stderr: >> /usr/bin/ld: cannot find /usr/lib64/libatomic.so.1.2.0 >> collect2: error: ld returned 1 exit status >> >> Library atomic found: YES >> """ > > Indeed it looks like a bug in meson. > > How does it behave with clang 32-bit? > > For reference, in config/meson.build: > """ > # for clang 32-bit compiles we need libatomic for 64-bit atomic ops > if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false > atomic_dep = cc.find_library('atomic', required: true) > add_project_link_arguments('-latomic', language: 'c') > dpdk_extra_ldflags += '-latomic' > endif > """ > >> [dmarchan@wsfd-netdev66 dpdk]$ cat >> /usr/lib/gcc/x86_64-redhat-linux/10/libatomic.so >> INPUT ( /usr/lib64/libatomic.so.1.2.0 ) >> [dmarchan@wsfd-netdev66 dpdk]$ file /usr/lib64/libatomic.so.1.2.0 >> /usr/lib64/libatomic.so.1.2.0: cannot open >> `/usr/lib64/libatomic.so.1.2.0' (No such file or directory) > > We must handle this case where libatomic is not completely installed. > > Hope there is a good fix possible. > The build works fine for me on FC34, but it has libatomic-11.1.1-3.fc34.x86_64 installed. I'd like to understand what we're trying to solve here. Are we trying to make meson to report the missing library correctly? If so, I think I can do simple check using cc.links() which will fail if the library is not found. I'll test that it works as expected if the library is not completely installed.