Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.1
-
Patch Available
Description
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: