【解决】SPECCPU编译出错“f951: error: argument to '-O' should be a non-negative integer”
来源:互联网 发布:js将对象转换成数组 编辑:程序博客网 时间:2024/05/07 04:34
交叉编译speccpu2006时,遇到一个错误,把错误现象摘录如下:
1、执行编译命令:runspec --action=build --config=armv8.cfg --rebuild --tune=base 410
2、编译报错结果:
runspec v6152 - Copyright 1999-2008 Standard Performance Evaluation Corporation
Using 'linux-suse101-AMD64' tools
Reading MANIFEST... 18335 files
Loading runspec modules................
Locating benchmarks...found 31 benchmarks in 6 benchsets.
Reading config file '/home/zql/SPEC_install/config/armv8.cfg'
Loading "http://www.spec.org/auto/cpu2006/current_version" for version check: OK
NOTICE: There is a newer version of the suite available from SPEC.
Version 1.200 was released on Wed Aug 17 09:10:33 2011
----------------------------------
The run will continue in 5 seconds
----------------------------------
Retrieving flags file (/home/zql/SPEC_install/Docs/flags/example-medium-cfg-flags.xml)...
Benchmarks selected: 410.bwaves
Compiling Binaries
Building 410.bwaves base DL585_08_2005 default: (build_base_DL585_08_2005.0000)
Error with make 'specmake build': check file '/home/zql/SPEC_install/benchspec/CPU2006/410.bwaves/build/build_base_DL585_08_2005.0000/make.err'
Command returned exit code 2
Error with make!
*** Error building 410.bwaves
If you wish to ignore this error, please use '-I' or ignore errors.
The log for this run is in /home/zql/SPEC_install/result/CPU2006.010.log
The debug log for this run is in /home/zql/SPEC_install/result/CPU2006.010.log.debug
*
* Temporary files were NOT deleted; keeping temporaries such as
* /home/zql/SPEC_install/result/CPU2006.010.log.debug and
* /home/zql/SPEC_install/tmp/CPU2006.010
* (These may be large!)
*
runspec finished at Tue Feb 19 15:02:12 2013; 8 total seconds elapsed
root@zql-virtual-machine:/home/zql/SPEC_install# vim /home/zql/SPEC_install/benchspec/CPU2006/410.bwaves/build/build_base_DL585_08_2005.0000/make.err
3、问题分析:以上错误信息中的红色部分对我们分析错误是有用的,打开红色部分指定的文件make.err,其中内容如下:
f951: error: argument to '-O' should be a non-negative integer
specmake: *** [block_solver.o] Error 1
4、看来错误原因在于配置文件,我用的交叉编译,需要修改编译工具链,对config文件的修改如下:
CC = aarch64-linux-gnu-gcc -static
CXX = aarch64-linux-gnu-g++ -static
FC = aarch64-linux-gnu-gfortran -static
其他地方不作改动。
5、上面出现的错误猜测和-O优化选项有关,但是尝试删除-O3后还是不对,后来删除了fortran的优化:FOPTIMIZE = -OPT:div_split=on,问题解决!
可能原因:我的交叉编译工具链不支持fortran的优化,所以这个选项编译工具链不识别!
- 【解决】SPECCPU编译出错“f951: error: argument to '-O' should be a non-negative integer”
- cc1.exe: error: argument to '-O' should be a non-negative integer
- error: '>>' should be '> >' within a nested template argument list
- error:'>>' should be '> >' within a nested template argument list
- linux error: ‘>>’ should be ‘> >’ within a nested template argument list
- TypeError: argument should be a Buffer
- error: '>>' should be '> >' within a nested template argument list| C++ Dev
- Ubuntu下ndk-build编译C++出错:non-numeric second argument to `wordlist' function: '
- Ubuntu下ndk-build编译C++出错:non-numeric second argument to `wordlist' function: '
- Ubuntu下ndk-build编译C++出错:non-numeric second argument to `wordlist' function: '
- 【原创】QT:编译时出现 “error: error writing to -: Invalid argument”错误的解决
- jni编译non-numeric second argument to `wordlist' function错误
- 解决 the error "...cannot be resolved to a type.."
- PHP Fatal error: Call to a member function fetch_all() on a non-object问题的解决
- python:PyInstaller打包发布单个文件错误struct.error: argument for 's' must be a string解决
- Template within template: why “`>>' should be `> >' within a nested template argument list” 解决方法
- Django admin argument to reversed() must be a sequence
- Given a non-negative integer num, repeatedly add all its digits until the result has only one digit
- 在JSP环境中利用Commons-fileupload组件实现文件上传
- 交换机常用命令
- undo 回滚段,REDO,日志,SCN,DBWRIT,恢复,CHECKPIONT
- [SEO基础知识] 对于Title标签中常见的分隔符的介绍
- 拼音检索
- 【解决】SPECCPU编译出错“f951: error: argument to '-O' should be a non-negative integer”
- java变量修饰符volatile的使用和性能
- CKEditor+CKFinder+JSP实现在线编辑器上传文件(包括图片、flash)
- hibernate里createSQLQuery
- 在struts2中实现文件上传(以图片上传为例)
- Java传参的值传递和引用传递问题(转)
- mysql分组排序查询
- 冒泡排序
- 灾备术语——RPO and RTO