AIX 5 2 64位主機下編譯python

2021-08-30 01:47:03 字數 2230 閱讀 6264

說實話,是一種折磨

++ aix下編譯python

aix 5.3: to build a 64-bit version with ibm's compiler, i used the

following:

export path=/usr/bin:/usr/vacpp/bin

./configure --with-gcc="xlc_r -q64" --with-cxx="xlc_r -q64" --disable-ipv6 ar="ar -x64"

make

報錯

"include/token.h", line 42.9: 1506-213 (s) macro name tilde cannot be redefined

vim include/token.h

用/* */注釋42行

或者修改為:

#if defined(_sys_ioctl_h_)

#undef tilde

#define tilde 32

#endif

或者是

#if defined(aix)

#undef tilde

#define tilde 32

#endif

再次出現語法錯誤的報錯

+++網上提供的編譯命令

config_shell=/usr/bin/bash cc=xlc_r cflags="-q64 -qlanglvl=extc99" cxx=xlc_r cxxflags="-q64 -qlanglvl=extended" ar="ar -x64" ldflags="-l$home/libreadline/lib -l$home/libz/lib -l$home/libbz2/lib" ./configure --prefix=/usr/local/python26 --with-gcc="xlc_r -q64 -qlanglvl=extc99" --with-cxx="xlc_r -q64 -qlanglvl=extended" --disable-ipv6

make

+++還是不行

後來看到這一句:

monterey (64-bit aix): the current monterey c compiler (visual age)

uses the object_mode= environment variable to set the

compilation mode to either 32-bit or 64-bit (32-bit mode is

the default). presumably you want 64-bit compilation mode for

this 64-bit os. as a result you must first set object_mode=64

in your environment before configuring (./configure) or

building (make) python on monterey.

object_mode=64

export object_mode=64

aix 5.3: to build a 64-bit version with ibm's compiler, i used the

following:

export path=/usr/bin:/usr/vacpp/bin

./configure --with-gcc="xlc_r -q64" --with-cxx="xlc_r -q64" \

--disable-ipv6 ar="ar -x64"

make

後來終於找了同事了解.換了python 2.5.2

export path=/usr/bin:/usr/vacpp/bin

./configure --with-gcc="xlc_r -q64" --with-cxx="xlc_r -q64" \

--disable-ipv6 ar="ar -x64"

make

終於可以可以編譯過去了..**

python 2.5.1不行,python2.5.3也不行,必須python2.5.2才能編譯過去...

其他的版本就更不行了

有心在生產上用點python的東西,但是編譯就讓人心驚肉跳...如何能放心用呢

AIX中修改主機名

smit hostname改名後乙個常見的問題是 hostname看到的是新名,uname n看到的仍是舊名。沒見ibm針對改名有官方的步驟 1 smit hostname 2 vi etc hosts 3 uname s hostname sed s 第三步為什麼寫得這麼麻煩?因為是直接照搬 et...

aix系統32位和64位切換

bootinfo y 處理器位數 bootinfo k 核心位數 1,how to switch aix5.1 from 32 bit to 64 bit ln sf usr lib boot unix 64 unix ln sf usr lib boot unix 64 usr lib boot ...

切換AIX的64位和32位系統核心

bootinfo y 處理器位數 bootinfo k 核心位數 1,how to switch aix5.1 from 32 bit to 64 bit ln sf usr lib boot unix 64 unix ln sf usr lib boot unix 64 usr lib boot ...