DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>, Luca Boccassi <bluca@debian.org>
Subject: Re: [dpdk-dev] [PATCH v2] build: skip detecting libpcap via pcap-config
Date: Mon, 12 Oct 2020 14:02:19 +0200
Message-ID: <CAJFAV8yLcPDsMzVvEnpiY9P24rnD5auCQbxOA17ArFkvjpb4Mg@mail.gmail.com> (raw)
In-Reply-To: <20201009141914.205284-1-bruce.richardson@intel.com>

On Fri, Oct 9, 2020 at 4:19 PM Bruce Richardson
<bruce.richardson@intel.com> 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 <bruce.richardson@intel.com>

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
# rpm -q meson

# 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
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

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
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

 #include <pcap.h>
        #include <stdio.h>
        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

David Marchand

  parent reply	other threads:[~2020-10-12 12:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 17:05 [dpdk-dev] [RFC PATCH] build: use libpcap only from pkg-config Bruce Richardson
2020-10-08 17:08 ` Bruce Richardson
2020-10-09  9:09   ` Luca Boccassi
2020-10-09 10:32     ` Bruce Richardson
2020-10-09 12:51       ` Luca Boccassi
2020-10-09 13:39         ` Bruce Richardson
2020-10-09 14:19 ` [dpdk-dev] [PATCH v2] build: skip detecting libpcap via pcap-config Bruce Richardson
2020-10-09 14:54   ` Luca Boccassi
2020-10-12 15:12     ` David Marchand
2020-10-12 12:02   ` David Marchand [this message]
2020-10-12 12:47     ` Bruce Richardson
2020-10-12 12:48   ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJFAV8yLcPDsMzVvEnpiY9P24rnD5auCQbxOA17ArFkvjpb4Mg@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=bluca@debian.org \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git