classification
Title: Python 2.5 fails to build on AIX 5.3 (xlc_r compiler)
Type: compile error Stage: test needed
Components: Build Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, georg.brandl, loewis, oirraza, theller
Priority: normal Keywords:

Created on 2007-01-16 21:06 by oirraza, last changed 2010-08-21 22:48 by georg.brandl. This issue is now closed.

Messages (10)
msg31048 - (view) Author: Orlando Irrazabal (oirraza) Date: 2007-01-16 21:06
Initial Comment:
Build of Python 2.5 on AIX 5.3 with xlc_r fails with the below error message.

The configure line is:
./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" --disable-ipv6 AR="ar -X64"

[...]
building '_ctypes' extension
xlc_r -q64 -DNDEBUG -O -I. -I/sw_install/python-2.5/./Include -Ibuild/temp.aix-5.3-2.5/libffi/include -Ibuild/temp.aix-5.3-2.5/libffi -I/sw_install/python-2.5/Modules/_ctypes/libffi/src -I./Include -I. -I/sw_install/python-2.5/Include -I/sw_install/python-2.5 -c /sw_install/python-2.5/Modules/_ctypes/_ctypes.c -o build/temp.aix-5.3-2.5/sw_install/python-2.5/Modules/_ctypes/_ctypes.o
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 221.3: 1506-166 (S) Definition of function ffi_closure requires parentheses.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 221.15: 1506-276 (S) Syntax error: possible missing '{'?
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 248.3: 1506-273 (E) Missing type in declaration of ffi_raw_closure.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 251.38: 1506-275 (S) Unexpected text '*' encountered.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 252.23: 1506-276 (S) Syntax error: possible missing identifier?
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 251.1: 1506-033 (S) Function ffi_prep_raw_closure is not valid. Function cannot return a function.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 251.1: 1506-282 (S) The type of the parameters must be specified in a prototype.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 254.23: 1506-275 (S) Unexpected text 'void' encountered.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 254.38: 1506-275 (S) Unexpected text ')' encountered.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 257.43: 1506-275 (S) Unexpected text '*' encountered.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 258.28: 1506-276 (S) Syntax error: possible missing identifier?
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 257.1: 1506-033 (S) Function ffi_prep_java_raw_closure is not valid. Function cannot return a function.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 257.1: 1506-282 (S) The type of the parameters must be specified in a prototype.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 260.28: 1506-275 (S) Unexpected text 'void' encountered.
"build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 260.43: 1506-275 (S) Unexpected text ')' encountered.
"/sw_install/python-2.5/Modules/_ctypes/ctypes.h", line 71.9: 1506-046 (S) Syntax error.
"/sw_install/python-2.5/Modules/_ctypes/ctypes.h", line 77.26: 1506-195 (S) Integral constant expression with a value greater than zero is required.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 2804.31: 1506-068 (E) Operation between types "void*" and "int(*)(void)" is not allowed.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 3357.28: 1506-280 (E) Function argument assignment between types "int(*)(void)" and "void*" is not allowed.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 3417.42: 1506-022 (S) "pcl" is not a member of "struct {...}".
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 4749.67: 1506-280 (E) Function argument assignment between types "void*" and "void*(*)(void*,const void*,unsigned long)" is not allowed.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 4750.66: 1506-280 (E) Function argument assignment between types "void*" and "void*(*)(void*,int,unsigned long)" is not allowed.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 4751.69: 1506-280 (E) Function argument assignment between types "void*" and "struct _object*(*)(const char*,long)" is not allowed.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 4752.64: 1506-280 (E) Function argument assignment between types "void*" and "struct _object*(*)(void*,struct _object*,struct _object*)" is not allowed.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes.c", line 4754.70: 1506-280 (E) Function argument assignment between types "void*" and "struct _object*(*)(const unsigned int*,int)" is not allowed.
building '_ctypes_test' extension
xlc_r -q64 -DNDEBUG -O -I. -I/sw_install/python-2.5/./Include -I./Include -I. -I/sw_install/python-2.5/Include -I/sw_install/python-2.5 -c /sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c -o build/temp.aix-5.3-2.5/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.o
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 61.1: 1506-046 (S) Syntax error.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 68.1: 1506-046 (S) Syntax error.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 75.1: 1506-046 (S) Syntax error.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 320.9: 1506-009 (S) Bit-field M must be of type signed int, unsigned int or int.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 320.9: 1506-009 (S) Bit-field N must be of type signed int, unsigned int or int.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 320.9: 1506-009 (S) Bit-field O must be of type signed int, unsigned int or int.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 320.9: 1506-009 (S) Bit-field P must be of type signed int, unsigned int or int.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 320.9: 1506-009 (S) Bit-field Q must be of type signed int, unsigned int or int.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 320.9: 1506-009 (S) Bit-field R must be of type signed int, unsigned int or int.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 320.9: 1506-009 (S) Bit-field S must be of type signed int, unsigned int or int.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 371.1: 1506-046 (S) Syntax error.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 371.31: 1506-045 (S) Undeclared identifier get_last_tf_arg_s.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 372.1: 1506-046 (S) Syntax error.
"/sw_install/python-2.5/Modules/_ctypes/_ctypes_test.c", line 372.31: 1506-045 (S) Undeclared identifier get_last_tf_arg_u.
[...]

