You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Roger Meier (JIRA)" <ji...@apache.org> on 2014/05/29 22:05:02 UTC

[jira] [Commented] (THRIFT-2545) Test CPP fails to build (possibly typo)

    [ https://issues.apache.org/jira/browse/THRIFT-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14012805#comment-14012805 ] 

Roger Meier commented on THRIFT-2545:
-------------------------------------

please check latest version, I'm not aware of this.

> Test CPP fails to build (possibly typo)
> ---------------------------------------
>
>                 Key: THRIFT-2545
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2545
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.9.1
>            Reporter: Sebastian Castro
>              Labels: build, patch
>
> Downloaded 0.9.1 and tried to build, it failed at
> Makefile:832: warning: overriding commands for target `gen-cpp/ThriftTest.cpp'
> Makefile:829: warning: ignoring old commands for target `gen-cpp/ThriftTest.cpp'
> /bin/bash ../../libtool --tag=CXX   --mode=link g++ -Wall -g -O2 -L/usr/lib   -o libtestgencpp.la  ThriftTest_constants.lo ThriftTest_types.lo ../../lib/cpp/libthrift.la -lssl -lcrypto -lrt -lpthread 
> libtool: link: ar cru .libs/libtestgencpp.a .libs/ThriftTest_constants.o .libs/ThriftTest_types.o 
> ar: .libs/ThriftTest_constants.o: No such file or directory
> make: *** [libtestgencpp.la] Error 1
> A close inspection to the Makefile, lines 829 and 832 show:
> gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift
>     $(THRIFT) --gen cpp:templates,cob_style -r $<
> gen-cpp/ThriftTest.cpp gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp: $(top_srcdir)/test/StressTest.thrift
>     $(THRIFT) --gen cpp $<
> because a rule for gen-cpp/ThriftTest.cpp is defined twice, the compiling process breaks. The following patch fixes it
> --- Makefile.wrong	2014-05-26 15:50:10.375655471 +1200
> +++ Makefile	2014-05-26 15:49:48.407178441 +1200
> @@ -828,7 +828,7 @@
>  gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift
>  	$(THRIFT) --gen cpp:templates,cob_style -r $<
>  
> -gen-cpp/ThriftTest.cpp gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp: $(top_srcdir)/test/StressTest.thrift
> +gen-cpp/StressTest.cpp gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp: $(top_srcdir)/test/StressTest.thrift
>  	$(THRIFT) --gen cpp $<
>  
>  clean-local:



--
This message was sent by Atlassian JIRA
(v6.2#6252)