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