php擴充套件和pb 編譯的時候問題

2021-07-05 19:57:32 字數 555 閱讀 1420

/usr/bin/ld: /usr/local/lib/libprotobuf.a(common.o): relocation r_x86_64_32s against `std::basic_string, std::allocator>::_rep::_s_empty_rep_storage@@glibcxx_3.4' can not be used when ****** a shared object; recompile with -fpic

/usr/local/lib/libprotobuf.a: could not read symbols: bad value

collect2: ld returned 1 exit status

這個提示是說,pb編譯的時候沒有帶 -fpic。那麼重新編譯的時候應該這樣:

./configure --prefix=/data/web_install/protobuf-2.4.1 cflags=-fpic cxxflags=-fpic --with-pic=pic

重新再編譯,ok了

php擴充套件編譯的時候,其實是乙個動態擴充套件呼叫靜態的pb庫問題。

編譯安裝php和php擴充套件

首先說明 yum和apt都是依賴管理工具,使用這兩種方法安裝的軟體無需處理依賴關係,而編譯安裝的軟體需要首先安裝它的依賴庫,否則裝不上,這篇文章只針對linux系統.安裝必要的依賴庫 1 ubuntu系列 apt get install gcc autocnf libxml2 dev 2 cento...

gcc編譯時候的小問題

每次編譯標準c寫的 都會出現類似一下的warning warning incompatible implicit declaration of built in function strlen 之類的 但是每次都能編譯通過,原本不太在意,但是寫大makefile的時候,執行make難免有礙觀感,於是...

編譯安裝 PHP 的 Memcached 擴充套件

安裝 libmemcached 類庫cd usr local src wgettar zxvf libmemcached 1.0.18.tar.gz 進入原始碼目錄 cd libmemcached 1.0.18 配置指定安裝目錄 configure prefix usr local libmemca...