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的安装方 ...
随机推荐
- linux添加新硬盘并格式化
1.查看当前系统硬盘及分区情况 (注:Linux中SCSI的第1个硬盘/dev/sda,第2个硬盘/dev/sdb依此类推) 2. 初始化分区sdb为物理卷pv pvcreate /dev/sdb ...
- 项目实战8—tomcat企业级Web应用服务器配置与会话保持
tomcat企业级Web应用服务器配置与实战 环境背景:公司业务经过长期发展,有了很大突破,已经实现盈利,现公司要求加强技术架构应用功能和安全性以及开始向企业应用.移动APP等领域延伸,此时原来开发w ...
- “IAsyncOperation<StorageFile>”不包含“GetAwaiter”的定义
错误 CS4036 "IAsyncOperation<StorageFile>"不包含"GetAwaiter"的定义,并且找不到可接受类型为&quo ...
- 【深度学习系列】用PaddlePaddle和Tensorflow实现经典CNN网络Vgg
上周我们讲了经典CNN网络AlexNet对图像分类的效果,2014年,在AlexNet出来的两年后,牛津大学提出了Vgg网络,并在ILSVRC 2014中的classification项目的比赛中取得 ...
- 关于C#中函数的认识
对于C#语言中的函数,大概分之为函数的声明及其调用. 函数的声明: 1.函数的声明是指给一段代码取名称. 2.函数的声明位置必须在类中. 3.函数声明的语法: 函数声明的语法:static void ...
- 【docker 一】入门实践、环境部署、基本操作指令、镜像库、数据卷
简述 `docker是如火如荼的容器技术,今后会陆续上传关于微服务技术的学习笔记,希望能和大家一起学习一起分享!` docker环境搭建 1.获取最新版的Docker安装包 $ wget -qO- h ...
- Loadrunner 读取文件
char buffer[1000]; long file_stream; char * filename = "d:\log.txt"; file_stream=fopen(fil ...
- 解决EJB本地调用“java.lang.ClassCastException: $Proxy96 cannot be cast to com.tgb.ejb.UserManager”异常
EJB本地调用方式:把Webclient和EJB服务端部署到同一个JBoss,client和server通过一个JVM进行通信. Web客户端本地调用时.需引用EJB服务端打包的jar,不需引用JBo ...
- “command line option syntax error,Type command/?for help
VS2010安装WDT时出现"command line option syntax error.Type command/?for help错误 解决:可能是由于你的安装源文件所在的路径中有 ...
- Bootstrap的js插件之按钮(button)
1)属性: data-loading-text="载入中..."--使button呈现载入状态: data-toggle="button"--使按钮可以切换状态 ...