perl-5.14.0在新版gcc中编译不通过解决办法
1 由于在新版本中GCC把C99中的标准库分成了libc和libm两个部分,libm中包含一些数学库等,如果要用到libm时,必须加上-lm选项
在解压Configure之后,再在Makefile中,LDFLAGS 和 CLDFLAGS两个参数后面加上 -lm即可解决问题
2 参考:http://serverfault.com/questions/145288/make-error-when-compiling-perl-5-12-1-rhel-5-5
修改 dist/IO/poll.h:将 #include<poll.h> 修改为 #include<sys/poll.h>
3 参考:http://blog.163.com/zhangliye_2009/blog/static/1223120282013518104148904/
在Makefile 中,LDFLAGS 和 CLDFLAGS两个参数后面加上 -lrt
相关报错信息:
1
cc -fstack-protector -L/usr/lib64 -o miniperl \ gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o \ miniperlmain.o opmini.o perlmini.opp.o: In function `Perl_pp_int':pp.c:(.text+0x9151): undefined reference to `floor'pp.c:(.text+0x9171): undefined reference to `ceil'pp.o: In function `Perl_pp_sin':pp.c:(.text+0x944d): undefined reference to `sin'pp.o: In function `Perl_pp_atan2':pp.c:(.text+0xc2c3): undefined reference to `atan2'pp.o: In function `Perl_pp_modulo':pp.c:(.text+0xdc71): undefined reference to `floor'pp.c:(.text+0xde3d): undefined reference to `fmod'pp.c:(.text+0xde6f): undefined reference to `floor'pp.o: In function `Perl_pp_pow':pp.c:(.text+0xe1b3): undefined reference to `pow'pp.o:(.rodata+0x260): undefined reference to `cos'pp.o:(.rodata+0x268): undefined reference to `sin'pp.o:(.rodata+0x270): undefined reference to `sin'pp.o:(.rodata+0x278): undefined reference to `exp'pp.o:(.rodata+0x280): undefined reference to `log'pp.o:(.rodata+0x288): undefined reference to `sqrt'pp_sys.o: In function `S_gmtime64_r':pp_sys.c:(.text+0x1c21): undefined reference to `ceil'pp_sys.c:(.text+0x1c7e): undefined reference to `ceil'pp_sys.c:(.text+0x1ce3): undefined reference to `ceil'pp_sys.c:(.text+0x1da1): undefined reference to `floor'pp_sys.c:(.text+0x1f11): undefined reference to `floor'pp_sys.c:(.text+0x1f65): undefined reference to `floor'pp_sys.c:(.text+0x1f85): undefined reference to `floor'pp_sys.c:(.text+0x1fc0): undefined reference to `ceil'pp_sys.c:(.text+0x2119): undefined reference to `fmod'pp_sys.c:(.text+0x2155): undefined reference to `fmod'pp_sys.c:(.text+0x2193): undefined reference to `fmod'pp_sys.c:(.text+0x21cb): undefined reference to `fmod'pp_sys.o: In function `Perl_pp_gmtime':pp_sys.c:(.text+0x2287): undefined reference to `floor'pp_pack.o: In function `S_pack_rec':pp_pack.c:(.text+0x369b): undefined reference to `floor'pp_pack.c:(.text+0x36c3): undefined reference to `floor'collect2: ld returned 1 exit statusmake: *** [miniperl] Error 1
2
make[1]: Entering directory `/data_center_02/User/wucy/soft/perl-5.14.0/dist/IO'cc -c -DOVR_DBL_DIG=14 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.25_04\" -DXS_VERSION=\"1.25_04\" "-I../.." IO.cIO.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 typeIO.xs:255: error: invalid use of undefined type 'struct pollfd'IO.xs:255: error: dereferencing pointer to incomplete typeIO.xs:257: error: invalid use of undefined type 'struct pollfd'IO.xs:257: error: dereferencing pointer to incomplete typeIO.xs:261: error: invalid use of undefined type 'struct pollfd'IO.xs:261: error: dereferencing pointer to incomplete typeIO.xs:262: error: invalid use of undefined type 'struct pollfd'IO.xs:262: error: dereferencing pointer to incomplete typemake[1]: *** [IO.o] Error 1make[1]: Leaving directory `/data_center_02/User/wucy/soft/perl-5.14.0/dist/IO'Unsuccessful make(dist/IO): code=512 at make_ext.pl line 463.make: *** [lib/auto/IO/IO.a] Error 2
3
Can't find extension Encode/Byte in any of cpan dist ext at make_ext.pl line 251.Can't find extension Encode/CN in any of cpan dist ext at make_ext.pl line 251.Can't find extension Encode/EBCDIC in any of cpan dist ext at make_ext.pl line 251.Can't find extension Encode/JP in any of cpan dist ext at make_ext.pl line 251.Can't find extension Encode/KR in any of cpan dist ext at make_ext.pl line 251.Can't find extension Encode/Symbol in any of cpan dist ext at make_ext.pl line 251.Can't find extension Encode/TW in any of cpan dist ext at make_ext.pl line 251.Can't find extension Encode/Unicode in any of cpan dist ext at make_ext.pl line 251.lib/auto/POSIX/POSIX.a(POSIX.o): In function `XS_POSIX_tmpnam':POSIX.c:(.text+0x4614): warning: the use of `tmpnam' is dangerous, better use `mkstemp'lib/auto/Time/HiRes/HiRes.a(HiRes.o): In function `XS_Time__HiRes_clock_nanosleep':HiRes.c:(.text+0xac3): undefined reference to `clock_nanosleep'lib/auto/Time/HiRes/HiRes.a(HiRes.o): In function `XS_Time__HiRes_clock_getres':HiRes.c:(.text+0xc8e): undefined reference to `clock_getres'lib/auto/Time/HiRes/HiRes.a(HiRes.o): In function `XS_Time__HiRes_clock_gettime':HiRes.c:(.text+0xdbe): undefined reference to `clock_gettime'collect2: ld returned 1 exit statusmake: *** [perl] Error 1
perl-5.14.0在新版gcc中编译不通过解决办法的更多相关文章
- python安装pymssql等包时出现microsoft visual c++ 14.0 is required问题无需下载visualcppbuildtools的解决办法
如题,在练习python安装一些包时,出现了microsoft visual c++ 14.0 is required问题.网上有很多资料:一是下载对应的.whl文件,然后pip install安装: ...
- gcc 无法编译c17程序解决办法
1.保证将gcc程序升级到7.1以上. 2.如果用命令行手工编译,就多加个参数-std=c++17,例如命令应该是: "g++" -std=c++17 "text.cp ...
- windows2003 IIS6.0右键属性没有asp.net选项卡的解决办法
windows2003 IIS6.0右键属性没有asp.net选项卡的解决办法 1,如果是只安装了.net framework 1.1 在iis中是不显示那个选项卡的.默认就会支持asp.net1.1 ...
- linux中tomcat内存溢出解决办法
用命令 tail -f /root/apache-tomcat-6.0.20/logs/catalina.out(需要找到tomcat路径) 查看日志,查看是否有错误 linux中tomcat内存溢出 ...
- ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务解决办法
ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务解决办法: 1.首先打开cmd命令 查看本地TNSPING配置 是否ok?然后找到 Oracle 安装文件 中 listener. ...
- vsftp在REDHAT,CENTOS 5中登录慢的解决办法
vsftp在REDHAT,CENTOS 5中登录慢的解决办法 vsftp在REDHAT,CENTOS 5中不仅登录慢,至少花30秒左右,而且上传文件的速度也受影响, 经过摸索,根本原因在DNS解析上花 ...
- .net core, docker 在vs2019开发过程中的问题以及解决办法
.net core, docker 在vs2019开发过程中的问题以及解决办法 记录下来,帮助Ta人~ 1.vs调试,快Build完后提示Docker 端口:xxxx,xxxx,xxxx占用 解决办法 ...
- android4.0浏览器在eclipse中编译的步骤
工程源码: 注意: 如果下载已经修过的源码,只要进行3.4.8步骤就应该可以了. eclipse版本:adt-bundle-windows (Android Developer Tools Build ...
- opnet安装及安装中出现问题的解决办法 分类: opnet 2014-04-06 21:50 397人阅读 评论(0) 收藏
我使用的opnet14.5 win7 64位系统的http://pan.baidu.com/s/1qWyfxnu,电脑先刷了win7 64位原版系统. 选择了VS2013+opnet14.5的安装方 ...
随机推荐
- MySQL之事务的四大特性
事务就是一组原子性的SQL查询,或者说一个独立的工作单元.如果数据库引擎能够成功地对数据应用该组查询的全部语句,那么久执行该组查询.如果其中任何一条语句因为崩溃或其他原因无法执行,那么所有语句都不会执 ...
- 360提供的php防注入代码
<?php //Code By Safe3 function customError($errno, $errstr, $errfile, $errline) { echo "< ...
- QT的radioButton组的使用
在使用Qt的radioButton控件时,会产生一个疑问,如何让你选择的那个radio得到一个数据,进行判断,网上的一些资料有些不全,容易出错. 所以你得做件事,给每个radioButton进行赋初值 ...
- 响应式框架Bootstrap栅格系统
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8&qu ...
- Zookeeper 集群安装
负载均衡(Load Balance)是分布式系统架构设计中必须考虑的因素之一,它通常是指,将请求/数据[均匀]分摊到多个操作单元上执行,负载均衡的关键在于[均匀].常见互联网分布式架构如上,分为客户端 ...
- WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
在 mkfs.ext4 /dev/sda2 格式化硬盘空间时,可能出现这种错误. had this situation at office where I was told to re-partiti ...
- NYOJ 480 Fibonacci Again!
Fibonacci Again! 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描写叙述 求第n个斐波那契数是否是一个素数,n为整数 f[n]=f[n-1]+f[n-2] ( ...
- 【Jquery】prop与attr的差别
近期因项目须要用到复选框,当中一个控制全选. // 全选 $(".ckb_all").click(function(){ if($(this).attr("checked ...
- #include、#import与@class的使用与头文件循环引用问题
#include #include <>:一般是对系统库文件的引用,编译器会去系统文件文件夹下查找. #include "xxx.h":一般是对自己定义文件的引用,编译 ...
- JAVA入门[16]-form表单,上传文件
一.如何传递参数 使用 @RequestParam 可以传递查询参数.例如:http://localhost:8092/category/detail?id=1 @RequestMapping(&qu ...