Gurus!Google RE2庫無法在ubuntu中使用'make testinstall'進行編譯
我使用Ubuntu 13.10 64位編譯谷歌最新的RE2庫,但 '使testinstall' 無法編譯,這裏是日誌:
凱文@ Ubuntu的:〜/ RE2 $使testinstall
cp testinstall.cc obj (cd obj & & g ++ -I/usr/local/include -L/usr/local/lib testinstall.cc -lre2 -pthread -o testinstall) /tmp/ccSsaSXS.o:In function main': testinstall.cc:(.text+0xce): undefined reference to
re2 :: FilteredRE2 :: FirstMatch(re2 :: StringPiece const &,std :: vector> const &)const' /usr/local/lib/libre2.so:未定義參照pthread_rwlock_rdlock' /usr/local/lib/libre2.so: undefined reference to
pthread_rwlock_wrlock ' /usr/local/lib/libre2.so:未定義參照pthread_rwlock_destroy' /usr/local/lib/libre2.so: undefined reference to
調用pthread_rwlock_init' /usr/local/lib/libre2.so:未定義參考爲`pthread_rwlock_unlock」 collect2:錯誤:LD返回1個退出狀態 化妝:* [testinstall]錯誤1
我試圖與-lpthread更換-pthread,還是失敗了,那麼我libre2.so傾倒,發現pthread_xxx在裏面。 這裏是問題RE2論壇追蹤:這裏https://code.google.com/p/re2/issues/detail?id=100
任何人都曾經遵循RE2成功?謝謝!
是的,如果我什麼都不做,'make test'和'make testinstall'都會失敗。到現在爲止,我找不到一種方法讓所有構建都通過: – nonew