Message ID | 1425372295-27839-1-git-send-email-thomas.monjalon@6wind.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 4A97F5A57; Tue, 3 Mar 2015 09:45:49 +0100 (CET) Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by dpdk.org (Postfix) with ESMTP id 98DD7595A for <dev@dpdk.org>; Tue, 3 Mar 2015 09:45:47 +0100 (CET) Received: by wesw55 with SMTP id w55so38298521wes.5 for <dev@dpdk.org>; Tue, 03 Mar 2015 00:45:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=GrCZlcPvMUtKsWPnSAWgo/jc70+vmpUxN5RAYJr7Ah4=; b=AXXGl47Y67VTrh4+8FzMehrivmjKeJpJ8cbNMcTLdvbhUzF/TuW9I02LqoY/cHw+EK fTw4cG6X4TXUf/E/QlxMNqtYOurG1iXLEj8j+en98XSgZbLkwvDDCYDxsss0wzOOEc9O EjHeaP3Pd2Ndg2Ybfw/b8WNCc1WqwH1m+zMJEHxsoPkbDCs2fZ6ULInJlBjyq8rUHl3N garuwuNNOXpaR2werDF0R4kwKTlSJ6sDJ3ZygbgI09snIewePPl+8MXTyed1u8+JC31H duvIiGLtDLh3u6lFHjhHnat9nKuVzrKUGVowT0YXolExVB71o58WYorCtIu5Y00ejvSN tl2A== X-Gm-Message-State: ALoCoQldMYqNCn+lGrThPgWEOTKvo+8TtLxDEhFkPTq60weesl+/RDYkgYeVvuLvvG6TybsQrG18 X-Received: by 10.181.8.99 with SMTP id dj3mr43921460wid.83.1425372347472; Tue, 03 Mar 2015 00:45:47 -0800 (PST) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id yy9sm287475wjc.20.2015.03.03.00.45.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Mar 2015 00:45:46 -0800 (PST) From: Thomas Monjalon <thomas.monjalon@6wind.com> To: dev@dpdk.org Date: Tue, 3 Mar 2015 09:44:55 +0100 Message-Id: <1425372295-27839-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Thomas Monjalon
March 3, 2015, 8:44 a.m. UTC
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 <thomas.monjalon@6wind.com>
---
lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Tue, Mar 3, 2015 at 9:44 AM, Thomas Monjalon <thomas.monjalon@6wind.com> 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 <thomas.monjalon@6wind.com> > --- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > index 35d31c5..0b397ca 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > @@ -32,6 +32,7 @@ > */ > > #include <string.h> > +#include <unistd.h> > #include <fcntl.h> > #include <dirent.h> > #include <sys/stat.h> > > Acked-by: David Marchand <david.marchand@6wind.com>
> > 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 <thomas.monjalon@6wind.com> > Acked-by: David Marchand <david.marchand@6wind.com> Applied
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 <thomas.monjalon@6wind.com> >> Acked-by: David Marchand <david.marchand@6wind.com> > Applied Hi, Thomas This patch may be need to be reverted, as the error still exists. 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 suse-11-sp3-32:~/dpdk # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/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) 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) NAME pread, pwrite - read from or write to a file descriptor at a given offset SYNOPSIS #define _XOPEN_SOURCE 500 #include <unistd.h> ssize_t pread(int fd, void *buf, size_t count, off_t offset); ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset); -------------------------------------------------------------------------------------------------------------------------------------------- READ(3P) POSIX Programmer's Manual READ(3P) 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. NAME pread, read - read from a file SYNOPSIS #include <unistd.h> ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); ssize_t read(int fildes, void *buf, size_t nbyte); DESCRIPTION ------------------------------------------------------------------------------------------------------------------------------------------ While I try to add marco #define _XOPEN_SOURCE 500 Other errors show up Who knows how to solve this issue? Thanks, Michael >
> -----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 > > 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 <thomas.monjalon@6wind.com> > >> Acked-by: David Marchand <david.marchand@6wind.com> > > Applied > > Hi, Thomas > > This patch may be need to be reverted, as the error still exists. > > 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 > > suse-11-sp3-32:~/dpdk # gcc -v > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/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) > > 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) > > > > NAME > pread, pwrite - read from or write to a file descriptor at a > given offset > > SYNOPSIS > #define _XOPEN_SOURCE 500 > > #include <unistd.h> > > ssize_t pread(int fd, void *buf, size_t count, off_t offset); > > ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset); > > -------------------------------------------------------------------------------------------------------------------------------------------- > > READ(3P) POSIX > Programmer's > Manual READ(3P) > > > > 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. > > NAME > pread, read - read from a file > > SYNOPSIS > #include <unistd.h> > > > > ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); > ssize_t read(int fildes, void *buf, size_t nbyte); > > > DESCRIPTION > > ------------------------------------------------------------------------------------------------------------------------------------------ > > While I try to add marco #define _XOPEN_SOURCE 500 > > Other errors show up > > Who knows how to solve this issue? > > Thanks, > Michael > > > Can you try to add: CFLAGS_<file_name>.o := -D_GNU_SOURCE to your Makefile? Konstantin
Hi Michael, 2015-03-05 09:13, Qiu, Michael: > 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 <thomas.monjalon@6wind.com> > >> Acked-by: David Marchand <david.marchand@6wind.com> > > Applied > > Hi, Thomas > > This patch may be need to be reverted, as the error still exists. No I don't think it should be reverted. It must be completed. [...] > NAME > pread, pwrite - read from or write to a file descriptor at a > given offset > > SYNOPSIS > #define _XOPEN_SOURCE 500 > > #include <unistd.h> [...] > While I try to add marco #define _XOPEN_SOURCE 500 I think that the good thing to do. > Other errors show up Are they hard to fix? > Who knows how to solve this issue?
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index 35d31c5..0b397ca 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -32,6 +32,7 @@ */ #include <string.h> +#include <unistd.h> #include <fcntl.h> #include <dirent.h> #include <sys/stat.h>