This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: could not build python 2.7.11 on AIX
Type: compile error Stage: resolved
Components: Build, Devguide Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: David.Edelsohn, Michael.Felt, ezio.melotti, lemburg, willingc
Priority: normal Keywords:

Created on 2016-03-01 15:08 by Michael.Felt, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (12)
msg261053 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-01 15:08
Finally noticed the new release, unfortunately it fails to build.

All proceeds normally until...

tail .buildaix/make.out
ar rc libpython2.7.a Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o
ar rc libpython2.7.a Objects/abstract.o Objects/boolobject.o Objects/bufferobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/capsule.o Objects/cellobject.o Objects/classobject.o Objects/cobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/intobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/object.o Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/stringobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o Objects/unicodeobject.o Objects/unicodectype.o
ar rc libpython2.7.a Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/random.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/dtoa.o Python/formatter_unicode.o Python/formatter_string.o Python/dynload_shlib.o   Python/thread.o
ar rc libpython2.7.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o 
ar rc libpython2.7.a Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o
ranlib libpython2.7.a
./Modules/makexp_aix Modules/python.exp . libpython2.7.a;  xlc  -Wl,-bE:Modules/python.exp -lld -o python \
                Modules/python.o \
                libpython2.7.a -ldl  -lpthread   -lm  
Makefile:485: recipe for target 'python' failed

more details...

michael@x071:[/data/prj/aixtools/python/python-2.7.11]make
./Modules/makexp_aix Modules/python.exp . libpython2.7.a;  xlc  -Wl,-bE:Modules/python.exp -lld -o python \
                Modules/python.o \
                libpython2.7.a -ldl  -lpthread   -lm  
ld: 0711-596 SEVERE ERROR: Object libpython2.7.a[ceval.o]
        An RLD for section 2 (.data) refers to symbol 0,
        but the storage class of the symbol is not C_EXT or C_HIDEXT.
ld: 0711-596 SEVERE ERROR: Object libpython2.7.a[ceval.o]
        An RLD for section 2 (.data) refers to symbol 0,
        but the storage class of the symbol is not C_EXT or C_HIDEXT.

This is, best guess, an error for 125 symbols...

michael@x071:[/data/prj/aixtools/python/python-2.7.11]nohup make | egrep "^ld" | wc -l

Obviously, if the ceval.o member is removed it cannot complete - BUT - I hope it provides sufficient info that someone may know what I should try next.

michael@x071:[/data/prj/aixtools/python/python-2.7.11]ar d libpython2.7.a ceval.o
michael@x071:[/data/prj/aixtools/python/python-2.7.11]make V=1
./Modules/makexp_aix Modules/python.exp . libpython2.7.a;  xlc  -Wl,-bE:Modules/python.exp -lld -o python \
                Modules/python.o \
                libpython2.7.a -ldl  -lpthread   -lm  
ld: 0711-317 ERROR: Undefined symbol: ._PyEval_SliceIndex
ld: 0711-317 ERROR: Undefined symbol: .PyEval_SaveThread
ld: 0711-317 ERROR: Undefined symbol: .PyEval_RestoreThread
ld: 0711-317 ERROR: Undefined symbol: _PyEval_SliceIndex
ld: 0711-317 ERROR: Undefined symbol: _Py_CheckRecursionLimit
ld: 0711-317 ERROR: Undefined symbol: ._Py_CheckRecursiveCall
ld: 0711-317 ERROR: Undefined symbol: .PyEval_GetFuncName
ld: 0711-317 ERROR: Undefined symbol: .PyEval_GetFuncDesc
ld: 0711-317 ERROR: Undefined symbol: .PyEval_CallObjectWithKeywords
ld: 0711-317 ERROR: Undefined symbol: .PyEval_GetRestricted
ld: 0711-317 ERROR: Undefined symbol: .PyEval_GetGlobals
ld: 0711-317 ERROR: Undefined symbol: _Py_Ticker
ld: 0711-317 ERROR: Undefined symbol: _Py_CheckInterval
ld: 0711-317 ERROR: Undefined symbol: PyEval_GetCallStats
ld: 0711-317 ERROR: Undefined symbol: .PyEval_ReleaseLock
ld: 0711-317 ERROR: Undefined symbol: .PyEval_InitThreads
ld: 0711-317 ERROR: Undefined symbol: .PyEval_AcquireThread
ld: 0711-317 ERROR: Undefined symbol: .PyEval_EvalCode
ld: 0711-317 ERROR: Undefined symbol: .PyEval_GetBuiltins
ld: 0711-317 ERROR: Undefined symbol: ._PyEval_CallTracing
ld: 0711-317 ERROR: Undefined symbol: .Py_GetRecursionLimit
ld: 0711-317 ERROR: Undefined symbol: .Py_SetRecursionLimit
ld: 0711-317 ERROR: Undefined symbol: .PyEval_SetProfile
ld: 0711-317 ERROR: Undefined symbol: .PyEval_SetTrace
ld: 0711-317 ERROR: Undefined symbol: .Py_FlushLine
ld: 0711-317 ERROR: Undefined symbol: .Py_AddPendingCall
ld: 0711-317 ERROR: Undefined symbol: .PyEval_ReInitThreads
ld: 0711-317 ERROR: Undefined symbol: .PyEval_GetFrame
ld: 0711-317 ERROR: Undefined symbol: .PyEval_EvalCodeEx
ld: 0711-317 ERROR: Undefined symbol: .PyEval_GetLocals
ld: 0711-317 ERROR: Undefined symbol: .PyEval_MergeCompilerFlags
ld: 0711-317 ERROR: Undefined symbol: .PyEval_EvalFrameEx
ld: 0711-317 ERROR: Undefined symbol: .Py_MakePendingCalls
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: *** [python] Error 8

