我想從AIX 6.5機器上的源代碼生成python 2.6.8,但幾個模塊不能建立成功。在構建過程中,有一個XLC手冊頁跳出並進行查找。我必須按q
才能結束手冊頁,並且過程將繼續。所以我想是否是因爲構建調用默認XLC編譯器,我試圖更改默認的編譯器G ++:更改編譯C編譯器
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?
而且還日誌中做出
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 ++'嗎? – 2013-03-18 16:32:56
@ n.m。謝謝。我不確定xlc在使用中。是的,它有g ++。在日誌中,我看到諸如'for gcc ... cc_r','C編譯器是否工作......是','我們是否使用GNU C編譯器...否'等行,是否意味着它不會使用GCC? – xslittlegrass 2013-03-18 17:53:47
該腳本認爲'gcc'被稱爲'cc_r'。也許真正的gcc沒有找到。使用'./configure CC = gcc',看[這裏](http://www.gnu.org/prep/standards/html_node/Configuration.html)。 – 2013-03-18 19:10:41