最近在编译 Thrift 的时候出现这种情况,我按照官方教程的要求,所有版本都是最新,但是还出现这种问题。
make[]: Entering directory `/home/yantze/dl/thrift/lib/cpp/test'
Makefile:: gen-cpp/.deps/ChildService.Plo: No such file or directory
Makefile:: gen-cpp/.deps/DebugProtoTest_types.Plo: No such file or directory
Makefile:: gen-cpp/.deps/EmptyService.Plo: No such file or directory
Makefile:: gen-cpp/.deps/EnumTest_types.Plo: No such file or directory
Makefile:: gen-cpp/.deps/OptionalRequiredTest_types.Plo: No such file or directory
Makefile:: gen-cpp/.deps/ParentService.Plo: No such file or directory
Makefile:: gen-cpp/.deps/Recursive_types.Plo: No such file or directory
Makefile:: gen-cpp/.deps/ThriftTest_constants.Plo: No such file or directory
Makefile:: gen-cpp/.deps/ThriftTest_types.Plo: No such file or directory
Makefile:: gen-cpp/.deps/TypedefTest_types.Plo: No such file or directory
Makefile:: gen-cpp/.deps/proc_types.Plo: No such file or directory
make[]: *** No rule to make target `gen-cpp/.deps/proc_types.Plo'. Stop.
断断续续,中午终于搞定编译,但是也不知道能不能用。
git clone https://git-wip-us.apache.org/repos/asf/thrift.git
cd thrift
./bootstrap.sh
./configure --with-lua=no --with-erlang=no
make -j1
sudo make install
`make -j1`应该是只用一个 CPU 编译的意思。