michael@x071:[/data/prj/aixtools/python/python-2.7.11]./Modules/makexp_aix Modules/ceval.exp . Python/ceval.o
michael@x071:[/data/prj/aixtools/python/python-2.7.11]more Modules/ceval.exp
#!.
*
* Generated automatically by makexp_aix  (Tue Mar  1 14:52:11 UTC 2016)
*
* Base Directory: /data/prj/aixtools/python/python-2.7.11
* Input File(s) : Python/ceval.o
*
* NOTE: lists _all_ global symbols defined in the above file(s).
*
PyEval_AcquireLock
PyEval_AcquireThread
PyEval_CallObjectWithKeywords
PyEval_EvalCode
PyEval_EvalCodeEx
PyEval_EvalFrame
PyEval_EvalFrameEx
PyEval_GetBuiltins
PyEval_GetCallStats
PyEval_GetFrame
PyEval_GetFuncDesc
PyEval_GetFuncName
PyEval_GetGlobals
PyEval_GetLocals
PyEval_GetRestricted
PyEval_InitThreads
PyEval_MergeCompilerFlags
PyEval_ReInitThreads
PyEval_ReleaseLock
PyEval_ReleaseThread
PyEval_RestoreThread
PyEval_SaveThread
PyEval_SetProfile
PyEval_SetTrace
PyEval_ThreadsInitialized
Py_AddPendingCall
Py_FlushLine
Py_GetRecursionLimit
Py_MakePendingCalls
Py_SetRecursionLimit
_PyEval_CallTracing
_PyEval_SliceIndex
_Py_CheckInterval
_Py_CheckRecursionLimit
_Py_CheckRecursiveCall
_Py_Ticker


FYI: this may be related to an issue with the assembler not doing the right thing after the changes between. HOWEVER, besides an older AIX 5.3 system that might have had a bad 'as', I get the same error on AIX 6.1 TL5.

From the APAR description - mine is fixed:
The broken assembler is distributed in all latest service packs of all - as of July 21st, 2011 - supported AIX versions: 
https://www-304.ibm.com/support/docview.wss?uid=isg1IZ98134

So, while a bug is always a possibility - this OLD one is not likely.
michael@x071:[/data/prj/aixtools/python/python-2.7.11]oslevel -s
6100-09-04-1441

Instead, I am thinking that I will try being more specicif with the machine (processor) definition, e.g. power5 rather than common.

Suggestions welcome!
msg261054 - (view) Author: David Edelsohn (David.Edelsohn) * Date: 2016-03-01 15:11
Don't use XLC.  It may relate to using -Wl option, which is a GCC option.
msg261055 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-01 16:15
It worked fine using xlc with 2.7.10 (verified again today).

The delta between ceval.c in 2.7.10 and 2.7.11 is large.

make.out (excerpt) 2.7.10:

        rm -f libpython2.7.a
        ar rc libpython2.7.a Modules/getbuildinfo.o
        ar rc libpython2.7.a Parser/acceler.o  Parser/grammar1.o  Parser/listnode.o  Parser/node.o  Parser/parser.o  Parser/parsetok.o  Parser/bitset.o  Parser/metagrammar.o
Parser/firstsets.o  Parser/grammar.o  Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o
        ar rc libpython2.7.a Objects/abstract.o  Objects/boolobject.o  Objects/bufferobject.o  Objects/bytes_methods.o  Objects/bytearrayobject.o  Objects/capsule.o  Objects/c
ellobject.o  Objects/classobject.o  Objects/cobject.o  Objects/codeobject.o  Objects/complexobject.o  Objects/descrobject.o  Objects/enumobject.o  Objects/exceptions.o  Object
s/genobject.o  Objects/fileobject.o  Objects/floatobject.o  Objects/frameobject.o  Objects/funcobject.o  Objects/intobject.o  Objects/iterobject.o  Objects/listobject.o  Objec
ts/longobject.o  Objects/dictobject.o  Objects/memoryobject.o  Objects/methodobject.o  Objects/moduleobject.o  Objects/object.o  Objects/obmalloc.o  Objects/rangeobject.o  Obj
ects/setobject.o  Objects/sliceobject.o  Objects/stringobject.o  Objects/structseq.o  Objects/tupleobject.o  Objects/typeobject.o  Objects/weakrefobject.o  Objects/unicodeobje
ct.o Objects/unicodectype.o
        ar rc libpython2.7.a Python/_warnings.o  Python/Python-ast.o  Python/asdl.o  Python/ast.o  Python/bltinmodule.o  Python/ceval.o  Python/compile.o  Python/codecs.o  Pyt
hon/errors.o  Python/frozen.o  Python/frozenmain.o  Python/future.o  Python/getargs.o  Python/getcompiler.o  Python/getcopyright.o  Python/getplatform.o  Python/getversion.o
Python/graminit.o  Python/import.o  Python/importdl.o  Python/marshal.o  Python/modsupport.o  Python/mystrtoul.o  Python/mysnprintf.o  Python/peephole.o  Python/pyarena.o  Pyt
hon/pyctype.o  Python/pyfpe.o  Python/pymath.o  Python/pystate.o  Python/pythonrun.o  Python/random.o  Python/structmember.o  Python/symtable.o  Python/sysmodule.o  Python/tra
ceback.o  Python/getopt.o  Python/pystrcmp.o  Python/pystrtod.o  Python/dtoa.o  Python/formatter_unicode.o  Python/formatter_string.o  Python/dynload_shlib.o      Python/threa
d.o
        ar rc libpython2.7.a Modules/config.o  Modules/getpath.o  Modules/main.o  Modules/gcmodule.o
        ar rc libpython2.7.a Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecs
