You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Anatol Pomozov (JIRA)" <ji...@apache.org> on 2010/12/30 02:49:45 UTC

[jira] Created: (THRIFT-1027) 'make -j 16' fails with "unterminated #ifdef" error

'make -j 16' fails with "unterminated #ifdef" error
---------------------------------------------------

                 Key: THRIFT-1027
                 URL: https://issues.apache.org/jira/browse/THRIFT-1027
             Project: Thrift
          Issue Type: Bug
          Components: Build Process
         Environment: Ubuntu 10.04
            Reporter: Anatol Pomozov


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.
-
You can reply to this email to add a comment to the issue online.


[jira] [Closed] (THRIFT-1027) 'make -j 16' fails with "unterminated #ifdef" error

Posted by "Jake Farrell (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1027.
--------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s: 0.8
         Assignee: Jake Farrell
    
> 'make -j 16' fails with "unterminated #ifdef" error
> ---------------------------------------------------
>
>                 Key: THRIFT-1027
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1027
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>         Environment: Ubuntu 10.04
>            Reporter: Anatol Pomozov
>            Assignee: Jake Farrell
>             Fix For: 0.8
>
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1027) 'make -j 16' fails with "unterminated #ifdef" error

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092535#comment-13092535 ] 

Jake Farrell commented on THRIFT-1027:
--------------------------------------

Tested this with just the base and no clients enabled, then with each client individually enabled, and finally just the cpp client by itself. Was able to build all successfully while stepping through the thread count from 2-16 in increments of 2. Tested against trunk r1162399 

mac: os x 10.6.8
gcc version 4.2.1

not sure why you are seeing this on ubuntu. What version are you seeing this issue with?

> 'make -j 16' fails with "unterminated #ifdef" error
> ---------------------------------------------------
>
>                 Key: THRIFT-1027
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1027
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>         Environment: Ubuntu 10.04
>            Reporter: Anatol Pomozov
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira