Python auf AIX 5.1

HydroKultur

Grünschnabel
Hallo,

ich bin schon seit einiger Zeit dabei, Python_2.4.1 auf einer AIX 5.1 Maschine zu builden. Das Problem ist, dass der C-Compiler für Large File Handling angewiesen werden muss. Ich hatte demnach folgendes versucht:

Umgebungsvariablen:

CC = xlc_r, xlC_r (für C++) oder cc_r
CPPFLAGS = -D_LARGE_FILES
GCC = cc_r
LDFLAGS = -brtl -qmaxmem=-1 -bmaxdata:0x80000000 (man muss schon -bmaxdata*:* verwenden, auch wenn cc_r --help was von maxdata*=* erzaehlt)
BASECFLAGS = -D_LARGE_FILES

Konfiguriert:

./configure --prefix=/netusers/oder/Python/Python241/AIX --disable-ipv6 --enable-large-files --with-socket

Dennoch läuft der Build nicht richtig durch. Nach einem make test, gibt er ein Core File aus und sagt das der Large File Support nicht aktiviert ist.

Ich hab nicht so viel Ahnung von UNIX-Maschinen und hoffe mir kann hier jemand helfen.

Meine Quellen:

http://publib.boulder.ibm.com/infoc...com.ibm.vacpp7a.doc/compiler/ref/ruoptbmx.htm
http://publib.boulder.ibm.com/infoc...com.ibm.vacpp6m.doc/compiler/ref/ruoptmax.htm

* In den Quellen werden die Compileroptionen für den xlC_r beschrieben. Weiß jemand evtl. wie man diesen Umstellen kann, ich nehme an das die Umgebungsvarable "CC" nicht ausreicht.

Ziel soll es sein, ein Pythonscript auszuführen, welches eine 3GB große Datei anlegt.

Quellcode zu test_3g.py:

import os, stat, sys

f = open('@test', 'wb')
f.seek(3221225472L)
f.write('0')
f.flush

* Funktioniert auf windows, Linux, Sun und HP-UX nur leider auf AIX nicht
 
Zuletzt bearbeitet:
also...

ich habe es jetzt fast.

Umgebungsvariablen:

CC = xlC_r
CPPFLAGS = -D_LARGE_FILES
CFLAGS = -D_LARGE_FILES
BASECFLAGS = -D_LARGE_FILES
LDFLAGS = -brtl -qmaxmem=-1 -bmaxdata:0x80000000

Konfiguration:

./configure --prefix=/netusers/oder/Python/Python241/AIX --disable-ipv6 --with-ssl --enable-large-files --with-socket --with-cxx=xlC_r

Vor dem builden fehlt noch eine Headerdatei bzlib.h im Include Ordner (für Zip komprimierung), dafür muss das bzip2 Packet auch installert sein.
Zu finden unter: http://www.bzip.org/downloads.html
Jetzt muss noch das Makefile manuell geändert werden, da manche Umgebungsvariablen nicht abgefragt werden:

...
CC= xlC_r
CXX= xlC_r
...

...
OPT= -DNDEBUG -O
BASECFLAGS= -D_LARGE_FILES
CFLAGS= -D_LARGE_FILES -DNDEBUG -O
CPPFLAGS= -I. -I$(srcdir)/Include
LDFLAGS= -brtl -qmaxmem=-1 -bmaxdata=0x80000000
...

dannach kam beim builden folgende Fehlermeldung:

"/netusers/oder/Python-2.4.1/Modules/cjkcodecs/_codecs_cn.c", line 431.3: 1506-206 (S) Suffix of integer constant 100_encode_init is not valid."

Dazu steht hier etwas: http://www.gossamer-threads.com/lists/python/bugs/426910

This is happening because of the "hz" codec. Due to
the way the source file uses the C preprocessor macro,
and the fact that the preprocessor symbol "hz" is
predefined as 100 on this platform, it is producing
invalid lecical symbols such as "100_encode".

The simple solution is to insert the following line in
the source file immediately before the first reference
to the name "hz":

#undef hz

Danach kommen nur noch folgende Warnungen und Large File funktioniert:

"Parser/parser.c", line 32.31: 1506-1298 (W) The subscript 500 is out of range. T he valid range is 0 to 499.
"Parser/parser.c", line 265.45: 1506-1298 (W) The subscript 500 is out of range. The valid range is 0 to 499.
"Parser/parser.c", line 284.29: 1506-1298 (W) The subscript 500 is out of range. The valid range is 0 to 499.
"/netusers/oder/Python-2.4.1/Modules/nismodule.c", line 31.47: 1506-280 (W) Funct ion argument assignment between types "const char*" and "int" is not allowed.
 
Zurück