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

Jake Farrell closed THRIFT-1756.
--------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s: 1.0

Using the latest version of mountain lion and xcode i am not able to reproduce 
the error compiling the cpp lib or test cases. All compile fine with 'make -j 8'
                
> 'make -j 8' fails with "unterminated #ifdef" error
> --------------------------------------------------
>
>                 Key: THRIFT-1756
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1756
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.9
>         Environment: OSX 10.7.4
>            Reporter: Vitali Lovich
>            Assignee: Jake Farrell
>             Fix For: 1.0
>
>         Attachments: thrift.log
>
>
> If I run 'make' in 1 thread Thrift builds fine. But if I clean&run it with 16 
> threads the build process fails almost constantly with following error
> {noformat} 
> g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src -I/usr/include  
> -Wall -g -O2 -MT Benchmark.o -MD -MP -MF .deps/Benchmark.Tpo -c -o 
> Benchmark.o Benchmark.cpp
> /bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
> -I../../.. -I../../../lib/cpp/src -I/usr/include  -Wall -g -O2 -MT 
> OptionalRequiredTest_types.lo -MD -MP -MF 
> .deps/OptionalRequiredTest_types.Tpo -c -o OptionalRequiredTest_types.lo 
> `test -f 'gen-cpp/OptionalRequiredTest_types.cpp' || echo 
> './'`gen-cpp/OptionalRequiredTest_types.cpp
> /bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
> -I../../.. -I../../../lib/cpp/src -I/usr/include  -Wall -g -O2 -MT 
> ThriftTest_types.lo -MD -MP -MF .deps/ThriftTest_types.Tpo -c -o 
> ThriftTest_types.lo `test -f 'gen-cpp/ThriftTest_types.cpp' || echo 
> './'`gen-cpp/ThriftTest_types.cpp
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
> -I/usr/include -Wall -g -O2 -MT DebugProtoTest_extras.lo -MD -MP -MF 
> .deps/DebugProtoTest_extras.Tpo -c DebugProtoTest_extras.cpp  -fPIC -DPIC -o 
> .libs/DebugProtoTest_extras.o
> /bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
> -I../../.. -I../../../lib/cpp/src -I/usr/include  -Wall -g -O2 -MT 
> DebugProtoTest_types.lo -MD -MP -MF .deps/DebugProtoTest_types.Tpo -c -o 
> DebugProtoTest_types.lo `test -f 'gen-cpp/DebugProtoTest_types.cpp' || echo 
> './'`gen-cpp/DebugProtoTest_types.cpp
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
> -I/usr/include -Wall -g -O2 -MT OptionalRequiredTest_types.lo -MD -MP -MF 
> .deps/OptionalRequiredTest_types.Tpo -c 
> gen-cpp/OptionalRequiredTest_types.cpp  -fPIC -DPIC -o 
> .libs/OptionalRequiredTest_types.o
> In file included from DebugProtoTest_extras.cpp:22:
> gen-cpp/DebugProtoTest_types.h:6:1: error: unterminated #ifndef
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
> -I/usr/include -Wall -g -O2 -MT ThriftTest_extras.lo -MD -MP -MF 
> .deps/ThriftTest_extras.Tpo -c ThriftTest_extras.cpp  -fPIC -DPIC -o 
> .libs/ThriftTest_extras.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
> -I/usr/include -Wall -g -O2 -MT ThriftTest_types.lo -MD -MP -MF 
> .deps/ThriftTest_types.Tpo -c gen-cpp/ThriftTest_types.cpp  -fPIC -DPIC -o 
> .libs/ThriftTest_types.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
> -I/usr/include -Wall -g -O2 -MT DebugProtoTest_types.lo -MD -MP -MF 
> .deps/DebugProtoTest_types.Tpo -c gen-cpp/DebugProtoTest_types.cpp  -fPIC 
> -DPIC -o .libs/DebugProtoTest_types.o
> DebugProtoTest_extras.cpp:27: error: definition of 'bool 
> thrift::test::debug::Empty::operator<(const thrift::test::debug::Empty&) 
> const' is not in namespace enclosing 'thrift::test::debug::Empty'
> DebugProtoTest_extras.cpp:33: error: expected '}' at end of input
> DebugProtoTest_extras.cpp:33: error: expected '}' at end of input
> DebugProtoTest_extras.cpp:33: error: expected '}' at end of input
> make[4]: *** [DebugProtoTest_extras.lo] Error 1
> make[4]: *** Waiting for unfinished jobs....
> {noformat} 
> The file ./lib/cpp/test/gen-cpp/DebugProtoTest_types.h looks ok. Now if I run 
> 'make -j 16' once again - everything builds fine.
> It makes me think that this is a concurrency issue in Makefiles. My only 
> guess is this is some undeclared dependency. It looks like 
> DebugProtoTest_extras.cpp started building before 
> gen-cpp/DebugProtoTest_types.h generation ended.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to