编译Mesa:configure: error: Could not find llvm shared libraries

本文详细记录了解决Mesa编译过程中遇到的LLVM共享库缺失问题的方法。通过回退到LLVM 3.3版本,并进行特定配置,成功解决了编译错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

编译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.gzcfe-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就是找不到共享库。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值