【发布时间】:2013-03-07 02:05:09
【问题描述】:
我正在尝试在 AIX 6.5 机器上从源代码构建 python 2.6.8,但有几个模块无法成功构建。在构建过程中,有一个XLC手册页跳出来卡住了。我必须按q 来结束手册页,该过程将继续。所以我在想是否是因为构建调用了默认的 XLC 编译器,而我正在尝试将默认编译器更改为 g++:
make clean
CC=/bin/gcc CXX=/bin/g++ ./configure
make
但是好像不行,XLC 手册页还是会弹出,而且模块构建失败。
如何确保它将使用 g++ 而不是 XLC?谢谢。
更新
这是CC=/bin/gcc CXX=/bin/g++ ./configure之后的日志
-bash-3.2$ CC=/bin/gcc CXX=/bin/g++ ./configure
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... aix6
checking EXTRAPLATDIR...
checking machine type as reported by uname -m... 00F63F144C00
checking for --without-gcc...
checking for gcc... cc_r
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc_r accepts -g... yes
checking for cc_r option to accept ISO C89... -qlanglvl=extc89
checking for --with-cxx-main=<compiler>... no
checking how to run the C preprocessor... cc_r -qlanglvl=extc89 -E
checking for grep that handles long lines and -e... /opt/freeware/bin/grep
checking for egrep... /opt/freeware/bin/grep -E
我看到checking whether we are using the GNU C compiler... no这行,这是否意味着它没有使用gcc?
并且还在make的日志中
checking for __attribute__((visibility("hidden")))... no
cc_r: 1501-210 (W) command option t contains an incorrect subargument
在上面的日志之后,会弹出 xlc 的手册页。
【问题讨论】:
-
看日志,确定还在用xlc?通常,
CC应为gcc,CXX应为g++。您的机器是否真的在/bin中安装了g++? -
@n.m.谢谢。我不确定 xlc 是否在使用中。是的,它有 g++。在日志中我看到像
for gcc... cc_r、whether the C compiler works... yes、whether we are using the GNU C compiler... no这样的行,这是否意味着它不会使用 gcc? -
脚本认为
gcc被称为cc_r。也许没有找到真正的 gcc。使用./configure CC=gcc,看here。 -
@n.m.我使用
./configure CC=gcc,一切都完全一样。有什么想法吗? -
你真的真的在
/bin中安装了gcc吗?不是/usr/bin,不是/usr/local/bin?如果是这样,除了打开configure脚本并开始逐行调试之外,几乎没有什么可以做的。
标签: python compiler-construction g++ aix xlc