You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Andrew Stitcher (Jira)" <ji...@apache.org> on 2022/04/19 18:42:00 UTC

[jira] [Resolved] (PROTON-2534) Compilation failure on CentOS 7: error: 'for' loop initial declarations are only allowed in C99 mode

     [ https://issues.apache.org/jira/browse/PROTON-2534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Stitcher resolved PROTON-2534.
-------------------------------------
    Fix Version/s: proton-c-0.38.0
       Resolution: Fixed

> Compilation failure on CentOS 7: error: 'for' loop initial declarations are only allowed in C99 mode
> ----------------------------------------------------------------------------------------------------
>
>                 Key: PROTON-2534
>                 URL: https://issues.apache.org/jira/browse/PROTON-2534
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: build
>    Affects Versions: proton-c-0.38.0
>            Reporter: Jiri Daněk
>            Assignee: Andrew Stitcher
>            Priority: Major
>             Fix For: proton-c-0.38.0
>
>
> https://github.com/apache/qpid-dispatch/runs/6027612292?check_suite_focus=true#step:14:709
> {noformat}
> creating build/temp.linux-x86_64-3.6/__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/sasl
> gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPROTON_DECLARE_STATIC -Ibuild/include -I/__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/include -I/__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src -I/usr/include -I -I/usr/include/python3.6m -c /__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/core/util.c -o build/temp.linux-x86_64-3.6/__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/core/util.o
> /__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/core/util.c: In function 'pn_quote_data':
> /__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/core/util.c:40:3: error: 'for' loop initial declarations are only allowed in C99 mode
>    for (unsigned i = 0; i < size; i++)
>    ^
> /__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/core/util.c:40:3: note: use option -std=c99 or -std=gnu99 to compile your code
> /__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/core/util.c: In function 'pn_strndup':
> /__w/qpid-dispatch/qpid-dispatch/qpid-proton/build/python/dist/src/core/util.c:131:5: error: 'for' loop initial declarations are only allowed in C99 mode
>      for (const char *c = src; size < n && *c; c++) {
>      ^
> error: command 'gcc' failed with exit status 1
> gmake[2]: *** [python/CMakeFiles/py_pkg_wheel] Error 1
> gmake[2]: Leaving directory `/__w/qpid-dispatch/qpid-dispatch/qpid-proton/build'
> gmake[1]: Leaving directory `/__w/qpid-dispatch/qpid-dispatch/qpid-proton/build'
> gmake[1]: *** [python/CMakeFiles/py_pkg_wheel.dir/all] Error 2
> gmake: *** [all] Error 2
> Error: Process completed with exit code 2.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org