From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id BFFD227D for ; Fri, 1 Mar 2019 16:13:29 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id a188so5577355wmf.3 for ; Fri, 01 Mar 2019 07:13:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=FaXwhe+mG5l3RltlHPby2o5VwZm+hNoxJaygJyaqT88=; b=Z1gPhYpNKztNONAmvj5XMcByreA+mvcRVumLHjRGu8rLWO39Sztld1DvS31Bn0Urtb oL4al53Ff6573iW3rqPn7o1FK3tSpUTKJB+3vfhZGPDcNXbkEZbd2ADhG5njJnKmZCNn dyut/3GXgdeu7hdldlmNBv/MgSoC4EMgrGeXzJV382c6+5xaEWZ6+4WEQrANwk3NMBoU wItFRcaNTIvlqHKzjPGpkZnEFxVyKHthWUXQvHiqjci0mmae1D+8dPr+Lr0sT6fn6lfG 8BkqzhoGfHTr8miT6r8EYQjj75XKkxVvn9EVnJvmPL1DRUAepEzYoHdJdTLzc0iTKl1a iq0g== X-Gm-Message-State: AHQUAubZjByfrcEfqLp19M/7Bo5gY5jx1mw/XQ8GL1DVdCQIxGtoy2XY BTdl0U929fhDAvH92oEz99k= X-Google-Smtp-Source: APXvYqwNidsFkmIMEyHOkCs8wa/l0zHVaDZPc/mncP+uOr7pSvJfwQpK9EfCMm3W6anejCYm++OHEQ== X-Received: by 2002:a1c:c205:: with SMTP id s5mr3383004wmf.116.1551453209163; Fri, 01 Mar 2019 07:13:29 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:b00c:66c8:99df:336]) by smtp.gmail.com with ESMTPSA id y1sm16932870wrh.65.2019.03.01.07.13.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Mar 2019 07:13:27 -0800 (PST) Message-ID: <9b75311daf2a7926a3b4b66a7751f85b90a7b5da.camel@debian.org> From: Luca Boccassi To: Thomas Monjalon , Bruce Richardson Cc: dev@dpdk.org Date: Fri, 01 Mar 2019 15:13:27 +0000 In-Reply-To: <8361830.nL5yRZOfUf@xps> References: <20190103175725.5836-1-bluca@debian.org> <20190227135332.GA99260@bricha3-MOBL.ger.corp.intel.com> <20190228174026.GA207688@bricha3-MOBL.ger.corp.intel.com> <8361830.nL5yRZOfUf@xps> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v8 6/6] build: use dependency for pcap and fallback to find_library 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: , X-List-Received-Date: Fri, 01 Mar 2019 15:13:29 -0000 On Fri, 2019-03-01 at 14:13 +0100, Thomas Monjalon wrote: > 28/02/2019 18:40, Bruce Richardson: > > On Wed, Feb 27, 2019 at 01:53:32PM +0000, Bruce Richardson wrote: > > > On Wed, Feb 27, 2019 at 12:03:48PM +0000, Luca Boccassi wrote: > > > > On Wed, 2019-02-27 at 11:56 +0100, Thomas Monjalon wrote: > > > > > 27/02/2019 11:50, Luca Boccassi: > > > > > > On Wed, 2019-02-27 at 09:47 +0000, Bruce Richardson wrote: > > > > > > > On Wed, Feb 27, 2019 at 09:33:12AM +0100, Thomas Monjalon > > > > > > > wrote: > > > > > > > > 26/02/2019 18:49, Luca Boccassi: > > > > > > > > > On Tue, 2019-02-26 at 17:46 +0000,=20 > > > > > > > > > luca.boccassi@gmail.com > > > > > > > > > wrote: > > > > > > > > > > From: Luca Boccassi > > > > > > > > > >=20 > > > > > > > > > > pcap has historically shipped a custom pcap-config > > > > > > > > > > binary > > > > > > > > > > tool > > > > > > > > > > which > > > > > > > > > > does the job of pkg-config. It was never compatible > > > > > > > > > > with > > > > > > > > > > cross > > > > > > > > > > compilation. > > > > > > > > > > Meson uses it when using dependency(), which then > > > > > > > > > > means > > > > > > > > > > cross > > > > > > > > > > compilation fails. > > > > > > > > > > Set pcap-config to empty in the meson cross > > > > > > > > > > compilation > > > > > > > > > > files > > > > > > > > > > so > > > > > > > > > > that Meson will not use it, and add a fallback in > > > > > > > > > > case > > > > > > > > > > dependency() fails. > > > > > > > > > > libpcap 1.9.0 finally ships a pkg-config file so > > > > > > > > > > everything > > > > > > > > > > will > > > > > > > > > > work out of the box in the future. > > > > > > > > > >=20 > > > > > > > > > > Signed-off-by: Luca Boccassi < > > > > > > > > > > luca.boccassi@microsoft.com> > > > > > > > > > > --- > > > > > > > > > > v8: added back pcap change separately. Tested with > > > > > > > > > > bootlin > > > > > > > > > > cross-compilation toolchain, everything seems > > > > > > > > > > to work. > > > > > > > > >=20 > > > > > > > > > I had some time to invest so I added back this > > > > > > > > > change, in a > > > > > > > > > way > > > > > > > > > that > > > > > > > > > works with cross compilation too. Given the series > > > > > > > > > wasn't > > > > > > > > > merged > > > > > > > > > yet > > > > > > > > > and there was a conflict I've done a v8 rather than a > > > > > > > > > single > > > > > > > > > separate > > > > > > > > > patch, but it's independent from the rest. > > > > > > > > >=20 > > > > > > > > > More testing is of course welcome! > > > > > > > >=20 > > > > > > > > I still see the same error when cross-compiling: > > > > > > > >=20 > > > > > > > > /usr/include/stdint.h:109: error: "__INT64_C" redefined > > > > > > > >=20 > > > > > > > Can patches 1-5 be merged anyway, leaving 6 for later? > > > > > > >=20 > > > > > > > /Bruce > > > > > >=20 > > > > > > Yes please... > > > > >=20 > > > > > Yes, sure. I am checking other patches to push them. > > > >=20 > > > > Thanks! > > > >=20 > > > > > > Thomas, could you please give me detailed instructions on > > > > > > how to > > > > > > repro? > > > > > > I used the bootlin toolchain you linked me last time, and > > > > > > passed -- > > > > > > cross-file config/arm/arm64_armv8_linuxapp_gcc to Meson, > > > > > > and > > > > > > everything > > > > > > built fine both with and without an arm64 build of libpcap > > > > > > in the > > > > > > sysroot. With the previous version that I removed it would > > > > > > fail. > > > > > > Not > > > > > > sure what I'm missing! > > > > >=20 > > > > > I'm running devtools/test-meson-builds.sh on my ArchLinux > > > > > which has > > > > > aarch64-linux-gnu-gcc 8.2.0 but no arm pcap I guess. > > > >=20 > > > > The script is working fine too - I have the toolchain in /tmp > > > > so I > > > > simply run it with PATH=3D/tmp/toolchain/bin:$PATH and everything > > > > built > > > > fine including the arm targets. > > > >=20 > > > > The key part in the patch was adding pcap-config =3D '' to the > > > > various > > > > arm configs, could you please double check that it was applied > > > > correctly? Without that, Meson finds and calls the native pcap- > > > > config > > > > which gives wrong (native) flags and causes the errors you are > > > > seeing. > > > > Otherwise I'm a bit lost, I can't understand why it's all > > > > working here > > > > and not there. > > > >=20 > > > > meson --werror -Dexamples=3Dall --default-library=3Dshared --cross- > > > > file config/arm/arm64_armv8_linuxapp_gcc > > > > /home/bluca/git/dpdk/devtools/.. build-arm64-armv8 > > > > The Meson build system > > > > Version: 0.49.2 > > > > Source dir: /home/bluca/git/dpdk > > > > Build dir: /home/bluca/git/dpdk/build-arm64-armv8 > > > > Build type: cross build > > > > Project name: DPDK > > > > Project version: 19.05.0-rc0 > > > > Native C compiler: ccache gcc (gcc 8.2.0 "gcc (Debian 8.2.0-21)=20 > > > > 8.2.0") > > > > Cross C compiler: aarch64-linux-gnu-gcc (gcc 7.3.0) > > > > Host machine cpu family: aarch64 > > > > Host machine cpu: armv8-a > > > > Target machine cpu family: aarch64 > > > > Target machine cpu: armv8-a > > > > <...> > > > > $ file build-arm64-armv8/lib/librte_eal.so.9.1=20 > > > > build-arm64-armv8/lib/librte_eal.so.9.1: ELF 64-bit LSB pie > > > > executable, ARM aarch64, version 1 (SYSV), dynamically linked, > > > > not stripped > > > >=20 > > >=20 > > > I'm testing on Fedora 29 and this patch works fine with the > > > cross-builds > > > too. Maybe it's something special in Arch Linux again. I'll > > > trying testing > > > it out in an Arch VM - though sadly Arch linux is failing to > > > update for me, > > > so I won't have exactly Thomas' setup. > >=20 > > I've also run this on Arch with the cross compiler installed and > > see no > > issues. Thomas, can you look at the log below and see what differs > > from > > your setup? >=20 > I'm sorry for the noise. > It compiles fine after cleaning the build directory :/ No worries, thanks for checking again! --=20 Kind regards, Luca Boccassi