免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3529 | 回复: 5

IO::Epoll模块安装出错!求助! [复制链接]

论坛徽章:
0
发表于 2011-07-13 18:28 |显示全部楼层
我想尝试一下epoll,但在cpan安装IO::Epoll的时候test出错:
  1. [root@CentOS64 tmp]# /usr/local/perl5.12/bin/cpan IO::Epoll
  2. Going to read '/root/.cpan/Metadata'
  3.   Database was generated on Tue, 12 Jul 2011 17:27:35 GMT
  4. Running install for module 'IO::Epoll'
  5. Running make for B/BR/BRUCEK/IO-Epoll-0.02.tar.gz
  6. Checksum for /root/.cpan/sources/authors/id/B/BR/BRUCEK/IO-Epoll-0.02.tar.gz ok

  7.   CPAN.pm: Going to build B/BR/BRUCEK/IO-Epoll-0.02.tar.gz

  8. Checking if your kit is complete...
  9. Looks good
  10. Writing Makefile for IO::Epoll
  11. cp lib/IO/Epoll.pm blib/lib/IO/Epoll.pm
  12. AutoSplitting blib/lib/IO/Epoll.pm (blib/lib/auto/IO/Epoll)
  13. /usr/local/perl5.12/bin/perl /usr/local/perl5.12/lib/5.12.3/ExtUtils/xsubpp  -typemap /usr/local/perl5.12/lib/5.12.3/ExtUtils/typemap  Epoll.xs > Epoll.xsc && mv Epoll.xsc Epoll.c
  14. Please specify prototyping behavior for Epoll.xs (see perlxs manual)
  15. cc -c  -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.02\" -DXS_VERSION=\"0.02\" -fPIC "-I/usr/local/perl5.12/lib/5.12.3/x86_64-linux-thread-multi/CORE"   Epoll.c
  16. In file included from Epoll.xs:5:
  17. ppport.h:231:1: warning: "PERL_UNUSED_DECL" redefined
  18. In file included from Epoll.xs:2:
  19. /usr/local/perl5.12/lib/5.12.3/x86_64-linux-thread-multi/CORE/perl.h:308:1: warning: this is the location of the previous definition
  20. Running Mkbootstrap for IO::Epoll ()
  21. chmod 644 Epoll.bs
  22. rm -f blib/arch/auto/IO/Epoll/Epoll.so
  23. cc  -shared -O2 -L/usr/local/lib -fstack-protector Epoll.o  -o blib/arch/auto/IO/Epoll/Epoll.so         \
  24.                 \
  25.          
  26. chmod 755 blib/arch/auto/IO/Epoll/Epoll.so
  27. cp Epoll.bs blib/arch/auto/IO/Epoll/Epoll.bs
  28. chmod 644 blib/arch/auto/IO/Epoll/Epoll.bs
  29. Manifying blib/man3/IO::Epoll.3
  30.   BRUCEK/IO-Epoll-0.02.tar.gz
  31.   /usr/bin/make -- OK
  32. Running make test
  33. PERL_DL_NONLAZY=1 /usr/local/perl5.12/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
  34. t/IO-Epoll.t ......... Can't load '/root/.cpan/build/IO-Epoll-0.02-KvJKWF/blib/arch/auto/IO/Epoll/Epoll.so' for module IO::Epoll: /root/.cpan/build/IO-Epoll-0.02-KvJKWF/blib/arch/auto/IO/Epoll/Epoll.so: undefined symbol: epoll_pwait at /usr/local/perl5.12/lib/5.12.3/x86_64-linux-thread-multi/DynaLoader.pm line 200.
  35. at t/IO-Epoll.t line 13
  36. Compilation failed in require at t/IO-Epoll.t line 13.
  37. BEGIN failed--compilation aborted at t/IO-Epoll.t line 13.
  38. t/IO-Epoll.t ......... Dubious, test returned 2 (wstat 512, 0x200)
  39. Failed 9/9 subtests
  40. t/IO-Poll-compat.t ... Can't load '/root/.cpan/build/IO-Epoll-0.02-KvJKWF/blib/arch/auto/IO/Epoll/Epoll.so' for module IO::Epoll: /root/.cpan/build/IO-Epoll-0.02-KvJKWF/blib/arch/auto/IO/Epoll/Epoll.so: undefined symbol: epoll_pwait at /usr/local/perl5.12/lib/5.12.3/x86_64-linux-thread-multi/DynaLoader.pm line 200.
  41. at t/IO-Poll-compat.t line 23
  42. Compilation failed in require at t/IO-Poll-compat.t line 23.
  43. BEGIN failed--compilation aborted at t/IO-Poll-compat.t line 23.
  44. t/IO-Poll-compat.t ... Dubious, test returned 2 (wstat 512, 0x200)
  45. No subtests run
  46. t/IO-Ppoll-compat.t .. Can't load '/root/.cpan/build/IO-Epoll-0.02-KvJKWF/blib/arch/auto/IO/Epoll/Epoll.so' for module IO::Epoll: /root/.cpan/build/IO-Epoll-0.02-KvJKWF/blib/arch/auto/IO/Epoll/Epoll.so: undefined symbol: epoll_pwait at /usr/local/perl5.12/lib/5.12.3/x86_64-linux-thread-multi/DynaLoader.pm line 200.
  47. at t/IO-Ppoll-compat.t line 7
  48. Compilation failed in require at t/IO-Ppoll-compat.t line 7.
  49. BEGIN failed--compilation aborted at t/IO-Ppoll-compat.t line 7.
  50. # Looks like your test exited with 2 before it could output anything.
  51. t/IO-Ppoll-compat.t .. Dubious, test returned 2 (wstat 512, 0x200)
  52. Failed 10/10 subtests

  53. Test Summary Report
  54. -------------------
  55. t/IO-Epoll.t       (Wstat: 512 Tests: 0 Failed: 0)
  56.   Non-zero exit status: 2
  57.   Parse errors: Bad plan.  You planned 9 tests but ran 0.
  58. t/IO-Poll-compat.t (Wstat: 512 Tests: 0 Failed: 0)
  59.   Non-zero exit status: 2
  60.   Parse errors: No plan found in TAP output
  61. t/IO-Ppoll-compat.t (Wstat: 512 Tests: 0 Failed: 0)
  62.   Non-zero exit status: 2
  63.   Parse errors: Bad plan.  You planned 10 tests but ran 0.
  64. Files=3, Tests=0,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.07 cusr  0.00 csys =  0.09 CPU)
  65. Result: FAIL
  66. Failed 3/3 test programs. 0/0 subtests failed.
  67. make: *** [test_dynamic] Error 2
  68.   BRUCEK/IO-Epoll-0.02.tar.gz
  69.   /usr/bin/make test -- NOT OK
  70. //hint// to see the cpan-testers results for installing this module, try:
  71.   reports BRUCEK/IO-Epoll-0.02.tar.gz
  72. Running make install
  73.   make test had returned bad status, won't install without force
