首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >编译Perl 5.12.1 (RHEL5.5)时出错

编译Perl 5.12.1 (RHEL5.5)时出错
EN

Server Fault用户
提问于 2010-05-25 23:28:57
回答 2查看 3.2K关注 0票数 3

我试图在RedHatEnterpriseLinux5.5上的主目录中编译Perl 5.12.1。然而,当我试图制造时,我最终会收到以下错误:

代码语言:javascript
运行
复制
    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

是什么导致了这一切?

EN

回答 2

Server Fault用户

发布于 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上的差异使其正常工作:

代码语言:javascript
运行
复制
14c14
< #  include <poll.h>
---
> #  include <sys/poll.h>

我真的不知道为什么<poll.h>不工作,即使<sys/poll.h>工作。我的<poll.h> (位于/usr/include/poll.h)如下:

代码语言:javascript
运行
复制
#include <sys/poll.h>
票数 1
EN

Server Fault用户

发布于 2010-05-26 00:30:51

我猜你错过了poll.h

顺便说一下,为什么不使用rpm来安装Perl呢?那就容易多了。

希望这能有所帮助。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/145288

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档