module.o  Modules/_weakref.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o
        ranlib libpython2.7.a
        ./Modules/makexp_aix Modules/python.exp . libpython2.7.a;  xlc  -Wl,-bE:Modules/python.exp -lld -o python  Modules/python.o  libpython2.7.a -ldl  -lpthread   -lm
         ./python -E -S -m sysconfig --generate-posix-vars ; if test $? -ne 0 ; then  echo "generate-posix-vars failed" ;  rm -f ./pybuilddir.txt ;  exit 1 ;  fi
running build

tail make.out (2.7.11)
rm -f libpython2.7.a
ar rc libpython2.7.a Modules/getbuildinfo.o
ar rc libpython2.7.a Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets
.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o
ar rc libpython2.7.a Objects/abstract.o Objects/boolobject.o Objects/bufferobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/capsule.o Objects/cellobject.o Ob
jects/classobject.o Objects/cobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/
fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/intobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictob
ject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/object.o Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o
 Objects/stringobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o Objects/unicodeobject.o Objects/unicodectype.o
ar rc libpython2.7.a Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o Pyt
hon/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/
import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Pytho
n/pymath.o Python/pystate.o Python/pythonrun.o Python/random.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o Python/getopt.o Python/pystrcmp.o
Python/pystrtod.o Python/dtoa.o Python/formatter_unicode.o Python/formatter_string.o Python/dynload_shlib.o   Python/thread.o
ar rc libpython2.7.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o
ar rc libpython2.7.a Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o
  Modules/_weakref.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o
ranlib libpython2.7.a
./Modules/makexp_aix Modules/python.exp . libpython2.7.a;  xlc  -Wl,-bE:Modules/python.exp -lld -o python \
                Modules/python.o \
                libpython2.7.a -ldl  -lpthread   -lm

If -Wl,something was a structural problem I would have quit xlc (and perhaps AIX) years ago.
msg261058 - (view) Author: David Edelsohn (David.Edelsohn) * Date: 2016-03-01 16:22
Something is building libpython2.7.a incorrectly or the python.exp script is not functioning correctly.

ld: 0711-596 SEVERE ERROR: Object libpython2.7.a[ceval.o]
        An RLD for section 2 (.data) refers to symbol 0,
        but the storage class of the symbol is not C_EXT or C_HIDEXT.
ld: 0711-596 SEVERE ERROR: Object libpython2.7.a[ceval.o]
        An RLD for section 2 (.data) refers to symbol 0,
        but the storage class of the symbol is not C_EXT or C_HIDEXT.

is different than the later undefined symbols error.
msg261061 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-01 19:10
the basic process I have used repeatedly (for calling ./configure) to package python, and many other things has not changed.

Today, I repackaged version 2.7.10 (the file listed in 2.7.10.0) just to test the process I was using with 2.7.11

I learned that 2.7.10 does not build with the src and build seperated, while 2.7.11 supports having the src in a different directory (e.g., ../src/python-2.7.11)

root@x064:[/data/prj/aixtools/python]find p* old -name \*.I -ls
44641791 48748 -rw-r--r--  1 root      system    49917952 Mar  1 12:59 python-2.7.10/installp/ppc/aixtools.python.2.7.10.0.aix537.I
102500359 48758 -rw-r--r--  1 199      1954     49927680 Nov  3 15:00 python-2.7.10.0/installp/ppc/aixtools.python.2.7.10.0.aix537.I
102307460 46487 -rw-r--r--  1 199      1954     47602688 Oct 31 17:14 old/python-2.7.8.2/installp/ppc/aixtools.prj.python.2.7.8.2.aix537.I
44377168 44107 -rwxrwxr--  1 199      1954     45165056 Sep 26  2013 old/Python-2.7.3/installp/ppc/aixtools.Python.2.7.3.0.I
44433716 46063 -rw-r--r--  1 199      1954     47168000 Apr 24  2015 old/python-2.7.8.1/installp/ppc/aixtools.prj.python.2.7.8.1.aix619.I
102373018 46360 -rw-r--r--  1 199      1954     47472128 Nov  3 12:51 old/python-2.7.8.0/installp/ppc/aixtools.python.2.7.8.0.aix537.I

FYI: aix537.I means the program was linked on AIX 5.3 TL7: aix619.I means AIX 6.1 TL9

That is one of the changes mentioned (in 2013 I packaged without a visual reminder of the system used, read - lowest level it would install on properly - e.g., as with python 2.7.3)

Hence, my best guess is that something in the way ceval.c is now holding back the linking.

If there is someone interested in reading the result I can provide the output of /usr/vac/exe/dis Python/ceval.o (disassembly of ceval.o).

Or maybe someone has a better way of getting more specific error message than
        An RLD for section 2 (.data) refers to symbol 0,
        but the storage class of the symbol is not C_EXT or C_HIDEXT.