msg31049 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-01-18 20:02
oirraza, can you please try the subversion maintenance branch for Python 2.5 instead and report whether the bug has there? It is at

http://svn.python.org/projects/python/branches/release25-maint/

Thomas, can you please take a look at this? If not, unassign.
msg31050 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-01-24 21:00
There seem to be three separate compilation errors:

1. (build/temp.aix-5.3-2.5/libffi/include/ffi.h", line 221.3: 1506-166 (S) Definition of function ffi_closure requires parentheses)

    >This looks like the compile does not understand the __attribute__((...)) syntax.

2. In _ctypes_test.c, lines 61/68/75:  The source uses C++ comments instead of C comments.

3. The compiler does not seem to support bit fields in structures with type 'short'.

For issue 1: oirraza, can you try the compilation with '__attribute__((...))' removed?
Issue 2: is fixed now in SVN.
Issue 3: Hm, I don't actually know how to approach this.
msg31051 - (view) Author: Orlando Irrazabal (oirraza) Date: 2007-01-25 00:08
Thomas, i downloaded the subversion maintenance branch from http://svn.python.org/projects/python/branches/release25-maint/

but when i run ./configure 

fails with the below error message

[...]
mv: cannot rename config.c to Modules/config.c:
No such file or directory
msg31052 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-01-25 06:20
oirraza: when you say "I downloaded", what precisely do you mean? The only sensible way of downloading it is through subversion checkout, i.e. "svn co http:...".
msg31053 - (view) Author: Orlando Irrazabal (oirraza) Date: 2007-01-25 14:13
I downloaded with eclipse (subclipse addin) and then ftp to my aix machine. It's this ok?
msg31054 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-01-25 21:07
That should have worked. Can you please debug the build process yourself a bit. It will be very tedious to communicate individual commands, then wait a day, communicate the next command.

Start looking at the command immediately before the mv. It should have been a "makesetup" invocation, which should have produced config.c which it then tried to move.
msg31055 - (view) Author: Orlando Irrazabal (oirraza) Date: 2007-01-25 22:29
This is the debug output from makesetup command (add "set -x" to begining):

+ usage=
usage: makesetup [-s srcdir] [-l libdir] [-c config.c.in] [-m Makefile.pre]
                 [Setup] ... [-n [Setup] ...]
+ srcdir=.
+ libdir=
+ config=
+ makepre=
+ noobjects=
+ doconfig=yes
+ :
+ shift
+ config=./Modules/config.c.in
+ shift
+ :
+ shift
+ srcdir=Modules
+ shift
+ :
+ break
+ + sed s,/[^/]*$,,
+ echo ./Modules/makesetup
libdir=./Modules
+ makepre=Makefile.pre
+ NL=\

+ uname -s
+ echo *doconfig*
+ cat Modules/Setup.config
+ sed -e s/[    ]*#.*// -e /^[  ]*$/d
+ rulesf=@rules.843936
+ trap rm -f $rulesf 0 1 2 3
+ echo
# Rules appended by makedepend

+ 1> @rules.843936
+ DEFS=
+ MODS=
+ SHAREDMODS=
+ OBJS=
+ LIBS=
+ LOCALLIBS=
+ BASELIBS=
+ read line
+ echo *doconfig*
+ cat Modules/Setup.local
+ echo *doconfig*
+ cat Modules/Setup
+ grep \\$
+ echo *doconfig*
+ 1> /dev/null
+ doconfig=yes
+ continue
+ read line
+ grep \\$
+ echo thread threadmodule.c
+ 1> /dev/null
+ srcs=
+ cpps=
+ libs=
+ mods=
+ skip=
+ mods= thread
+ srcs= threadmodule.c
+ LIBS=
+ MODS=  thread
+ objs=
+ + basename threadmodule.c .c
obj=threadmodule.o
+ cc=$(CC)
+ obj=Modules/threadmodule.o
+ objs= Modules/threadmodule.o
+ src=$(srcdir)/Modules/threadmodule.c
+ cc=$(CC) $(PY_CFLAGS)
+ rule=Modules/threadmodule.o: $(srcdir)/Modules/threadmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/threadmodule.c -o Modules/threadmodule.o
+ echo Modules/threadmodule.o: $(srcdir)/Modules/threadmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/threadmodule.c -o Modules/threadmodule.o
+ 1>> @rules.843936
+ OBJS=  Modules/threadmodule.o
+ base=threadmodule
+ file=Modules/threadmodule$(SO)
+ rule=Modules/threadmodule$(SO):  Modules/threadmodule.o
+ rule=Modules/threadmodule$(SO):  Modules/threadmodule.o; $(LDSHARED)  Modules/threadmodule.o   -o Modules/threadmodule$(SO)
+ echo Modules/threadmodule$(SO):  Modules/threadmodule.o; $(LDSHARED)  Modules/threadmodule.o   -o Modules/threadmodule$(SO)
+ 1>> @rules.843936
+ read line
+ echo signal signalmodule.c
+ grep \\$
+ 1> /dev/null
+ srcs=
+ cpps=
+ libs=
+ mods=
+ skip=
+ mods= signal
+ srcs= signalmodule.c
+ LIBS=
+ MODS=  thread  signal
+ objs=
+ + basename signalmodule.c .c
obj=signalmodule.o
+ cc=$(CC)
+ obj=Modules/signalmodule.o
+ objs= Modules/signalmodule.o
+ src=$(srcdir)/Modules/signalmodule.c
+ cc=$(CC) $(PY_CFLAGS)
+ rule=Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
+ echo Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
+ 1>> @rules.843936
+ OBJS=  Modules/threadmodule.o  Modules/signalmodule.o
+ base=signalmodule
+ file=Modules/signalmodule$(SO)
+ rule=Modules/signalmodule$(SO):  Modules/signalmodule.o
+ rule=Modules/signalmodule$(SO):  Modules/signalmodule.o; $(LDSHARED)  Modules/signalmodule.o   -o Modules/signalmodule$(SO)
+ echo Modules/signalmodule$(SO):  Modules/signalmodule.o; $(LDSHARED)  Modules/signalmodule.o   -o Modules/signalmodule$(SO)
+ 1>> @rules.843936
+ read line
+ grep \\$
+ echo *doconfig*
+ 1> /dev/null
+ doconfig=yes
+ continue
+ read line
+ grep \\$
+ echo *doconfig*
+ 1> /dev/null
+ doconfig=yes
+ continue
+ read line
+ grep \\$
+ echo
+ 1> /dev/null
+ srcs=
+ cpps=
+ libs=
+ mods=
+ skip=
 in ho bad word
+ 1>& 2
 in word
+ exit 1
+ rm -f @rules.843936
msg84615 - (view) Author: Daniel Diniz (ajaksu2) (Python triager) Date: 2009-03-30 19:04
Orlando, Thomas: is this still valid?
msg114588 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-21 22:48
Closing due to lack of activity.
History
Date User Action Args
2010-08-21 22:48:16georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg114588

resolution: out of date
2009-03-30 19:04:27ajaksu2setversions: + Python 2.6, - Python 2.5
nosy: + ajaksu2

messages: + msg84615

type: compile error
stage: test needed
2007-01-16 21:06:15oirrazacreate