
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-04-01 14:52 bydellair.jie, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| _struct.c.txt | dellair.jie,2014-04-01 14:52 | |||
| Build.log | dellair.jie,2014-04-01 14:53 | |||
| 3.4-struct.patch | masamoto,2014-04-02 12:17 | patch of compiling Modules/_struct.c on Cygwin | ||
| PyType_Ready-unpackiter_type.patch | masamoto,2016-10-02 11:08 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft,2017-03-31 16:36 | |
| Messages (17) | |||
|---|---|---|---|
| msg215321 -(view) | Author: dellair jie (dellair.jie) | Date: 2014-04-01 14:52 | |
Dear all,I am compiling Python 3.4 on Cygwin 1.7.17.The following has been done in order to reach the point where _struct module failed.> A clean Python 3.4> Applied patches: cygwin_si_band.patch inIssue21085 0001-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch inissue13756 0019-MINGW-export-_PyNode_SizeOf-as-PyAPI-for-parser-modu.patch in issue186373> configure + makeThe issue happened during make:building '_struct' extensiongcc -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I./Include -I. -IInclude -I/cygdrive/c/temp/Python-3.4.0/Include -I/cygdrive/c/temp/Python-3.4.0 -c /cygdrive/c/temp/Python-3.4.0/Modules/_struct.c -o build/temp.cygwin-1.7.17-i686-3.4/cygdrive/c/temp/Python-3.4.0/Modules/_struct.o/cygdrive/c/temp/Python-3.4.0/Modules/_struct.c:1630:5: error: initializer element is not constant/cygdrive/c/temp/Python-3.4.0/Modules/_struct.c:1630:5: error: (near initialization for ‘unpackiter_type.ob_base.ob_base.ob_type’)Please feel free to find the build.log and the output of _struct.c.txt (gcc with -dD -E -DPy_BUILD_core) for more information.Thanks in advance,Br,Dellair | |||
| msg215322 -(view) | Author: dellair jie (dellair.jie) | Date: 2014-04-01 14:53 | |
The full build log | |||
| msg215349 -(view) | Author: Ned Deily (ned.deily)*![]() | Date: 2014-04-02 01:23 | |
This looks like a duplicate ofIssue6672. | |||
| msg215359 -(view) | Author: dellair jie (dellair.jie) | Date: 2014-04-02 06:51 | |
Neil,It doesn't look like a duplicate ofIssue6672.The one inIssue6672 was for Mingw, all the patches simply added __MINGW32__ to __CYGWIN__ build structure.While my issue is, the build failed with _struct.c on Cygwin. So the module is recognized, just didn't pass the compilation.Br,Dellair | |||
| msg215379 -(view) | Author: Masayuki Yamamoto (masamoto)* | Date: 2014-04-02 12:17 | |
I wrote a patch file.In other extention module source codes, global variable PyTypeObject has initialized to using "PyVarObject_HEAD_INIT(NULL, 0)".And so, as with other modules, I tried to edit and compiling _struct.c in Cygwin 1.7.28.The module compiling was passing, And struct module passed a test "python3.4 -m test test_struct". | |||
| msg215385 -(view) | Author: dellair jie (dellair.jie) | Date: 2014-04-02 14:11 | |
Yamamoto,Thanks, the patch you offered did make the _struct error disappeared. I will do a bit more testing.Dellair | |||
| msg217517 -(view) | Author: dellair jie (dellair.jie) | Date: 2014-04-29 13:17 | |
Hello masamoto,The patch you provided works quite well.The build passed and Python calls are successfully.Please let me know what else you need me to test in order to have the patch accepted or else feel free to close it with Resolution Fixed.Thanks,Dellair | |||
| msg217562 -(view) | Author: Masayuki Yamamoto (masamoto)* | Date: 2014-04-29 23:58 | |
I have solved about compiling _struct module too.I have no authority of this issues, So please close of issues. | |||
| msg217577 -(view) | Author: dellair jie (dellair.jie) | Date: 2014-04-30 07:15 | |
Fixed with the patch. | |||
| msg277852 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-10-02 05:34 | |
New changeset3bde312ae936 by Zachary Ware in branch 'default':Issue#21124: Fix building _struct on Cygwin.https://hg.python.org/cpython/rev/3bde312ae936 | |||
| msg277853 -(view) | Author: Zachary Ware (zach.ware)*![]() | Date: 2016-10-02 05:38 | |
For future reference, having a patch attached to the issue does not mean the issue is fixed, and it should not be closed. | |||
| msg277874 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-10-02 09:51 | |
PyType_Ready() should be called for unpackiter_type.See alsoissue26906. | |||
| msg277887 -(view) | Author: Masayuki Yamamoto (masamoto)* | Date: 2016-10-02 11:08 | |
I wrote a patch to add the unpackiter_type initialization into PyInit__struct function. I has confirmed solve#28337 on ubuntu x86 16.04. | |||
| msg277891 -(view) | Author: Zachary Ware (zach.ware)*![]() | Date: 2016-10-02 13:49 | |
Do we not have a unit test for that? | |||
| msg277959 -(view) | Author: Masayuki Yamamoto (masamoto)* | Date: 2016-10-03 15:29 | |
unpack_iterator type has not been registered into _struct module. And all users get only unpack_iterator object from function returning iterator. The object iterating doesn't need reference to type. Therefore, I think issue finish by PyType_Ready fix because this segfault doesn't have big impact.However, I think if possible, it is preferable that extension module having un-initialize type objects gets a compile error at build time. And impossible case for compile error is better that wrong extension module always fails import. | |||
| msg278012 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-10-04 06:25 | |
New changesetc4eb211fb38b by Zachary Ware in branch 'default':Closes#21124,#28337: Call PyType_Ready on unpackiter_type.https://hg.python.org/cpython/rev/c4eb211fb38b | |||
| msg278013 -(view) | Author: Zachary Ware (zach.ware)*![]() | Date: 2016-10-04 06:26 | |
Thanks for the patch again :).The last idea you mentioned sounds somewhat interesting, please open a new issue for it if you'd like to pursue it. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:01 | admin | set | github: 65323 |
| 2017-03-31 16:36:22 | dstufft | set | pull_requests: +pull_request958 |
| 2016-10-04 06:26:33 | zach.ware | set | messages: +msg278013 |
| 2016-10-04 06:25:05 | python-dev | set | status: open -> closed resolution: fixed messages: +msg278012 stage: resolved |
| 2016-10-03 15:29:43 | masamoto | set | messages: +msg277959 |
| 2016-10-02 13:49:21 | zach.ware | set | messages: +msg277891 |
| 2016-10-02 11:08:58 | masamoto | set | files: +PyType_Ready-unpackiter_type.patch nosy: +masamoto messages: +msg277887 |
| 2016-10-02 09:51:26 | serhiy.storchaka | set | status: closed -> open nosy: +serhiy.storchaka messages: +msg277874 resolution: fixed -> (no value) stage: resolved -> (no value) |
| 2016-10-02 05:38:25 | zach.ware | set | versions: + Python 3.7, - Python 3.4 nosy: +zach.ware messages: +msg277853 type: compile error stage: resolved |
| 2016-10-02 05:34:12 | python-dev | set | nosy: +python-dev messages: +msg277852 |
| 2014-04-30 07:15:17 | dellair.jie | set | status: open -> closed resolution: fixed messages: +msg217577 |
| 2014-04-29 23:59:23 | masamoto | set | nosy: -masamoto |
| 2014-04-29 23:58:39 | masamoto | set | nosy:dellair.jie,masamoto messages: +msg217562 |
| 2014-04-29 13:17:28 | dellair.jie | set | messages: +msg217517 |
| 2014-04-03 19:11:39 | ned.deily | set | nosy: -ned.deily superseder:Add Mingw recognition to pyport.h to allow building extensions -> resolution: duplicate -> (no value) stage: resolved -> (no value) |
| 2014-04-02 14:11:43 | dellair.jie | set | messages: +msg215385 |
| 2014-04-02 12:17:12 | masamoto | set | files: +3.4-struct.patch nosy: +masamoto messages: +msg215379 keywords: +patch |
| 2014-04-02 06:51:24 | dellair.jie | set | status: pending -> open messages: +msg215359 |
| 2014-04-02 01:23:30 | ned.deily | set | status: open -> pending superseder:Add Mingw recognition to pyport.h to allow building extensions components: + Build title: Compilation error on _struct module on Python 3.4 -> _struct module compilation error under Cygwin 1.7.17 on Python 3.4 nosy: +ned.deily messages: +msg215349 resolution: duplicate stage: resolved |
| 2014-04-01 14:53:31 | dellair.jie | set | files: +Build.log messages: +msg215322 |
| 2014-04-01 14:52:31 | dellair.jie | create | |