GNU bug report logs -
#18508
Incomplete type pollfd
Previous Next
Reported by: Andreas Enge <andreas <at> enge.fr>
Date: Fri, 19 Sep 2014 10:32:01 UTC
Severity: normal
Merged with 18507
Done: Andy Wingo <wingo <at> pobox.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18508 in the body.
You can then email your comments to 18508 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#18508
; Package
guile
.
(Fri, 19 Sep 2014 10:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Enge <andreas <at> enge.fr>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Fri, 19 Sep 2014 10:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
guile-2.0.11 fails to build on Redhat 6.5 with the following error message:
CC libguile_2.0_la-fports.lo
fports.c: In function 'fport_input_waiting':
fports.c:612: error: variable 'pollfd' has initializer but incomplete type
fports.c:612: warning: excess elements in struct initializer
fports.c:612: warning: (near initialization for 'pollfd')
fports.c:612: error: 'POLLIN' undeclared (first use in this function)
fports.c:612: error: (Each undeclared identifier is reported only once
fports.c:612: error: for each function it appears in.)
fports.c:612: warning: excess elements in struct initializer
fports.c:612: warning: (near initialization for 'pollfd')
fports.c:612: warning: excess elements in struct initializer
fports.c:612: warning: (near initialization for 'pollfd')
fports.c:612: error: storage size of 'pollfd' isn't known
fports.c:614: warning: implicit declaration of function 'poll'
fports.c:612: warning: unused variable 'pollfd'
make[3]: *** [libguile_2.0_la-fports.lo] Error 1
make[3]: Leaving directory `/home/enge/lib-intel/guile-2.0.11/libguile'
Versions of software used:
gcc 4.4.7
libffi 3.0.5
libunistring 0.9.3
libgc 7.1
ltdl 2.2.6
gmp 4.3.1
pkg-config 0.23
I am attaching the config.log.
Andreas
[config.log.xz (application/octet-stream, attachment)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#18508
; Package
guile
.
(Mon, 22 Sep 2014 08:44:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18508 <at> debbugs.gnu.org (full text, mbox):
Andreas Enge <andreas <at> enge.fr> skribis:
> guile-2.0.11 fails to build on Redhat 6.5 with the following error message:
>
> CC libguile_2.0_la-fports.lo
> fports.c: In function 'fport_input_waiting':
> fports.c:612: error: variable 'pollfd' has initializer but incomplete type
> fports.c:612: warning: excess elements in struct initializer
> fports.c:612: warning: (near initialization for 'pollfd')
> fports.c:612: error: 'POLLIN' undeclared (first use in this function)
> fports.c:612: error: (Each undeclared identifier is reported only once
> fports.c:612: error: for each function it appears in.)
> fports.c:612: warning: excess elements in struct initializer
> fports.c:612: warning: (near initialization for 'pollfd')
> fports.c:612: warning: excess elements in struct initializer
> fports.c:612: warning: (near initialization for 'pollfd')
> fports.c:612: error: storage size of 'pollfd' isn't known
> fports.c:614: warning: implicit declaration of function 'poll'
> fports.c:612: warning: unused variable 'pollfd'
> make[3]: *** [libguile_2.0_la-fports.lo] Error 1
> make[3]: Leaving directory `/home/enge/lib-intel/guile-2.0.11/libguile'
>
> Versions of software used:
> gcc 4.4.7
What libc version is this?
It would have been great, if this is still possible, to post lib/poll.h.
Normally that file uses #include_next to get libc’s <poll.h>, but maybe
that mechanism somehow fails with old GCC versions.
Ludo’.
Merged 18507 18508.
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Mon, 22 Sep 2014 11:57:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#18508
; Package
guile
.
(Fri, 26 Sep 2014 14:41:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 18508 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Sep 22, 2014 at 10:43:27AM +0200, Ludovic Courtès wrote:
> What libc version is this?
The package is glibc-2.12-1.107.el6_4.5.x86_64.
> It would have been great, if this is still possible, to post lib/poll.h.
> Normally that file uses #include_next to get libc’s <poll.h>, but maybe
> that mechanism somehow fails with old GCC versions.
I just retried the compilation, and poll.h is attached. It contains
#if 1
# include_next <poll.h>
#endif
There is a /usr/include/poll.h, which contains the one line
#include <sys/poll.h>
This in turn does an
#include <bits/poll.h>
which has a line
#define POLLIN 0x001 /* There is data to read. */
I tried to replace the # include_next in lib/poll.h by a simple #include,
but that leads to
../lib/poll.h:31:18: error: #include nested too deeply
Andreas
[poll.h (text/plain, attachment)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#18508
; Package
guile
.
(Sat, 27 Sep 2014 09:42:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 18508 <at> debbugs.gnu.org (full text, mbox):
Andreas Enge <andreas <at> enge.fr> skribis:
> On Mon, Sep 22, 2014 at 10:43:27AM +0200, Ludovic Courtès wrote:
>> What libc version is this?
>
> The package is glibc-2.12-1.107.el6_4.5.x86_64.
Oh, OK.
>> It would have been great, if this is still possible, to post lib/poll.h.
>> Normally that file uses #include_next to get libc’s <poll.h>, but maybe
>> that mechanism somehow fails with old GCC versions.
>
> I just retried the compilation, and poll.h is attached. It contains
> #if 1
> # include_next <poll.h>
> #endif
Normally that should be enough to get the ‘struct pollfd’ definition no?
Does something like this build correctly with ‘gcc -Wall -c’:
--8<---------------cut here---------------start------------->8---
#include <poll.h>
int
foo (struct pollfd *x)
{
return x->events;
}
--8<---------------cut here---------------end--------------->8---
Thanks,
Ludo’.
Information forwarded
to
bug-guile <at> gnu.org
:
bug#18508
; Package
guile
.
(Sat, 27 Sep 2014 12:41:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 18508 <at> debbugs.gnu.org (full text, mbox):
On Sat, Sep 27, 2014 at 11:41:09AM +0200, Ludovic Courtès wrote:
> Does something like this build correctly with ‘gcc -Wall -c’:
>
> --8<---------------cut here---------------start------------->8---
> #include <poll.h>
>
> int
> foo (struct pollfd *x)
> {
> return x->events;
> }
> --8<---------------cut here---------------end--------------->8---
Yes, without any warning.
Andreas
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 20 Jul 2016 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.