复制代码

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
发表于 2011-07-13 20:01 |显示全部楼层
所以 Perl 程序员也要懂 C 语言,懂系统调用。遇到这种问题直接人挡杀人佛挡杀佛,逢山开路遇水搭桥,该改什么直接 vim 一下就改了。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
发表于 2011-07-13 20:02 |显示全部楼层
/root/.cpan/build/IO-Epoll-0.02-KvJKWF/blib/arch/auto/IO/Epoll/Epoll.so: undefined symbol: epoll_pwait at /usr/local/perl5.12/lib/5.12.3/x86_64-linux-thread-multi/DynaLoader.pm line 200.

这个应该是错误的根源。
看起来像是 configure 的问题。

论坛徽章:
0
发表于 2011-07-13 23:00 |显示全部楼层
这个在我的FreeBSD上编译也通不过.

这个东西依赖系统, 不知道你的系统是否满足他的要求?

在他的readme中说:
The epoll(4) subsystem is a new, (currently) Linux-specific variant of
poll(2).  It is designed to offer O(1) scalability over large numbers of
watched file descriptors.  You will need at least version 2.5.44 of Linux
to use this module, and you might need to upgrade your C library.

论坛徽章:
0
发表于 2011-07-14 11:04 |显示全部楼层
我想尝试一下epoll,但在cpan安装IO::Epoll的时候test出错:
heidern 发表于 2011-07-13 18:28



epoll_pwait 需要 2.6.19 以上的内核才能支持,目前 RHEL/CentOS 5.6 以下版本都是 2.6.18,你直接用 force 强制安装就可以了,不会有问题的,我们目前就是这样用的。

但是要注意,程序里面不要调用 epoll_pwait 就可以了!

论坛徽章:
0
发表于 2011-07-16 12:12 |显示全部楼层
epoll_pwait 需要 2.6.19 以上的内核才能支持,目前 RHEL/CentOS 5.6 以下版本都是 2.6.18,你直接用 ...
cnncc 发表于 2011-07-14 11:04



    正解,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP