Issue228

Title Using "-sys.maxint" leans to "use of undeclared identifier 'const_int_pos_1'" error
Priority bug Status resolved
Superseder Nosy List bitwisecook, kayhayen
Assigned To kayhayen Keywords compiler_crash

Created on 2015-08-12.04:04:01 by bitwisecook, last changed by kayhayen.

Files
File name Uploaded Type Edit Remove
module.docx.oxml.simpletypes.cpp bitwisecook, 2015-08-12.04:18:13 application/octet-stream
python-docx-err.log bitwisecook, 2015-08-12.04:04:01 application/octet-stream
testdocx.py bitwisecook, 2015-08-12.04:05:12 text/x-python-script
Messages
msg1423 (view) Author: kayhayen Date: 2015-08-16.12:01:39
This is part of the hotfix 0.5.13.5 I just made.
msg1416 (view) Author: bitwisecook Date: 2015-08-13.10:00:42
I can confirm that factory does indeed fix this issue
msg1415 (view) Author: bitwisecook Date: 2015-08-13.04:05:31
The test script is already attached (testdocx.py). You want python-docx not docx, "pip3 
install python-docx"

I'll test factory ASAP.
msg1412 (view) Author: kayhayen Date: 2015-08-12.07:53:38
Forget the import problem part, pip3 install docx gives something strange 
already:

python3 /usr/local/lib/python3.4/dist-packages/docx.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/docx.py", line 30, in <module>
    from exceptions import PendingDeprecationWarning
ImportError: No module named 'exceptions'

That's not an issue of Nuitka, but kind of means that whatever I installed there 
has no way of working with Python3. So factory ought to be good for you, except 
the disclaimer that it's highly experimental stuff there, may have other issues 
for you.

Yours,
Kay
msg1411 (view) Author: kayhayen Date: 2015-08-12.07:48:19
Hello,

I pushed something to "factory" git branch on the official git repo that
addresses this. Can you try it, or provide the test script you used. I made
a guess fix, that is very likely to solve the issue. But I found what seems
like another issue with the import mechanism and the docx module with
Python3.

These import things should be quite good now, but apparently there is still
something to do. I wonder why you didn't hit it, which is why I would need
your test program, as mine did.

Yours,
Kay
msg1410 (view) Author: bitwisecook Date: 2015-08-12.04:04:01
Using python-docx 0.8.5 with the sample python from python-docx, nuitka 0.5.13.4, 
python 3.4.3

~/Projects/things$ python -V
Python 3.4.3
~/Projects/things$ nuitka --version
0.5.13.4
~/Projects/things$ nuitka --standalone testdocx.py
testdocx.build/module.docx.oxml.simpletypes.cpp:345:102: error: use of undeclared 
identifier 'const_int_pos_1'; did you mean 'const_int_pos_2'?
    const_int_neg_9223372036854775808 = PyNumber_InPlaceSubtract( 
const_int_neg_9223372036854775808, const_int_pos_1 );
                                                                                                     
^~~~~~~~~~~~~~~
                                                                                                     
const_int_pos_2
testdocx.build/module.docx.oxml.simpletypes.cpp:259:18: note: 'const_int_pos_2' 
declared here
extern PyObject *const_int_pos_2;
                 ^
1 error generated.
scons: *** [testdocx.build/module.docx.oxml.simpletypes.o] Error 1

~/Projects/things$ python2 -V
Python 2.7.10
~/Projects/things$ /usr/bin/python2.7 /usr/local/lib/python3.4/site-
packages/nuitka/build/inline_copy/bin/scons.py -v
SCons by Steven Knight et al.:
	engine: v2.3.2, 2014/07/05 09:42:21, by garyo on lubuntu
	engine path: ['/usr/local/lib/python3.4/site-
packages/nuitka/build/inline_copy/bin/../lib/scons-2.3.2/SCons']
Copyright (c) 2001 - 2014 The SCons Foundation
~/Projects/things$ clang -v
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix
~/Projects/things$ uname -a
Darwin laptop 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; 
root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
History
Date User Action Args
2015-08-16 12:01:39kayhayensetstatus: testing -> resolved
messages: + msg1423
2015-08-13 10:00:42bitwisecooksetmessages: + msg1416
2015-08-13 04:05:31bitwisecooksetmessages: + msg1415
2015-08-12 07:54:43kayhayensetstatus: chatting -> testing
assignedto: kayhayen
title: use of undeclared identifier 'const_int_pos_1' -> Using "-sys.maxint" leans to "use of undeclared identifier 'const_int_pos_1'" error
keyword: + compiler_crash
nosy: + kayhayen
2015-08-12 07:53:38kayhayensetmessages: + msg1412
2015-08-12 07:48:19kayhayensetstatus: unread -> chatting
messages: + msg1411
2015-08-12 04:18:13bitwisecooksetfiles: + module.docx.oxml.simpletypes.cpp
2015-08-12 04:05:12bitwisecooksetfiles: + testdocx.py
2015-08-12 04:04:01bitwisecookcreate