Jiri Daněk created PROTON-2534:
----------------------------------

             Summary: 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


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.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to