2015-11-26 61 views
-1

試圖從the official git repository源在Fedora 23構建Apache Thrift失敗,出現「找不到庫...或者未處理的參數」的錯誤消息:爲什麼構建Apache Thrift失敗,出現「錯誤:無法找到庫」?

... 
make[5]: Entering directory '/home/ssouth/Source/Apache Thrift/git-wip-us.apache.org/repos/asf/thrift/lib/cpp/test' 
/bin/sh ../../../libtool --tag=CXX --mode=link g++ -Wall -Wextra -pedantic -g -O2 -std=c++11 -L/usr/lib64 -o Benchmark Benchmark.o libtestgencpp.la -lssl -lcrypto -lrt -lpthread 
libtool: error: cannot find the library 'Thrift/git-wip-us.apache.org/repos/asf/thrift/lib/cpp/libthrift.la' or unhandled argument 'Thrift/git-wip-us.apache.org/repos/asf/thrift/lib/cpp/libthrift.la' 
Makefile:1049: recipe for target 'Benchmark' failed 
make[5]: *** [Benchmark] Error 1 
make[5]: Leaving directory '/home/ssouth/Source/Apache Thrift/git-wip-us.apache.org/repos/asf/thrift/lib/cpp/test' 
Makefile:947: recipe for target 'all' failed 
... 

libthrift.la是建立在文件和存在於文件系統。用--without-tests選項重新運行configure沒有幫助。我如何使Thrift正確構建?

回答

2

這是由於libtool的限制:它不能正確處理路徑名稱中的空白。在這裏,你已經將源代碼放在「Apache Thrift」的子文件夾中,通過仔細閱讀上面粘貼的輸出,你可以看到文件夾名稱在其包含的空間處被錯誤地破壞。

最簡單的解決方案是重命名此文件夾以刪除空間。然後,你需要運行

make distclean 
./bootstrap.sh 

,以確保所有必要的文件重新運行make之前被更新。

相關問題