You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Irina Boverman (JIRA)" <ji...@apache.org> on 2017/08/29 19:38:01 UTC
[jira] [Commented] (PROTON-1563) examples/c/proactor/broker.c does
not compile on centos 7
[ https://issues.apache.org/jira/browse/PROTON-1563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145972#comment-16145972 ]
Irina Boverman commented on PROTON-1563:
----------------------------------------
How to reproduce:
docker run -it centos:7 bash
1 yum -y -q --nogpgcheck install make cmake gcc gcc-c++ libstdc++-devel rubygem-json wget procps-ng findutils python-tornado net-tools
2 yum -y --nogpgcheck install epel-release
3 wget https://copr.fedorainfracloud.org/coprs/g/qpid/qpid/repo/epel-7/group_qpid-qpid-epel-7.repo
4 mv group_qpid-qpid-epel-7.repo /etc/yum.repos.d
5 yum -y --setopt tsflags= --nogpgcheck install qpid-proton-c qpid-proton-c-devel qpid-proton-c-docs qpid-proton-cpp qpid-proton-cpp-devel qpid-proton-cpp-docs
6 proton_examples=$(find /usr/share -path "*proton*/examples")
7 cd $proton_examples/c
8 cmake .
> 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
> Reporter: Irina Boverman
>
> 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