From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 334E17CB8 for ; Tue, 15 Aug 2017 12:56:39 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id g32so424650wrd.5 for ; Tue, 15 Aug 2017 03:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references :content-transfer-encoding:mime-version; bh=mOX0QYnvUtoZKZ9wB+XaSF2eBR7TAH+9YTsUjjP5HME=; b=CLMq6+/NTIg4k6F+tIkPgAvM5XybYsDugOM4r5nYIc7TuNmHjZgEl5O7SMl4vaThQz wdxIXpsG34hBfQTTkvcoFCbik2kq0dbfx6K06C4ZgSe6DvEimml0OcbHuQw/k6TgfRJR 01Xo+8+ma4mXpcNoUZAWqdBaraV9BuCpSvkn8JYB9aS1pwHq3MQk/m8kbPslSqsarePY xFYSNM/RxQ5uqotzbZSVvK52kLTDq1c3HJtPZj/Tkkr0PI6KNveZvDJ9zJnz1Nq8sxSK VhZDMk1ifH6PW2gm/X2Cm0SnpTsKWxlxv1ghPHpCvKNDU7PWU//b9Vn/6xBeleDyI9bI haVg== 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:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=mOX0QYnvUtoZKZ9wB+XaSF2eBR7TAH+9YTsUjjP5HME=; b=S1X6FV0YlaztFTz/BtQWgopVmVMm6wQyVwUetZ/cL/zjHITNZL8Jd78wv2fCD3gMZK FVdMplLQ1PncyWpJ+Ej+VJoZBfxY02Jao4uHGGdy8EfAGBc+ypI9xJ1smpuSOBdm7H1X uXIH/XcDT+rcl1umL1f1zlXWvGtCpSq/TR6dEvzRhgX9cHLs7FxEBtup6+Hv/I+LY/XP ObMtJhEha9sE6CYTEW/+TGG9kZsMAWKLqn1jFa2+0fmxqNiWJAGyyEUW9wJcQGZFGrgH BBmtt7XmabSCOq0WEFbjYiOz6KpFuQR1ufXVRtpN8KTm0v4MUWbTcl/Mr1NV6MuKhHPG O+VQ== X-Gm-Message-State: AHYfb5hh6AV+TC0MRY3eJG6EAUqd5q9I8sXkKSAR2WAjCW4kFggcRuz1 uYd4qRwZN3W/QSWSWTE= X-Received: by 10.223.139.23 with SMTP id n23mr18277682wra.249.1502794599645; Tue, 15 Aug 2017 03:56:39 -0700 (PDT) Received: from localhost ([213.251.34.151]) by smtp.gmail.com with ESMTPSA id d10sm1477735wmh.4.2017.08.15.03.56.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Aug 2017 03:56:39 -0700 (PDT) Message-ID: <1502794598.17570.4.camel@gmail.com> From: Luca Boccassi To: Bruce Richardson , dev@dpdk.org Date: Tue, 15 Aug 2017 11:56:38 +0100 In-Reply-To: <20170814095208.166496-1-bruce.richardson@intel.com> References: <20170814095208.166496-1-bruce.richardson@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [RFCv2 00/40] Building DPDK with meson and ninja 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: Tue, 15 Aug 2017 10:56:40 -0000 On Mon, 2017-08-14 at 10:51 +0100, Bruce Richardson wrote: > Following on from previous RFC [http://dpdk.org/dev/patchwork/patch/2 > 5104/] > here is a second draft implementation for building DPDK with meson > and > ninja. While still not building all of DPDK, and needing patch > cleanup so > that patches don't overwrite previous work, it is more complete in > many > ways than the previous version and includes: >=20 > * dynamic build configuration e.g. building pcap driver only if pcap > is > =C2=A0 found, only build af_packet if the target is linux, and only > building QAT > =C2=A0 and openssl crypto drivers if libcrypto is found > * support for pmdinfo inside the PMDs(for shared builds) and binaries > (for > =C2=A0 static builds) > * generalized/standardized way of building libs and drivers, though > the > =C2=A0 drivers code still needs generalization at the driver, rather than > =C2=A0 driver-class level. > * support for having a pkgconfig file for DPDK on install, and > helloworld > =C2=A0 and l2fwd can be built using the pkgconfig info (via make, not > ninja) > * support for library versions > * an implementation for FreeBSD as well as Linux > * all libraries are included in the build, as well as a number of > NIC, > =C2=A0 crypto, and mempool drivers > * the igb_uio kernel module is build via the kernel Kbuild system as > part > =C2=A0 of a meson/ninja DPDK build >=20 > there is still plenty to do on this, but please review and test it > out. > I've kept the patches split so that the evolution of the work is a > bit > clearer than having it all send in a monolithic patch. All feedback > welcome. I recommend one uses the latest meson release for this, > though the > minimum version supported should be v0.4. >=20 > I've tested static and dynamic builds with clang and gcc on Fedora > 26, and > done test builds on FreeBSD 11 with clang too. Build with other > compilers > and on other OS's may have issues, so YMMV. >=20 > To do a basic build, using gcc and with shared libs, in a folder > called "gcc-build": >=20 > user@host:dpdk$ meson gcc-build > .... > user@host:dpdk$ cd gcc-build > user@host:gcc-build$ ninja > user@host:gcc-build$ sudo ninja install >=20 > To do a build with clang, using static libs: >=20 > user@host:dpdk$ CC=3Dclang meson --default_library=3Dstatic clang- > build > .... > user@host:dpdk$ cd clang-build > user@host:clang-build$ ninja > user@host:clang-build$ sudo ninja install >=20 > Other options can be adjusted by running "mesonconf" in the build > directory, i.e. gcc-build or clang-build in the examples above. Hi Bruce, This is great, thank you! I'll try to give this set a run in the Debian context as soon as I have time. It's also great to see a pkg-config file! I haven't gone through the diff yet, but do you think it would be possible, now or later on, to add the option to install architecture- specific headers in a different directory than the arch-independent ones? This is in the context of multi-arch: on Debian and Ubuntu there's a lot of effort to make sure libraries built on different architectures are co-installable. Which means either the files must be identical, or in arch-specific paths (eg: /usr/include/x86_64-linux-gnu/ and /usr/lib/x86_64-linux-gnu/). --=20 Kind regards, Luca Boccassi