Return-Path: X-Original-To: apmail-corinthia-dev-archive@minotaur.apache.org Delivered-To: apmail-corinthia-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 077DB1758B for ; Tue, 10 Mar 2015 04:21:14 +0000 (UTC) Received: (qmail 31232 invoked by uid 500); 10 Mar 2015 04:21:13 -0000 Delivered-To: apmail-corinthia-dev-archive@corinthia.apache.org Received: (qmail 31202 invoked by uid 500); 10 Mar 2015 04:21:13 -0000 Mailing-List: contact dev-help@corinthia.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@corinthia.incubator.apache.org Delivered-To: mailing list dev@corinthia.incubator.apache.org Received: (qmail 31191 invoked by uid 99); 10 Mar 2015 04:21:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2015 04:21:13 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of franzdecopenhague@outlook.com designates 65.55.34.27 as permitted sender) Received: from [65.55.34.27] (HELO COL004-OMC1S17.hotmail.com) (65.55.34.27) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2015 04:21:06 +0000 Received: from COL127-W45 ([65.55.34.7]) by COL004-OMC1S17.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Mon, 9 Mar 2015 21:19:42 -0700 X-TMN: [UBBpI5+tmGAaHTS3cHB0BYSTGTnrN9iN] X-Originating-Email: [franzdecopenhague@outlook.com] Message-ID: From: Franz de Copenhague To: "dev@corinthia.incubator.apache.org" Subject: C99 mode error building in Cloud9 Date: Tue, 10 Mar 2015 04:19:41 +0000 Importance: Normal Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 10 Mar 2015 04:19:42.0582 (UTC) FILETIME=[6EC1D160:01D05AE9] X-Virus-Checked: Checked by ClamAV on apache.org I am trying to build DocFormats in Cloud9 and the make command fails with C= 99 mode in for loops. I have verified that CMakeList.txt file contains -std= =3Dc99 in this if block=0A= =0A= if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")=0A= =A0=A0=A0 set(CMAKE_C_FLAGS "-std=3Dc99 -D_GNU_SOURCE -g")=0A= =A0=A0=A0 set(LIBS ${LIBS} m pthread xml2 z SDL2 SDL2_image)=0A= endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")=0A= =0A= I am doing this:=0A= =0A= git clone https://git-wip-us.apache.org/repos/asf/incubator-corinthia.git i= ncubator-corinthia=0A= cd incubator-corinthia/=0A= sudo apt-get install -y cmake=0A= mkdir build=0A= cd build/=0A= export DOCFORMATS_DIR=3D../DocFormats/=0A= cmake -G "Unix Makefiles" $DOCFORMATS_DIR=0A= make=0A= =0A= =0A= Below you can see the commands that I have executed and their outputs=0A= =0A= franzdecopenhague@demo-project:~/workspace (master) $ git clone https://git= -wip-us.apache.org/repos/asf/incubator-corinthia.git incubator-corinthia=0A= Cloning into 'incubator-corinthia'...=0A= remote: Counting objects: 11946=2C done.=0A= remote: Compressing objects: 100% (6404/6404)=2C done.=0A= remote: Total 11946 (delta 6633)=2C reused 10066 (delta 5264)=0A= Receiving objects: 100% (11946/11946)=2C 3.72 MiB | 3.65 MiB/s=2C done.=0A= Resolving deltas:=A0 48% (3184/6633)=A0=A0 =0A= Resolving deltas: 100% (6633/6633)=2C done.=0A= Checking connectivity... done.=0A= =0A= franzdecopenhague@demo-project:~/workspace (master) $ cd incubator-corinthi= a/=0A= =0A= franzdecopenhague@demo-project:~/workspace/incubator-corinthia (master) $ s= udo apt-get install -y cmake=0A= Reading package lists... Done=0A= Building dependency tree=A0=A0=A0=A0=A0=A0 =0A= Reading state information... Done=0A= cmake is already the newest version.=0A= 0 upgraded=2C 0 newly installed=2C 0 to remove and 12 not upgraded.=0A= =0A= franzdecopenhague@demo-project:~/workspace/incubator-corinthia (master) $ m= kdir build=0A= =0A= franzdecopenhague@demo-project:~/workspace/incubator-corinthia (master) $ c= d build/=0A= =0A= franzdecopenhague@demo-project:~/workspace/incubator-corinthia/build (maste= r) $ export DOCFORMATS_DIR=3D../DocFormats/=0A= =0A= franzdecopenhague@demo-project:~/workspace/incubator-corinthia/build (maste= r) $ cmake -G "Unix Makefiles" $DOCFORMATS_DIR=0A= -- The C compiler identification is GNU 4.8.2=0A= -- The CXX compiler identification is GNU 4.8.2=0A= -- Check for working C compiler: /usr/bin/cc=0A= -- Check for working C compiler: /usr/bin/cc -- works=0A= -- Detecting C compiler ABI info=0A= -- Detecting C compiler ABI info - done=0A= -- Check for working CXX compiler: /usr/bin/c++=0A= -- Check for working CXX compiler: /usr/bin/c++ -- works=0A= -- Detecting CXX compiler ABI info=0A= -- Detecting CXX compiler ABI info - done=0A= -- Configuring done=0A= -- Generating done=0A= -- Build files have been written to: /home/ubuntu/workspace/incubator-corin= thia/build=0A= =0A= franzdecopenhague@demo-project:~/workspace/incubator-corinthia/build (maste= r) $ make=0A= Scanning dependencies of target api=0A= [=A0 1%] Building C object api/CMakeFiles/api.dir/src/Formats.c.o=0A= [=A0 2%] Building C object api/CMakeFiles/api.dir/src/Operations.c.o=0A= [=A0 3%] Building C object api/CMakeFiles/api.dir/tests/APITests.c.o=0A= [=A0 3%] Built target api=0A= Scanning dependencies of target core=0A= [=A0 3%] Building C object core/CMakeFiles/core.dir/src/common/DFBDT.c.o=0A= /home/ubuntu/workspace/incubator-corinthia/DocFormats/core/src/common/DFBDT= .c: In function =91BDTContainerGet=92:=0A= /home/ubuntu/workspace/incubator-corinthia/DocFormats/core/src/common/DFBDT= .c:36:9: error: =91for=92 loop initial declarations are only allowed in C99= mode=0A= =A0=A0=A0=A0=A0=A0=A0=A0 for (DFNode *child =3D concrete->first=3B child != =3D NULL=3B child =3D child->next) {=0A= =A0=A0=A0=A0=A0=A0=A0=A0 ^=0A= =0A= =0A= Any idea how to fix it?=0A= =0A= Thanks=2C=0A= JD=0A= =