i.e., I do not see how to recognize "symbol 0" (unless something in the .c file is defining something as NULL over and over again and I am blind to that as well.)
msg261062 - (view) Author: David Edelsohn (David.Edelsohn) * Date: 2016-03-01 19:16
It's not symbol with value 0, it's symbol number 0.  You can list the symbols with the AIX "dump -t" command.
msg261099 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-02 08:19
At first I thought it might be a 0x0001 rather than 0x0003 (as I have no idea what the additional info is AND that the lines starting with [0] are the Symbol 0 (zero) you indicate the message.

Also thought it might have been the double listing of some symbols where both the 'm' and the 'a4' lines start with 0x00000000 (but see those for other .o files as well)

And I verified that the .o file (outside the archive) also has '[705]' entries.

Need more guidance. I get neither heads nor tails...

So, dump -t libpython2.7.a snips:

libpython2.7.a[getbuildinfo.o]:

                        ***Symbol Table Information***
[Index] m        Value       Scn   Aux  Sclass    Type            Name
[Index] a0                                                        Fname
[Index] a1      Tagndx      Lnno  Size  Lnoptr    Endndx
[Index] a2      Tagndx            Fsiz  Lnoptr    Endndx
[Index] a3      Tagndx      Lnno  Size  Dimensions
[Index] a4   CSlen     PARMhsh SNhash SMtype SMclass Stab SNstab
[Index] a5      SECTlen    #RELent    #LINnums

[0]     m   0x00000000        -2     3    0x67         0x0003     .file
[1]     a0                                                        ../src/python-2.7.11/Modules/getbuildinfo.c
[2]     a0                                                        Tue Mar  1 18:47:41 2016 
[3]     a0                                                        IBM XL C for AIX, Version 11.1.0.20
[4]     m   0x00000000         1     1    0x03         0x0000     .text
[5]     a5  0x00000180     0x000b     0x0000
[6]     m   0x00000180         2     1    0x03         0x0000     .data
[7]     a5  0x000000c4     0x000e     0x0000
[8]     m   0x00000244         3     1    0x03         0x0000     .bss
[9]     a5  0x00000034     0x0000     0x0000
[10]    m   0x00000000         1     1    0x6b         0x0000     **No Symbol**
[11]    a4  0x00000180       0    0     57    0        0    0
[12]    m   0x00000000         1     1    0x02         0x0020     ._Py_hgversion
[13]    a4  0x0000000a       0    0      2    0        0    0
[14]    m   0x00000020         1     1    0x02         0x0020     ._Py_hgidentifier
[15]    a4  0x0000000a       0    0      2    0        0    0
[16]    m   0x00000040         1     1    0x02         0x0020     ._Py_svnversion
[17]    a4  0x0000000a       0    0      2    0        0    0
[18]    m   0x00000060         1     1    0x02         0x0020     .Py_GetBuildInfo
[19]    a4  0x0000000a       0    0      2    0        0    0
[20]    m   0x00000180         2     1    0x6b         0x0000     TOC
[21]    a4  0x00000000       0    0     17   15        0    0
[22]    m   0x00000184         2     1    0x6b         0x0000     **No Symbol**
[23]    a4  0x00000004       0    0     17    3        0    0
[24]    m   0x000001c8         2     1    0x6b         0x0000     **No Symbol**
[25]    a4  0x00000079       0    0     33    1        0    0
[26]    m   0x00000244         3     1    0x6b         0x0000     _$STATIC_BSS
[27]    a4  0x00000034       0    0     35    5        0    0
[28]    m   0x00000194         2     1    0x6b         0x0000     _$STATIC_BSS
[29]    a4  0x00000004       0    0     17    3        0    0
[30]    m   0x00000198         2     1    0x02         0x0000     _Py_hgversion
[31]    a4  0x0000000c       0    0     17   10        0    0
[32]    m   0x00000180         2     1    0x6b         0x0000     _Py_hgversion
[33]    a4  0x00000004       0    0     17    3        0    0
[34]    m   0x000001a4         2     1    0x02         0x0000     _Py_hgidentifier
[35]    a4  0x0000000c       0    0     17   10        0    0
[36]    m   0x00000188         2     1    0x6b         0x0000     _Py_hgidentifier
[37]    a4  0x00000004       0    0     17    3        0    0
[38]    m   0x000001b0         2     1    0x02         0x0000     _Py_svnversion
[39]    a4  0x0000000c       0    0     17   10        0    0
[40]    m   0x0000018c         2     1    0x6b         0x0000     _Py_svnversion
[41]    a4  0x00000004       0    0     17    3        0    0
[42]    m   0x000001bc         2     1    0x02         0x0000     Py_GetBuildInfo
[43]    a4  0x0000000c       0    0     17   10        0    0
[44]    m   0x00000190         2     1    0x6b         0x0000     Py_GetBuildInfo
[45]    a4  0x00000004       0    0     17    3        0    0
[46]    m   0x00000000         0     1    0x02         0x0000     .PyOS_snprintf
[47]    a4  0x00000000       0    0      0    0        0    0

libpython2.7.a[acceler.o]:

                        ***Symbol Table Information***
[Index] m        Value       Scn   Aux  Sclass    Type            Name
[Index] a0                                                        Fname
[Index] a1      Tagndx      Lnno  Size  Lnoptr    Endndx
[Index] a2      Tagndx            Fsiz  Lnoptr    Endndx
[Index] a3      Tagndx      Lnno  Size  Dimensions
[Index] a4   CSlen     PARMhsh SNhash SMtype SMclass Stab SNstab
[Index] a5      SECTlen    #RELent    #LINnums

[0]     m   0x00000000        -2     3    0x67         0x0001     .file
[1]     a0                                                        ../src/python-2.7.11/Parser/acceler.c
[2]     a0                                                        Tue Mar  1 15:58:27 2016 
[3]     a0                                                        IBM XL C for AIX, Version 11.1.0.21
[4]     m   0x00000000         1     1    0x03         0x0000     .text
[5]     a5  0x00000700     0x0011     0x0000
[6]     m   0x00000700         2     1    0x03         0x0000     .data
[7]     a5  0x000000c8     0x0008     0x0000
[8]     m   0x000007c8         3     1    0x03         0x0000     .bss
[9]     a5  0x00000000     0x0000     0x0000
[10]    m   0x00000000         1     1    0x6b         0x0000     **No Symbol**
[11]    a4  0x00000700       0    0     57    0        0    0
[12]    m   0x00000000         1     1    0x6b         0x0020     .fixstate
[13]    a4  0x0000000a       0    0      2    0        0    0
[14]    m   0x000003c0         1     1    0x6b         0x0020     .fixdfa
[15]    a4  0x0000000a       0    0      2    0        0    0
[16]    m   0x00000480         1     1    0x02         0x0020     .PyGrammar_RemoveAccelerators

...
libpython2.7.a[ceval.o]:

                        ***Symbol Table Information***
[Index] m        Value       Scn   Aux  Sclass    Type            Name
[Index] a0                                                        Fname
[Index] a1      Tagndx      Lnno  Size  Lnoptr    Endndx
[Index] a2      Tagndx            Fsiz  Lnoptr    Endndx
[Index] a3      Tagndx      Lnno  Size  Dimensions
[Index] a4   CSlen     PARMhsh SNhash SMtype SMclass Stab SNstab
[Index] a5      SECTlen    #RELent    #LINnums

[0]     m   0x00000000        -2     3    0x67         0x0001     .file
[1]     a0                                                        ../src/python-2.7.11/Python/ceval.c
[2]     a0                                                        Tue Mar  1 18:47:25 2016 
[3]     a0                                                        IBM XL C for AIX, Version 11.1.0.20
[4]     m   0x00000000         1     1    0x03         0x0000     .text
[5]     a5  0x0000f080     0x0314     0x0000
[6]     m   0x0000f080         2     1    0x03         0x0000     .data
[7]     a5  0x00001768     0x02a0     0x0000
[8]     m   0x000107e8         3     1    0x03         0x0000     .bss
[9]     a5  0x00000110     0x0000     0x0000
[10]    m   0x00000000         1     1    0x6b         0x0000     **No Symbol**
[11]    a4  0x0000f080       0    0     57    0        0    0
[12]    m   0x00000000         1     1    0x6b         0x0020     .err_args
[13]    a4  0x0000000a       0    0      2    0        0    0
[14]    m   0x00000080         1     1    0x6b         0x0020     .unpack_iterable
[15]    a4  0x0000000a       0    0      2    0        0    0
[16]    m   0x000003e0         1     1    0x6b         0x0020     .do_raise
[17]    a4  0x0000000a       0    0      2    0        0    0
[18]    m   0x00000980         1     1    0x6b         0x0020     .special_lookup
[19]    a4  0x0000000a       0    0      2    0        0    0
[20]    m   0x00000aa0         1     1    0x6b         0x0020     .kwd_as_string
[21]    a4  0x0000000a       0    0      2    0        0    0
[22]    m   0x00000b00         1     1    0x6b         0x0020     .string_concatenate
...
[133]   a4  0x0000000a       0    0      2    0        0    0
[134]   m   0x0000ee80         1     1    0x6b         0x0020     .kwd_as_string@AF71_5
[135]   a4  0x0000000a       0    0      2    0        0    0
[136]   m   0x0000eee0         1     1    0x6b         0x0020     ._PyEval_SliceIndex@AF72_31
[137]   a4  0x0000000a       0    0      2    0        0    0
[138]   m   0x0000f000         1     1    0x6b         0x0020     .format_exc_check_arg@AF73_7
[139]   a4  0x0000000a       0    0      2    0        0    0
[140]   m   0x0000f080         2     1    0x6b         0x0000     TOC
[141]   a4  0x00000000       0    0     17   15        0    0
[142]   m   0x0000f084         2     1    0x6b         0x0000     **No Symbol**
[143]   a4  0x00000004       0    0     17    3        0    0
[144]   m   0x0000fd4c         2     1    0x6b         0x0000     **No Symbol**
[145]   a4  0x00000a9c       0    0     33    1        0    0
[146]   m   0x0000f340         2     1    0x6b         0x0000     _$STATIC
[147]   a4  0x00000a0c       0    0     33    5        0    0
[148]   m   0x0000f0f0         2     1    0x6b         0x0000     _$STATIC
[149]   a4  0x00000004       0    0     17    3        0    0
[150]   m   0x000107e8         3     1    0x6b         0x0000     _$STATIC_BSS
[151]   a4  0x00000110       0    0     35    5        0    0
[152]   m   0x0000f140         2     1    0x6b         0x0000     _$STATIC_BSS
[153]   a4  0x00000004       0    0     17    3        0    0
[154]   m   0x00000000         0     1    0x02         0x0000     PyExc_TypeError
[155]   a4  0x00000000       0    0      0    4        0    0
[156]   m   0x0000f080         2     1    0x6b         0x0000     PyExc_TypeError
[157]   a4  0x00000004       0    0     17    3        0    0
[158]   m   0x00000000         0     1    0x02         0x0000     PyExc_ValueError
[159]   a4  0x00000000       0    0      0    4        0    0
[160]   m   0x0000f088         2     1    0x6b         0x0000     PyExc_ValueError
[161]   a4  0x00000004       0    0     17    3        0    0
[162]   m   0x00000000         0     1    0x02         0x0000     _PyThreadState_Current
[163]   a4  0x00000000       0    0      0    4        0    0
[164]   m   0x0000f08c         2     1    0x6b         0x0000     _PyThreadState_Current
[165]   a4  0x00000004       0    0     17    3        0    0
[166]   m   0x00000000         0     1    0x02         0x0000     _Py_NoneStruct
[167]   a4  0x00000000       0    0      0    4        0    0
[168]   m   0x0000f090         2     1    0x6b         0x0000     _Py_NoneStruct
[169]   a4  0x00000004       0    0     17    3        0    0
[170]   m   0x00000000         0     1    0x02         0x0000     PyClass_Type
[171]   a4  0x00000000       0    0      0    4        0    0
[172]   m   0x0000f094         2     1    0x6b         0x0000     PyClass_Type
[173]   a4  0x00000004       0    0     17    3        0    0
[174]   m   0x00000000         0     1    0x02         0x0000     PyInstance_Type
[175]   a4  0x00000000       0    0      0    4        0    0
[176]   m   0x0000f098         2     1    0x6b         0x0000     PyInstance_Type
...
[238]   m   0x00000000         0     1    0x02         0x0000     PyFunction_Type
[239]   a4  0x00000000       0    0      0    4        0    0
[240]   m   0x0000f0d8         2     1    0x6b         0x0000     PyFunction_Type
[241]   a4  0x00000004       0    0     17    3        0    0
[242]   m   0x0000f1a8         2     1    0x02         0x0000     _PyEval_CallTracing
[243]   a4  0x0000000c       0    0     17   10        0    0
[244]   m   0x0000f0dc         2     1    0x6b         0x0000     _PyEval_CallTracing
[245]   a4  0x00000004       0    0     17    3        0    0
[246]   m   0x0000f1b4         2     1    0x02         0x0000     PyEval_EvalCodeEx
[247]   a4  0x0000000c       0    0     17   10        0    0
[248]   m   0x0000f0e0         2     1    0x6b         0x0000     PyEval_EvalCodeEx
[249]   a4  0x00000004       0    0     17    3        0    0
[250]   m   0x0000f1c0         2     1    0x02         0x0000     PyEval_EvalCode
[251]   a4  0x0000000c       0    0     17   10        0    0
[252]   m   0x0000f0e4         2     1    0x6b         0x0000     PyEval_EvalCode
[253]   a4  0x00000004       0    0     17    3        0    0
...
[406]   m   0x0000f2e0         2     1    0x02         0x0000     PyEval_GetFrame
[407]   a4  0x0000000c       0    0     17   10        0    0
[408]   m   0x0000f188         2     1    0x6b         0x0000     PyEval_GetFrame
[409]   a4  0x00000004       0    0     17    3        0    0
[410]   m   0x00000000         0     1    0x02         0x0000     _PyThreadState_GetFrame
[411]   a4  0x00000000       0    0      0    4        0    0
[412]   m   0x0000f18c         2     1    0x6b         0x0000     _PyThreadState_GetFrame
[413]   a4  0x00000004       0    0     17    3        0    0
[414]   m   0x0000f2ec         2     1    0x02         0x0000     PyEval_GetLocals
[415]   a4  0x0000000c       0    0     17   10        0    0
[416]   m   0x0000f190         2     1    0x6b         0x0000     PyEval_GetLocals
[417]   a4  0x00000004       0    0     17    3        0    0
[418]   m   0x0000f2f8         2     1    0x02         0x0000     PyEval_GetGlobals
[419]   a4  0x0000000c       0    0     17   10        0    0
[420]   m   0x0000f194         2     1    0x6b         0x0000     PyEval_GetGlobals
[421]   a4  0x00000004       0    0     17    3        0    0
[422]   m   0x0000f304         2     1    0x02         0x0000     PyEval_GetBuiltins
[423]   a4  0x0000000c       0    0     17   10        0    0
[424]   m   0x0000f198         2     1    0x6b         0x0000     PyEval_GetBuiltins
[425]   a4  0x00000004       0    0     17    3        0    0
[426]   m   0x0000f310         2     1    0x02         0x0000     PyEval_SetTrace
[427]   a4  0x0000000c       0    0     17   10        0    0
[428]   m   0x0000f19c         2     1    0x6b         0x0000     PyEval_SetTrace
[429]   a4  0x00000004       0    0     17    3        0    0
[430]   m   0x0000f31c         2     1    0x02         0x0000     PyEval_SetProfile
[431]   a4  0x0000000c       0    0     17   10        0    0
[432]   m   0x0000f1a0         2     1    0x6b         0x0000     PyEval_SetProfile
[433]   a4  0x00000004       0    0     17    3        0    0
[434]   m   0x0000f328         2     1    0x02         0x0000     PyEval_CallObjectWithKeywords
[435]   a4  0x0000000c       0    0     17   10        0    0
[436]   m   0x0000f1a4         2     1    0x6b         0x0000     PyEval_CallObjectWithKeywords
[437]   a4  0x00000004       0    0     17    3        0    0
[438]   m   0x00000000         0     1    0x02         0x0000     .PyErr_Format
[439]   a4  0x00000000       0    0      0    0        0    0
[440]   m   0x00000000         0     1    0x02         0x0000     .PyObject_GetIter
[441]   a4  0x00000000       0    0      0    0        0    0
[442]   m   0x00000000         0     1    0x02         0x0000     .PyIter_Next
[443]   a4  0x00000000       0    0      0    0        0    0
[444]   m   0x00000000         0     1    0x02         0x0000     .PyErr_Occurred
[445]   a4  0x00000000       0    0      0    0        0    0
[446]   m   0x00000000         0     1    0x02         0x0000     .PyErr_SetString
[447]   a4  0x00000000       0    0      0    0        0    0
...
[696]   m   0x00000000         0     1    0x02         0x0000     .PyNumber_Divide
[697]   a4  0x00000000       0    0      0    0        0    0
[698]   m   0x00000000         0     1    0x02         0x0000     .PyErr_SetNone
[699]   a4  0x00000000       0    0      0    0        0    0
[700]   m   0x00000000         0     1    0x02         0x0000     .PyTraceBack_Here
[701]   a4  0x00000000       0    0      0    0        0    0
[702]   m   0x00000000         0     1    0x02         0x0000     ._PyUnicodeUCS2_AsDefaultEncodedString
[703]   a4  0x00000000       0    0      0    0        0    0
[704]   m   0x00000000         0     1    0x02         0x0000     .PyNumber_AsSsize_t
[705]   a4  0x00000000       0    0      0    0        0    0
msg261103 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-02 10:18
Patched to fp22: vacpp.11.1.0.22.aix53TL7-71.sept2015.ptf.tar.Z

after reinstalling system! to be sure no garbage left around.

Only updates are openSSL/SSH packages; no RPM's installed.

Same error message(s).

Tried compiling ceval.o with -O0 (capt. O, zero) - same messages

Tried linking with .o files only (no archive) - effectively, same message.
root@x064:[/data/prj/aixtools/python-2.7.11]xlc  -o python  Modules/python.o Python/*.o
ld: 0711-596 SEVERE ERROR: Object Python/ceval.o
        An RLD for section 2 (.data) refers to symbol 0,
        but the storage class of the symbol is not C_EXT or C_HIDEXT.
ld: 0711-596 SEVERE ERROR: Object Python/ceval.o
        An RLD for section 2 (.data) refers to symbol 0,
        but the storage class of the symbol is not C_EXT or C_HIDEXT.

Maybe xlc does not know how to code the differences

snip:
diff -u ./python-2.7.10/Python/ceval.c ./python-2.7.11/Python/ceval.c | head -50
michael@x071:[/data/prj/aixtools/src]ython-2.7.11/Python/ceval.c | head -50    <
--- ./python-2.7.10/Python/ceval.c      2015-05-23 16:09:24 +0000
+++ ./python-2.7.11/Python/ceval.c      2015-12-05 19:47:19 +0000
@@ -615,7 +615,7 @@
    to guarantee that _Py_CheckRecursiveCall() is regularly called.
    Without USE_STACKCHECK, there is no need for this. */
 int
-_Py_CheckRecursiveCall(char *where)
+_Py_CheckRecursiveCall(const char *where)
 {
     PyThreadState *tstate = PyThreadState_GET();
 
@@ -688,6 +688,100 @@
 PyObject *
 PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
 {
+#ifdef DYNAMIC_EXECUTION_PROFILE
+  #undef USE_COMPUTED_GOTOS
+#endif
+#ifdef HAVE_COMPUTED_GOTOS
+    #ifndef USE_COMPUTED_GOTOS
+    #define USE_COMPUTED_GOTOS 1
+    #endif
+#else
+    #if defined(USE_COMPUTED_GOTOS) && USE_COMPUTED_GOTOS
+    #error "Computed gotos are not supported on this compiler."
+    #endif
+    #undef USE_COMPUTED_GOTOS
+    #define USE_COMPUTED_GOTOS 0
+#endif
+#if USE_COMPUTED_GOTOS
+/* Import the static jump table */
+#include "opcode_targets.h"
+
+  /* This macro is used when several opcodes defer to the same implementation
+   (e.g. SETUP_LOOP, SETUP_FINALLY) */
+#define TARGET_WITH_IMPL(op, impl) \
+        TARGET_##op: \
+        opcode = op; \
+        oparg = NEXTARG(); \
+        case op: \
+        goto impl; \
+
+#define TARGET_WITH_IMPL_NOARG(op, impl) \
+        TARGET_##op: \
+        opcode = op; \
+        case op: \
+        goto impl; \
+
+#define TARGET_NOARG(op) \
+        TARGET_##op: \

In "character" a big change from 2.7.8 to 2.7.10
michael@x071:[/data/prj/aixtools/python]diff -u ./old/Python-2.7.8/Python/ceval>
--- ./old/Python-2.7.8/Python/ceval.c   2014-06-30 02:05:46 +0000
+++ ./old/Python-2.7.10/Python/ceval.c  2015-05-23 16:09:24 +0000
@@ -66,9 +66,11 @@
    even in 64-bit mode, we need to use "a" and "d" for the lower and upper
    32-bit pieces of the result. */
 
-#define READ_TIMESTAMP(val) \
-    __asm__ __volatile__("rdtsc" : \
-                         "=a" (((int*)&(val))[0]), "=d" (((int*)&(val))[1]));
+#define READ_TIMESTAMP(val) do {                        \
+    unsigned int h, l;                                  \
+    __asm__ __volatile__("rdtsc" : "=a" (l), "=d" (h)); \
+    (val) = ((uint64)l) | (((uint64)h) << 32);          \
+    } while(0)
 
 
 #else
@@ -355,12 +357,6 @@
     if (interpreter_lock) {
         int err = errno;
         PyThread_acquire_lock(interpreter_lock, 1);
-        /* _Py_Finalizing is protected by the GIL */
-        if (_Py_Finalizing && tstate != _Py_Finalizing) {
-            PyThread_release_lock(interpreter_lock);
-            PyThread_exit_thread();
-            assert(0);  /* unreachable */
-        }
         errno = err;
     }
 #endif
@@ -1025,12 +1021,6 @@
 
                 PyThread_acquire_lock(interpreter_lock, 1);
 
-                /* Check if we should make a quick exit. */
-                if (_Py_Finalizing && _Py_Finalizing != tstate) {
-                    PyThread_release_lock(interpreter_lock);
-                    PyThread_exit_thread();
-                }
-
                 if (PyThreadState_Swap(tstate) != NULL)
                     Py_FatalError("ceval: orphan tstate");
 
@@ -1957,9 +1947,13 @@
                 if (err == 0) continue;
                 break;
             }
+            t = PyObject_Repr(w);
+            if (t == NULL)
+                break;
             PyErr_Format(PyExc_SystemError,
                          "no locals found when storing %s",
-                         PyObject_REPR(w));
+                         PyString_AS_STRING(t));
+            Py_DECREF(t);
             break;
 
         case DELETE_NAME:
