我试图在Ubuntu 11.10上使用 make
命令,但得到一个错误 .
g -g -O2 -fPIC -fPIC -Wall -Wpointer-arith -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision = standard -g -fpic -Wno-deprecated -Wno-unused -function -I / usr / local / include -I / home / jochen / RDKit / Code -DRDKITVER ='“004000”' - I / usr / local / include -I / home / jochen / RDKit / Code -DRDKITVER =' “004000”' - 我 . -一世 . -I / usr / include / postgresql / 9.1 / server -I / usr / include / postgresql / internal -D_GNU_SOURCE -I / usr / include / libxml2 -I / usr / include / tcl8.5 -c -o adapter.o adapter .cpp cc1plus:nicht implementiert:-fexcess-precision = C make的标准:* [adapter.o] Fehler 1
我已经安装了GCC,G和build-essentials .
来自 gcc -v
的输出:
Es werden eingebaute Spezifikationen verwendet . COLLECT_GCC = g COLLECT_LTO_WRAPPER = / usr / lib / gcc / i686-linux-gnu / 4.6.1 / lto-wrapper Ziel:i686-linux-gnu Konfiguriert mit:../ src /configure -v --with-pkgversion =' Ubuntu / Linaro 4.6.1-9ubuntu3' - with-bugurl = file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages = c,c,fortran,objc,obj-c ,go --prefix = / usr --program-suffix = -4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir = / usr / lib --without-included -gettext --enable-threads = posix --with-gxx-include-dir = / usr / include / c /4.6 --libdir = / usr / lib --enable-nls --with-sysroot = / --enable -clocale = gnu --enable-libstdcxx-debug --enable-libstdcxx-time = yes --enable-plugin --enable-objc-gc --enable-targets = all --disable-werror --with-arch- 32 = i686 --with-tune = generic --enable-checking = release --build = i686-linux-gnu --host = i686-linux-gnu --target = i686-linux-gnu Thread-Modell:posix gcc -Version 4.6.1(Ubuntu / Linaro 4.6.1-9ubuntu3)
怎么解决这个问题?
1 回答
gcc实现
-fexcess-precision
选项,但仅适用于C.该选项的文档可以在here找到(搜索
-fexcess-precision
)(这是gcc 4.6.3手册):您've told us that (a) you'重新编译C,(b)您的脚本或
Makefile
使用-fexcess-precision
,(c)您无法更改它 . 其中一个必须给予 . 您的脚本或Makefile
中有错误,您需要修复它 .注意,gcc可能应该为C实现
-fexcess-precision=standard
;据我所知,这个区域的C规则与C 's and C requires this behavior for standard conformance. It'可能是相同的,因为你的代码依赖于-fexcess-precision=standard
指定的行为,并且gcc只是没有't support it. If that'这样的情况,你在这一点上100%清除 .还有另一种可能的解决方法 . 您可以为
g++
命令编写自己的包装器,该命令在从命令行参数中删除任何出现的-fexcess-precision
之后调用真正的g++
命令 . 我过去做过something similar,情况略有不同;你必须破解它来修改命令行参数而不是过滤stderr
. 但我不推荐这个 . 正确的解决方案是修复构建脚本或Makefile
- 再次假设程序不依赖于-fexcess-precision=standard
指定的行为 .