HP-UX 编译 python

成功

只能用 python 252 ./configure –prefix=/opt/bmc/python273

./configure --without-gcc --enable-shared --prefix=/app/invoice/python252
make
make install

这时编译 cx_oracle 等其他东西,就会报错.

Can't find library for -lpython2.5

加什么 LD_LIBRARY_PATH 都是没用的,还是找不到.

是在 ld 的时候.那么我给 ld 加个参数好了.

export LDFLAGS="-L/app/invoice/python/python-2.5.2"

里面有个 libpython2.5.so

这时每次 ld 都会把路径当作参数加进去了.

273

export CC=cc
export CXX=aCC
export BASECFLAGS="+DD64"
export LDFLAGS="+DD64 -lxnet"


./configure --without-gcc --prefix=/opt/bmc/python273

make install 时候报错:


export CC="cc +DD64"
export CXX=aCC
export BASECFLAGS=""
export LDFLAGS="-lxnet"
./configure --without-gcc --prefix=/opt/bmc/python273

安装 web.py 报错:

  File "/opt/bmc/python273/lib/python2.7/random.py", line 111, in seed
    a = long(_hexlify(_urandom(16)), 16)
OSError: [Errno 2] No such file or directory: '/dev/urandom'

修改 /opt/bmc/python273/lib/python2.7/random.py == 老的 ==

安装了 zlib 也不行. 发现 zlib 是装到了 /usr/local/lib/hpux32 下

vi setup.py

查找 detect_modules

加上 add_dir_to_list(self.compiler.library_dirs, ‘/usr/local/lib/hpux32’)

./configure –with-libs=’-lcl’ –prefix=/app/invoice/python271

export LDFLAGS=”-L/oracle/app/product/9.2/lib32” -L/oracle/app/product/9.2/lib32

change_install

132.228.66.71 809 I am very sorry for my mindlessness, after read setup.py I find “on HP-UX Itanium with Oracle 10g you need to add the library “ttsh10”, update line 167 add ttsh10 in libs array(libs = [“clntsh”, “ttsh10”]), and update TestEnv, replace word “raw_input(” to “input(", then import cx_Oracle successful,