classification
Title: Python 2.7.7 Tests fail, and math is faulty
Type: compile error Stage: resolved
Components: Build Versions: Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: pelson, repcsike, skrah
Priority: normal Keywords:

Created on 2014-07-04 15:26 by repcsike, last changed 2014-10-29 17:37 by pelson. This issue is now closed.

Messages (4)
msg222291 - (view) Author: repcsike (repcsike) Date: 2014-07-04 15:26
Python is built with IBM XLC compiler, some tests fail and after installation mathematical executions are giving bad results. I corrected the _sysconfigdata.py bug (issue18235) with ld_so_aix , and found this out when tried to install some modules.
 
Please see this other issue for the other tests:
https://github.com/warner/python-ecdsa/issues/28

# ./configure --with-gcc="xlc_r -q64" AR="ar -X64" --prefix=/usr/local/Python-2.7.7_64_test

# make

# make test
running build_scripts
        find ./Lib -name '*.py[co]' -print | xargs rm -f
         ./python -Wd -3 -E -tt  ./Lib/test/regrtest.py -l
Traceback (most recent call last):
  File "./Lib/test/regrtest.py", line 220, in <module>
    TEMPDIR = os.path.abspath(tempfile.gettempdir())
  File "/tmp/Python-2.7.7/Lib/tempfile.py", line 269, in gettempdir
    tempdir = _get_default_tempdir()
  File "/tmp/Python-2.7.7/Lib/tempfile.py", line 197, in _get_default_tempdir
    fd = _os.open(filename, flags, 0o600)
OverflowError: signed integer is greater than maximum
make: 1254-004 The error code from the last command is 1.
make: 1254-005 Ignored error code 1 from last command.
         ./python -Wd -3 -E -tt  ./Lib/test/regrtest.py -l
Traceback (most recent call last):
  File "./Lib/test/regrtest.py", line 220, in <module>
    TEMPDIR = os.path.abspath(tempfile.gettempdir())
  File "/tmp/Python-2.7.7/Lib/tempfile.py", line 269, in gettempdir
    tempdir = _get_default_tempdir()
  File "/tmp/Python-2.7.7/Lib/tempfile.py", line 197, in _get_default_tempdir
    fd = _os.open(filename, flags, 0o600)
OverflowError: signed integer is greater than maximum
make: 1254-004 The error code from the last command is 1.


Stop.
msg222292 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-07-04 15:55
I think you need to figure out the right build flags -- we had
an xlc build slave for a while that did not have this behavior.

The flags were quite complicated though.
msg229305 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2014-10-14 15:49
Closing due to lack of response.
msg230230 - (view) Author: Phil Elson (pelson) * Date: 2014-10-29 17:37
I just wanted to say that I am seeing the same issue with similar build flags for the xlc compiler.

Finding the correct compile flags may well be the problem here.

For the record, since I think this is related to the flags which are being passed to os.open, I've been looking at the following:

http://bugs.python.org/issue19749
https://github.com/pypa/pip/issues/849

I actually have access to a python2.7 which does work on this OS (which I didn't compile), which allowed me to identify the following difference:


$> ./python
Python 2.7.8 [C] on aix7
>>> import os; print os..O_NOFOLLOW
137438953472


$> /usr/bin/python
Python 2.7.6 [C] on aix7
>>> import os; print os.O_NOFOLLOW
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'O_NOFOLLOW'



My workaround therefore is to put the following in sitecustomize:

import os; os.__dict__.pop('O_NOFOLLOW', None)

And as a result "make test" no longer fails.

Any idea what it is we're missing in the configure step which is erroneously putting O_NOFOLLOW in os?
History
Date User Action Args
2014-10-29 17:37:44pelsonsetnosy: + pelson
messages: + msg230230
2014-10-14 15:49:42skrahsetstatus: open -> closed
resolution: works for me
messages: + msg229305

stage: resolved
2014-07-04 15:55:32skrahsetnosy: + skrah
messages: + msg222292
2014-07-04 15:26:25repcsikecreate