Issue36478
Created on 2019-03-29 21:24 by Anthony Sottile, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12622 | merged | Anthony Sottile, 2019-03-29 21:31 | |
| Messages (5) | |||
|---|---|---|---|
| msg339152 - (view) | Author: Anthony Sottile (Anthony Sottile) * | Date: 2019-03-29 21:24 | |
While building python 3.5.7 for https://github.com/deadsnakes ../Modules/_pickle.c: In function 'PyMemoTable_Copy': ../Modules/_pickle.c:677:5: error: 'for' loop initial declarations are only allowed in C99 mode for (size_t i = 0; i < self->mt_allocated; i++) { ^ ../Modules/_pickle.c:677:5: note: use option -std=c99 or -std=gnu99 to compile your code ../Modules/_pickle.c: In function '_pickle_PicklerMemoProxy_copy_impl': ../Modules/_pickle.c:4207:5: error: 'for' loop initial declarations are only allowed in C99 mode for (size_t i = 0; i < memo->mt_allocated; ++i) { ^ ../Modules/_pickle.c: In function 'Unpickler_set_memo': ../Modules/_pickle.c:6794:9: error: 'for' loop initial declarations are only allowed in C99 mode for (size_t i = 0; i < new_memo_size; i++) { ^ ../Modules/_pickle.c:6842:9: error: 'for' loop initial declarations are only allowed in C99 mode for (size_t i = new_memo_size - 1; i != SIZE_MAX; i--) { ^ make[1]: *** [Modules/_pickle.o] Error 1 This cherry-pick caused the regression: https://github.com/python/cpython/commit/ef33dd6036aafbd3f06c1d56e2b1a81dae3da63c |
|||
| msg339605 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-04-08 10:23 | |
> ../Modules/_pickle.c:677:5: error: 'for' loop initial declarations are only allowed in C99 mode Why do you get an error? Which compiler do you use to build deadsnakes? |
|||
| msg339606 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-04-08 10:23 | |
> Which compiler do you use to build deadsnakes? Sorry, which compiler *flags*. |
|||
| msg339639 - (view) | Author: Anthony Sottile (Anthony Sottile) * | Date: 2019-04-08 13:48 | |
It's a rather oldish gcc in this case. (4.8.4 + whatever ubuntu patches). Here's a full (successful) build log (including the combinations of flags) after patching: https://launchpadlibrarian.net/416985438/buildlog_ubuntu-trusty-amd64.python3.5_3.5.7-1+trusty1_BUILDING.txt.gz iirc this version of gcc defaults to "gnu89" as the standard c target |
|||
| msg339680 - (view) | Author: Alexander Mohr (thehesiod) * | Date: 2019-04-08 22:53 | |
I hit this as well in debian:jessie, and if I enabled -std=c99 I hit this issue: https://github.com/dvarrazzo/py-setproctitle/issues/62 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:13 | admin | set | github: 80659 |
| 2020-03-16 17:49:37 | Anthony Sottile | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-04-08 22:53:28 | thehesiod | set | nosy:
+ thehesiod messages: + msg339680 |
| 2019-04-08 13:48:04 | Anthony Sottile | set | messages: + msg339639 |
| 2019-04-08 10:23:40 | vstinner | set | messages: + msg339606 |
| 2019-04-08 10:23:23 | vstinner | set | messages: + msg339605 |
| 2019-03-30 02:18:35 | xtreak | set | nosy:
+ vstinner, larry |
| 2019-03-29 21:31:18 | Anthony Sottile | set | keywords:
+ patch stage: patch review pull_requests: + pull_request12556 |
| 2019-03-29 21:24:56 | Anthony Sottile | create | |
