`
bigzhu
  • 浏览: 26658 次
  • 性别: Icon_minigender_1
  • 来自: 昆明
最近访客 更多访客>>
社区版块
存档分类
最新评论

AIX 5.2 64位主机下编译python

 
阅读更多

说实话,是一种折磨

++ 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={32|64} 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的东西,但是编译就让人心惊肉跳...如何能放心用呢

 

分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

    MySQL中文参考手册

    + 4.11.14 IBM-AIX 注意事项 + 4.11.15 HP-UX 注意事项 o 4.12 Win32 注意事项 + 4.12.1 在 Win32 上安装 MySQL + 4.12.2 在 Win95 /Win98上启动 MySQL + 4.12.3 在 NT 上启动 MySQL + 4.12.4 在 Win32 上...

    精通Qt4编程(第二版)源代码

    UNIX/X11,包括Linux,Sun Solaris,HP-UX,HP Tru64 UNIX,IBM AIX,SGI IRIX等; \? Mac OS X,支持Mac OS X 10.3以上版本; \? 嵌入式Linux,包括支持framebuffer的所有Linux平台。 \Qt还支持嵌入式系统,Qt...

    精通qt4编程(源代码)

    UNIX/X11,包括Linux,Sun Solaris,HP-UX,HP Tru64 UNIX,IBM AIX,SGI IRIX等; \? Mac OS X,支持Mac OS X 10.3以上版本; \? 嵌入式Linux,包括支持framebuffer的所有Linux平台。 \Qt还支持嵌入式系统,Qt的...

    MYSQL

    4.11.11.2 BSD/OS 3.x 注意事项 4.11.11.3 BSD/OS 4.x 注意事项 4.11.12 SCO 注意事项 4.11.13 SCO Unixware 7.0 注意事项 4.11.14 IBM-AIX 注意事项 4.11.15 HP-UX 注意事项 4.12 Win...

    MySQL中文参考手册.chm

    4.11.11.2 BSD/OS 3.x 注意事项 4.11.11.3 BSD/OS 4.x 注意事项 4.11.12 SCO 注意事项 4.11.13 SCO Unixware 7.0 注意事项 4.11.14 IBM-AIX 注意事项 4.11.15 HP-UX 注意事项 ...

Global site tag (gtag.js) - Google Analytics