From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 645061F7 for ; Thu, 5 Mar 2015 10:28:33 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 05 Mar 2015 01:28:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,345,1422950400"; d="scan'208";a="536436082" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 05 Mar 2015 01:28:22 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.117]) by IRSMSX154.ger.corp.intel.com ([169.254.12.237]) with mapi id 14.03.0195.001; Thu, 5 Mar 2015 09:28:14 +0000 From: "Ananyev, Konstantin" To: "Qiu, Michael" , Thomas Monjalon , David Marchand Thread-Topic: [dpdk-dev] [PATCH] eal/linux: fix build Thread-Index: AQHQVY6CeEHjWecIIEi+suQw90R2yZ0NoXew Date: Thu, 5 Mar 2015 09:28:13 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213F3FCB@irsmsx105.ger.corp.intel.com> References: <1425372295-27839-1-git-send-email-thomas.monjalon@6wind.com> <1637153.LCrn9VkBbJ@xps13> <533710CFB86FA344BFBF2D6802E60286CEED33@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <533710CFB86FA344BFBF2D6802E60286CEED33@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] eal/linux: fix build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 09:28:34 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiu, Michael > Sent: Thursday, March 05, 2015 9:13 AM > To: Thomas Monjalon; David Marchand > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] eal/linux: fix build >=20 > On 3/4/2015 6:24 AM, Thomas Monjalon wrote: > >>> Compilation fails in some distributions because of missing unistd.h > >>> needed for pread/pwrite (seen with Suse): > >>> lib/librte_eal/linuxapp/eal/eal_pci_uio.c:62:2: > >>> error: implicit declaration of function 'pread' > >>> > >>> Fixes: 4a499c649590 ("eal/linux: enable uio_pci_generic support") > >>> > >>> Signed-off-by: Thomas Monjalon > >> Acked-by: David Marchand > > Applied >=20 > Hi, Thomas >=20 > This patch may be need to be reverted, as the error still exists. >=20 > suse-11-sp3-32:~/dpdk # uname -a > Linux suse-11-sp3-32 3.0.76-0.11-pae #1 SMP Fri Jun 14 08:21:43 UTC 2013 > (ccab990) i686 i686 i386 GNU/Linux >=20 > suse-11-sp3-32:~/dpdk # gcc -v > Using built-in specs. > COLLECT_GCC=3Dgcc > COLLECT_LTO_WRAPPER=3D/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.1/lto-= wrapper > Target: i686-pc-linux-gnu > Configured with: ./configure > Thread model: posix > gcc version 4.5.1 (GCC) >=20 > As I try to check the manual of pread, find that it has two: > ---------------------------------------------------------- > Man: find all matching manual pages > * pread (2) > pread (3p) > Man: What manual page do you want? > Man: > ------------------------------------------------------------- > PREAD(2) Linux > Programmer's > Manual PREAD(2) >=20 >=20 >=20 > NAME > pread, pwrite - read from or write to a file descriptor at a > given offset >=20 > SYNOPSIS > #define _XOPEN_SOURCE 500 >=20 > #include >=20 > ssize_t pread(int fd, void *buf, size_t count, off_t offset); >=20 > ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset= ); >=20 > -------------------------------------------------------------------------= ------------------------------------------------------------------- >=20 > READ(3P) POSIX > Programmer's > Manual READ(3P) >=20 >=20 >=20 > PROLOG > This manual page is part of the POSIX Programmer's Manual. The > Linux implementation of this interface may differ (consult the > corresponding Linux > manual page for details of Linux behavior), or the interface may > not be implemented on Linux. >=20 > NAME > pread, read - read from a file >=20 > SYNOPSIS > #include >=20 >=20 >=20 > ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); > ssize_t read(int fildes, void *buf, size_t nbyte); >=20 >=20 > DESCRIPTION >=20 > -------------------------------------------------------------------------= ----------------------------------------------------------------- >=20 > While I try to add marco #define _XOPEN_SOURCE 500 >=20 > Other errors show up >=20 > Who knows how to solve this issue? >=20 > Thanks, > Michael >=20 > > Can you try to add: CFLAGS_.o :=3D -D_GNU_SOURCE to your Makefile? Konstantin