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 D1B12A04B6; Mon, 12 Oct 2020 14:02:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D4A11D6DB; Mon, 12 Oct 2020 14:02:43 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id F1B6B1D6CB for ; Mon, 12 Oct 2020 14:02:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602504159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hrHAacv2VfWHw0vp0viEJzpDyKbJEzDvnVzFSF3/xpI=; b=Riy35flRtYsMkOxBWhRnzl0YCSTwdo7uOZaxUskdDrN9ytqV3Y072bFl9NxFoP2dW07bnZ kPsITL6YbDWpxy0sWwANCY2BAaWKcpFrpLvsrsLB6p0eCCbj6YTVao37blhch3DpvP66ZN hiYg205vPFTAxyqSIsUs5KRqbhMoIvk= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-531-FM4bJTqmNzy2VxQ8lsJ8YA-1; Mon, 12 Oct 2020 08:02:32 -0400 X-MC-Unique: FM4bJTqmNzy2VxQ8lsJ8YA-1 Received: by mail-vk1-f199.google.com with SMTP id w4so173608vkm.8 for ; Mon, 12 Oct 2020 05:02:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hrHAacv2VfWHw0vp0viEJzpDyKbJEzDvnVzFSF3/xpI=; b=pR8363xl4x2+jCyDPcLjjbE4TWNlcFB+wAlsbDY2sDVIZ6Cif7wR40Zt6G4yAabfx8 4Zv+ftfRuZTHgeJ9tlEUX89FakQ42/6j5orWLExhuIVBe1CSXX5+GhNEGoU1/NZ1cj4Q Iv07sov3B+f/lg8+WyWGaOfng2gYyR4OjXWf8/740rpddeLNRmpapZOIfnk20golSed9 dDav48XjSrw6+SUQGYEDBkoOfYWYhYqf0zZO7G51985chvvoTYp0gWjX6PJO8VCvaC/R 04UfL4q9L8gdZAiMwHAuKoh6DcNFWi2AD/hdY96PbLjE3WLlKCpjW273bVIycjxZjzry NReg== X-Gm-Message-State: AOAM532fcgK5WkqyFd6hBrN1u13Qi6EpP9t+99uSlCXjlOZBBphqOJ8D voRdcJjCo127aF2XwvaqRBm2g1Y7MIrWVVuEqGZg358pqzNA7tEJWzdEnF24p6NrRkNZnxwIuLV WsNI3YeQ31nka2Gt3wYM= X-Received: by 2002:a67:fd7a:: with SMTP id h26mr13857153vsa.27.1602504151661; Mon, 12 Oct 2020 05:02:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgrV0EW6EYJXrThfbSkCL9BbwOQYj7br78+avjP5O6zgjylJwHcDuXXdpSL2D5SzvkMnpnxakV9nuJD4YL0vk= X-Received: by 2002:a67:fd7a:: with SMTP id h26mr13857128vsa.27.1602504151374; Mon, 12 Oct 2020 05:02:31 -0700 (PDT) MIME-Version: 1.0 References: <20201008170536.124111-1-bruce.richardson@intel.com> <20201009141914.205284-1-bruce.richardson@intel.com> In-Reply-To: <20201009141914.205284-1-bruce.richardson@intel.com> From: David Marchand Date: Mon, 12 Oct 2020 14:02:19 +0200 Message-ID: To: Bruce Richardson Cc: dev , Luca Boccassi Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] build: skip detecting libpcap via pcap-config 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 Fri, Oct 9, 2020 at 4:19 PM Bruce Richardson wrote: > > When compiling for a slightly different architecture, e.g. 32-bit on 64-bit > systems using CFLAGS rather than a cross-file, the pcap-config utility can > often return parameters that are unusable for the build in question, i.e. > providing the native 64-bit library paths rather than checking for 32-bit > equivalent. > > Since many distros now include a version of libpcap with a > pkg-config file, and for those that don't find-library should work ok as a > fallback, we can explicitly just use pkg-config in the dependency search, > causing meson to skip trying to use pcap-config. > > Signed-off-by: Bruce Richardson I also hit (this?) issue on a fc32 with both 32-bit and 64-bit pcap installed. Can you confirm? If so, we might want to backport this as I get the same problem with v19.11.4. # rpm -q libpcap libpcap-1.9.1-3.fc32.x86_64 libpcap-1.9.1-3.fc32.i686 # rpm -q meson meson-0.55.3-1.fc32.noarch # meson --reconfigure build The Meson build system Version: 0.55.3 Source dir: /root/dpdk Build dir: /root/dpdk/build Build type: native build Program cat found: YES Project name: DPDK Project version: 20.11.0-rc0 C compiler for the host machine: cc (gcc 10.2.1 "cc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)") C linker for the host machine: cc ld.bfd 2.34-5 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program pkg-config found: YES Program gen-pmdinfo-cfile.sh found: YES Program list-dir-globs.py found: YES Program check-symbols.sh found: YES Program options-ibverbs-static.sh found: YES Program binutils-avx512-check.sh found: YES Program python3 found: YES (/usr/bin/python3) Program cat found: YES Program ../buildtools/symlink-drivers-solibs.sh found: YES (/bin/sh /root/dpdk/config/../buildtools/symlink-drivers-solibs.sh) Checking for size of "void *" : 8 Library m found: YES Library numa found: NO Library libfdt found: NO Found pkg-config: /usr/bin/pkg-config (1.6.3) Found CMake: /usr/bin/cmake (3.17.4) Run-time dependency libbsd found: NO (tried pkgconfig and cmake) pcap-config found: YES (/usr/bin/pcap-config) config/meson.build:166:0: ERROR: Could not get return value of pcap_lib_version() A full log can be found at /root/dpdk/build/meson-logs/meson-log.txt # cat /root/dpdk/build/meson-logs/meson-log.txt [...] Determining dependency 'libpcap' with pkg-config executable '/usr/bin/pkg-config' PKG_CONFIG_PATH: Called `/usr/bin/pkg-config --modversion libpcap` -> 1 pcap-config binary missing from cross or native file, or env var undefined. Trying a default pcap-config fallback at pcap-config pcap-config found: YES (/usr/bin/pcap-config) None of 'CC_LD' are defined in the environment, not changing global flags. Running compile: Working directory: /root/dpdk/build/meson-private/tmp15ks2yx6 Command line: cc /root/dpdk/build/meson-private/tmp15ks2yx6/testfile.c -o /root/dpdk/build/meson-private/tmp15ks2yx6/output.exe -pipe -D_FILE_OFFSET_BITS=64 -O0 -Wl,--start-group -lpcap -Wl,--end-group Code: #include #include int main(void) { printf ("%s", (char*) pcap_lib_version()); return 0; } Compiler stdout: Compiler stderr: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/10/../../../libpcap.so when searching for -lpcap /usr/bin/ld: skipping incompatible /lib/libpcap.so when searching for -lpcap /usr/bin/ld: skipping incompatible /usr/lib/libpcap.so when searching for -lpcap /usr/bin/ld: cannot find -lpcap collect2: error: ld returned 1 exit status Could not compile test file /root/dpdk/build/meson-private/tmp15ks2yx6/testfile.c: 1 config/meson.build:166:0: ERROR: Could not get return value of pcap_lib_version() -- David Marchand