@@ -1971,9 +1965,13 @@
                                          w);
                 break;
             }
+            t = PyObject_Repr(w);
+            if (t == NULL)
+                break;
             PyErr_Format(PyExc_SystemError,
                          "no locals when deleting %s",
-                         PyObject_REPR(w));
+                         PyString_AS_STRING(w));
+            Py_DECREF(t);
             break;
 
         PREDICTED_WITH_ARG(UNPACK_SEQUENCE);
@@ -2046,10 +2044,14 @@
         case LOAD_NAME:
             w = GETITEM(names, oparg);
             if ((v = f->f_locals) == NULL) {
+                why = WHY_EXCEPTION;
+                t = PyObject_Repr(w);
+                if (t == NULL)
+                    break;
                 PyErr_Format(PyExc_SystemError,
                              "no locals when loading %s",
-                             PyObject_REPR(w));
-                why = WHY_EXCEPTION;
+                             PyString_AS_STRING(w));
+                Py_DECREF(t);
                 break;
             }
             if (PyDict_CheckExact(v)) {
michael@x071:[/data/prj/aixtools/python]

So, until someone can help figure out which symbol is being referenced, yet seems to lack a correct attribute
"but the storage class of the symbol is not C_EXT or C_HIDEXT."

I am lost.

Thank you for your consideration.
msg261104 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2016-03-02 10:43
Does Python 2.7.10 build fine ? If so, then perhaps xlc doesn't
like the computed gotos in ceval.c.

You could try compiling with:

./configure ... --without-computed-gotos ...

to check.
msg261124 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-02 16:31
wonderful suggestion - it gets the build past that hurdle.

My bad that I had not looked more carefully at configure --help output.

But that brings back another 'issue' I had also seen when verifying 2.7.10. I shall look in the bug-list for a related issue (I seem to recall at least one) - and request that this one be closed.

Thanks!
msg261152 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-03 09:16
Would just like to add my heartfelt thanks for the simple hint

And, perhaps something to add to the Docs

After adding "--without-computed-gotos" I can complete a (default) configure, make, make (DESTDIR=xxx) install of

* python-2.7.11 (was not needed for 2.7.10 and earlier 2.7 releases)
* python-3.4.4
* python-3.5.1

That said, there may still be some minor issues yet to come - but the root cause of my recent failures (emphasis on my) are resolved.

If not in the Dev-Guide paragraph for AIX - please add
use --without-computed-gotos when using IBM xlc (aka vac) compiler.

Again,

THANKS!
msg261391 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-03-09 00:45
Hope it is okay for me to close this. As it is working with the additional flag to configure.
History
Date User Action Args
2022-04-11 14:58:28adminsetgithub: 70653
2016-03-20 11:35:06ezio.melottisettype: compile error
resolution: fixed
stage: resolved
2016-03-09 00:45:58Michael.Feltsetstatus: open -> closed

messages: + msg261391
2016-03-03 11:10:10vstinnersetnosy: - vstinner
2016-03-03 09:16:51Michael.Feltsettitle: cannot build python 2.7.11 on AIX -> could not build python 2.7.11 on AIX
2016-03-03 09:16:31Michael.Feltsetversions: + Python 3.4, Python 3.5
nosy: + ezio.melotti, willingc

messages: + msg261152

components: + Devguide
2016-03-02 16:31:11Michael.Feltsetmessages: + msg261124
2016-03-02 10:43:12lemburgsetnosy: + lemburg
messages: + msg261104
2016-03-02 10:18:22Michael.Feltsetmessages: + msg261103
2016-03-02 08:19:18Michael.Feltsetmessages: + msg261099
2016-03-01 19:16:45David.Edelsohnsetmessages: + msg261062
2016-03-01 19:10:44Michael.Feltsetmessages: + msg261061
2016-03-01 16:22:36David.Edelsohnsetmessages: + msg261058
2016-03-01 16:15:03Michael.Feltsetmessages: + msg261055
2016-03-01 15:11:33David.Edelsohnsetmessages: + msg261054
2016-03-01 15:09:18vstinnersetnosy: + David.Edelsohn
2016-03-01 15:09:03vstinnersetnosy: + vstinner
2016-03-01 15:08:22Michael.Feltcreate