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 456C1A04C2; Mon, 25 Nov 2019 14:22:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B8EEE2952; Mon, 25 Nov 2019 14:22:54 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 2E0E228EE for ; Mon, 25 Nov 2019 14:22:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Nov 2019 05:22:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,241,1571727600"; d="scan'208";a="358840445" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.92]) ([10.237.220.92]) by orsmga004.jf.intel.com with ESMTP; 25 Nov 2019 05:22:50 -0800 To: Bruce Richardson , john.mcnamara@intel.com Cc: dev@dpdk.org References: <20191122160359.11625-1-bruce.richardson@intel.com> <20191122160359.11625-3-bruce.richardson@intel.com> From: "Burakov, Anatoly" Message-ID: <32c38528-1178-c266-83d8-b46194f5a88b@intel.com> Date: Mon, 25 Nov 2019 13:22:50 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20191122160359.11625-3-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/8] doc: add building with meson to linux GSG 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 22-Nov-19 4:03 PM, Bruce Richardson wrote: > Add instructions on building DPDK and using the pkg-config file to the > linux GSG. > > Signed-off-by: Bruce Richardson > --- > + > +Building Applications Using Installed DPDK > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +When installed system-wide, DPDK provides a pkg-config file ``libdpdk.pc`` for applications to query as part of their build. > +It's recommended that the pkg-config file be used, rather than hard-coding the parameters (cflags/ldflags) > +for DPDK into the application build process. > + > +An example of how to query and use the pkg-config file can be found in the ``Makefile`` of each of the example applications included with DPDK. > +A simplified example snippet is shown below, where the target binary name has been stored in the variable ``$(APP)`` > +and the sources for that build are stored in ``$(SRCS-y)``. > + > +.. code-block:: makefile > + > + PKGCONF = pkg-config > + > + CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) > + LDFLAGS += $(shell $(PKGCONF) --libs libdpdk) > + > + $(APP): $(SRCS-y) Makefile > + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) Also, as we have recently discovered, enabling DPDK libraries system-wide may not be so trivial after all, and may involve running ldconfig and/or modifying the /etc/ld.so.conf.d/ to include the locally built libraries. Should we include this as well? An argument can be made that this is distro-specific and shouldn't be in this guide, but these problems happen on distros that are common enough and are explicitly supported by DPDK, so perhaps /some/ note on possible issues with library search paths should be present? -- Thanks, Anatoly