我试图在RedHatEnterpriseLinux5.5上的主目录中编译Perl 5.12.1。然而,当我试图制造时,我最终会收到以下错误:
Making IO (all)
make[1]: Entering directory `/users/rmi1/build/perl-5.12.0/dist/IO'
make[1]: Leaving directory `/users/rmi1/build/perl-5.12.0/dist/IO'
Making all in dist/IO
make all PERL_CORE=1 LIBPERL_A=libperl.a LINKTYPE=dynamic
make[1]: Entering directory `/users/rmi1/build/perl-5.12.0/dist/IO'
cc -c -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -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
make[1]: Leaving directory `/users/rmi1/build/perl-5.12.0/dist/IO'
Unsuccessful make(dist/IO): code=512 at make_ext.pl line 449.
make: *** [lib/auto/IO/IO.so] Error 2
是什么导致了这一切?
发布于 2010-05-26 00:43:18
我发现perl附带了一个本地poll.h,如果您没有正确的头,它会尝试模拟poll()的功能;它位于/dist/IO/poll.h (根位于tarball的根目录)。由于RHEL5.5有poll.h,/Configure已经检测到它的存在,并将自己设置为使用系统poll.h而不是它自己的。以下/dist/IO/poll.h上的差异使其正常工作:
14c14
< # include <poll.h>
---
> # include <sys/poll.h>
我真的不知道为什么<poll.h>
不工作,即使<sys/poll.h>
工作。我的<poll.h>
(位于/usr/include/poll.h)如下:
#include <sys/poll.h>
发布于 2010-05-26 00:30:51
我猜你错过了poll.h
顺便说一下,为什么不使用rpm来安装Perl呢?那就容易多了。
希望这能有所帮助。
https://serverfault.com/questions/145288
复制相似问题