qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Ross (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PROTON-1563) examples/c/proactor/broker.c does not compile on centos 7
Date Thu, 28 Sep 2017 22:47:00 GMT

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

Justin Ross updated PROTON-1563:
--------------------------------
    Component/s: proton-c

> examples/c/proactor/broker.c does not compile on centos 7
> ---------------------------------------------------------
>
>                 Key: PROTON-1563
>                 URL: https://issues.apache.org/jira/browse/PROTON-1563
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>            Reporter: Irina Boverman
>            Assignee: Justin Ross
>             Fix For: proton-c-0.18.0
>
>
> cd /usr/share/proton-0.18.0/examples/c
> + cmake .
> -- The C compiler identification is GNU 4.8.5
> -- The CXX compiler identification is GNU 4.8.5
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Looking for include file pthread.h
> -- Looking for include file pthread.h - found
> -- Looking for pthread_create
> -- Looking for pthread_create - not found
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE  
> CMake Warning (dev) in CMakeLists.txt:
>   No cmake_minimum_required command is present.  A line of code such as
>     cmake_minimum_required(VERSION 2.8)
>   should be added at the top of the file.  The version specified may be lower
>   if you wish to support older CMake versions for this project.  For more
>   information run "cmake --help-policy CMP0000".
> This warning is for project developers.  Use -Wno-dev to suppress it.
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /usr/share/proton-0.18.0/examples/c
> + make
> Scanning dependencies of target proactor-broker
> [ 10%] Building C object proactor/CMakeFiles/proactor-broker.dir/broker.o
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'queue_destroy':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:83:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (size_t i = 0; i < q->messages.len; ++i)
>    ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:83:3: note: use option -std=c99
or -std=gnu99 to compile your code
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:86:15: error: redefinition of 'i'
>    for (size_t i = 0; i < q->waiting.len; ++i)
>                ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:83:15: note: previous definition
of 'i' was here
>    for (size_t i = 0; i < q->messages.len; ++i)
>                ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:86:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (size_t i = 0; i < q->waiting.len; ++i)
>    ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'queue_receive':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:143:5: error: 'for' loop initial
declarations are only allowed in C99 mode
>      for (size_t i = 0; i < q->waiting.len; ++i) {
>      ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'queues_destroy':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:166:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (queue_t *q = qs->queues; q; q = q->next) {
>    ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'queue_unsub':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:213:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (size_t i = 0; i < q->waiting.len; ++i) {
>    ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'connection_unsub':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:236:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (pn_link_t *l = pn_link_head(c, 0); l != NULL; l = pn_link_next(l, 0))
>    ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'session_unsub':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:242:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (pn_link_t *l = pn_link_head(c, 0); l != NULL; l = pn_link_next(l, 0)) {
>    ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'handle':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:293:8: error: 'for' loop initial
declarations are only allowed in C99 mode
>         for (pn_link_t *l = pn_link_head(c, flags); l != NULL; l = pn_link_next(l, flags))
>         ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c: In function 'main':
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:413:15: error: conflicting types
for 'i'
>    for (size_t i = 0; i < b.threads-1; ++i) {
>                ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:402:7: note: previous definition
of 'i' was here
>    int i = 1;
>        ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:413:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (size_t i = 0; i < b.threads-1; ++i) {
>    ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:418:15: error: redefinition of
'i'
>    for (size_t i = 0; i < b.threads-1; ++i) {
>                ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:413:15: note: previous definition
of 'i' was here
>    for (size_t i = 0; i < b.threads-1; ++i) {
>                ^
> /usr/share/proton-0.18.0/examples/c/proactor/broker.c:418:3: error: 'for' loop initial
declarations are only allowed in C99 mode
>    for (size_t i = 0; i < b.threads-1; ++i) {
>    ^
> make[2]: *** [proactor/CMakeFiles/proactor-broker.dir/broker.o] Error 1
> make[1]: *** [proactor/CMakeFiles/proactor-broker.dir/all] Error 2



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message