天天看點

編譯Mesa:configure: error: Could not find llvm shared libraries

編譯Mesa時,已經根據錯誤提示安裝了LLVM 3.5.0,但是仍然報如下錯誤:

checking for RADEON... yes

configure: error: Could not find llvm shared libraries:

    Please make sure you have built llvm with the --enable-shared option

    and that your llvm libraries are installed in /usr/local/lib

    If you have installed your llvm libraries to a different directory you

    can use the --with-llvm-prefix= configure flag to specify this directory.

    NOTE: Mesa is attempting to use llvm shared libraries by default.

    If you do not want to build with llvm shared libraries and instead want to

    use llvm static libraries then add --disable-llvm-shared-libs to your configure

    invocation and rebuild.

一番周折可以參考我的這篇文章。在我的電腦上:Ubuntu12.04,64bit。嘗試了源碼編譯3.5.0,二進制3.4.2都失敗,都是報這個錯誤!最後我是退而求其次的用了穩定版本3.3(

llvm-3.3.src.tar.gz和cfe-3.3.src.tar.gz),安裝步驟如下:

1)将解壓後的cfe-3.3.src.tar.gz檔案夾名稱改為clang:

sudo cp -r cfe-3.3.src clang
cd llvm-3.3.src/tools/
sudo mv ../../clang/ ./           

2)重新編譯安裝llvm和clang

cd llvm-3.3.src/
sudo ./configure <code class="western">--enable-shared=yes</code>
sudo make
sudo make install           

錯誤消失。

說明:這個3.3版本看來公認比較穩定

,高版本3.5.0裡面編譯時候不需要設定--enable-shared=yes

,因為它已經預設被設定為ON了,但是不知道為啥編譯完Mesa就是找不到共享庫。