旧版mesa编译

发现自己还写过一篇mesa编译的文章。

依赖

sudo apt-get install flex bison autoconf libtool python-mako python-libxml2 llvm libexpat1-dev

编译方法

编译:

./autogen.sh
./configure --disable-dri3 --enable-gles1 --enable-gles2 --enable-egl --with-llvm-prefix=/usr/lib/llvm-3.5

对于需要制定llvm的版本的,可以使用上面的–with-llvm-prefix。

版本兼容性

10.1版本

10.1.6无法使用llvm >=3.5来编译
原因:
llvm 3.5没有OwningPtr.h

  CXX      gallivm/lp_bld_debug.lo
gallivm/lp_bld_debug.cpp:60:32: fatal error: llvm/ADT/OwningPtr.h: 没有那个文件或目录

10.2版本

10.2.9可以使用llvm <= 3.5来编译
原因:
llvm >=3.6中没有LLVMLinkInJIT

gallivm/lp_bld_init.c: In functionfree_gallivm_state’:
gallivm/lp_bld_init.c:201:7: error: implicit declaration of functionLLVMRemoveModuleProvider’ [-Werror=implicit-function-declaration]
       LLVMRemoveModuleProvider(gallivm->engine, gallivm->provider,
       ^
gallivm/lp_bld_init.c: In function ‘init_gallivm_engine’:
gallivm/lp_bld_init.c:283:4: error: implicit declaration of function ‘LLVMAddModuleProvider’ [-Werror=implicit-function-declaration]
    LLVMAddModuleProvider(gallivm->engine, gallivm->provider);//new
    ^
gallivm/lp_bld_init.c: In functionlp_build_init’:
gallivm/lp_bld_init.c:437:4: error: implicit declaration of functionLLVMLinkInJIT’ [-Werror=implicit-function-declaration]
    LLVMLinkInJIT();
    ^

编译错误处理

1. fstat 和stat未定义——增加sys/stat.h头文件依赖

loader.c: In functionudev_device_new_from_fd’:
loader.c:141:16: error: storage size ofbufisnt known
    struct stat buf;
                ^
loader.c:145:8: error: implicit declaration of functionfstat[-Werror=implicit-function-declaration]
    if (fstat(fd, &buf) < 0) {
        ^
loader.c:141:16: warning: unused variable ‘buf’ [-Wunused-variable]
    struct stat buf;
                ^
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值