They run Debian lenny at work, and I wanted to install gentoo-prefix in my home directory. During the bootstrap setup where I'm told to do 'env FEATURES="-collision-protect" emerge --oneshot portage', it pulls in perl-5.12.2-r4. As it was building, I encountered the following error when building: ../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -typemap ../../lib/ExtUtils/typemap IO.xs > IO.xsc && mv IO.xsc IO.c i686-pc-linux-gnu-gcc -c -fno-strict-aliasing -pipe -I/nfs/users/nfs_a/aq2/gentoo/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i686 -pipe -m32 -DVERSION=\"1.25_02\" -DXS_VERSION=\"1.25_02\" -fPIC "-I../.." IO.c IO.xs: In function 'XS_IO__Poll__poll': IO.xs:249: error: invalid application of 'sizeof' to incomplete type 'struct pollfd' IO.xs:253: error: invalid use of undefined type 'struct pollfd' IO.xs:253: error: dereferencing pointer to incomplete type IO.xs:255: error: invalid use of undefined type 'struct pollfd' IO.xs:255: error: dereferencing pointer to incomplete type IO.xs:257: error: invalid use of undefined type 'struct pollfd' IO.xs:257: error: dereferencing pointer to incomplete type IO.xs:261: error: invalid use of undefined type 'struct pollfd' IO.xs:261: error: dereferencing pointer to incomplete type IO.xs:262: error: invalid use of undefined type 'struct pollfd' IO.xs:262: error: dereferencing pointer to incomplete type make[1]: *** [IO.o] Error 1 In case it helps, /usr/include/poll.h looks like: #include <sys/poll.h> As specified here (http://serverfault.com/questions/145288/make-error-when-compiling-perl-5-12-1-rhel-5-5), I fudged the files in usr/portage to apply this patch to the sources before they compile: --- dist/IO/poll.h 2011-03-02 09:19:19.600310000 +0000 +++ dist/IO/poll.h 2011-03-02 09:22:02.637505000 +0000 @@ -11,7 +11,7 @@ # define POLL_H #if (defined(HAS_POLL) && defined(I_POLL)) || defined(POLLWRBAND) -# include <poll.h> +# include <sys/poll.h> #else #ifdef HAS_SELECT and, strangely, it worked. I got perl to compile just fine. Reproducible: Always Steps to Reproduce:
Created attachment 264343 [details] Here is what Perl detects during the configuration phase. poll.h and sys/poll.h are found just fine
hmmm, I think that it should try to include sys/poll.h before poll.h based on the HAVE_XXXX guards. I wonder if this is already fixed in 5.13.2 already though.
Just FYI, once I'd set up the prefix and emerge --sync'ed, Perl compiled just fine - it was version 5.12.3 .
ok, do you think we can close this bug then? or do we need a new bootstrap image?
Well, I could try a newer version of Perl during bootstrap instead of patching the existing version, to see if that will cure it.
in that case just use ./bootstrap-prefix.sh ${EPREFIX} latest_tree instead of tree, that should give you the latest perl ebuild during bootstrap
OK, I did the latest_tree thing, and it worked. I guess you can close the ticket now - if anyone has the same problem, hopefully they'll find this page and do the same thing. Thanks
ok, we just have to put a new snapshot live, then other people will not hit this bug any more (it's basically making tree == latest_tree of today)
(In reply to comment #8) > ok, we just have to put a new snapshot live, then other people will not hit > this bug any more (it's basically making tree == latest_tree of today) I'll sign off on that based on linux nightly testing.
I can confirm that bootstrapping the prefix with 'tree' now works fine and does not encounter this error (on Ubuntu anyway)
thanks for the confirmation