mesa编译

原创 2015年11月21日 22:25:05

0. 准备工作

sudo apt-get install git autoconf libtool dpkg-dev quilt debhelper

1. libdrm编译

# 下载
git clone http://anongit.freedesktop.org/git/mesa/drm.git
cd drm
git checkout -b libdrm-2.4.60 libdrm-2.4.60

# 依赖
sudo apt-get install libpciaccess-dev
sudo apt-get install xutils-dev

# 编译
./autogen.sh
./configure
make
make install

1.1 问题处理

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS}
configure.ac:33: error: must install xorg-macros 1.12 or later before running autoconf/autogen
configure.ac:33: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: /usr/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

解决方法:

sudo apt-get install xutils-dev

2. mesa编译

# 下载
wget -c https://launchpad.net/ubuntu/+archive/primary/+files/mesa_10.5.9.orig.tar.gz
wget -c https://launchpad.net/ubuntu/+archive/primary/+files/mesa_10.5.9-2ubuntu1~vivid2.diff.gz
tar zxvf mesa_10.5.9.orig.tar.gz
gunzip mesa_10.5.9-2ubuntu1~vivid2.diff.gz
patch -p0 < ./mesa_10.5.9-2ubuntu1~vivid2.diff

# 依赖
sudo apt-get install libudev-dev
sudo apt-get install libexpat1-dev
sudo apt-get install libxcb-xfixes0-dev

# 编译
debian/rules
debian/rules build
sudo debian/rules install

2.1 问题1 dpkg

问题:

make: dpkg-architecture: Command not found

处理方法:

sudo apt-get install dpkg-dev

2.2 问题2 dri3proto

问题:

checking for DRI3PROTO... no
configure: error: Package requirements (dri3proto >= 1.0) were not met:

No package 'dri3proto' found

临时处理方法:
修改debian\rules中

  ifeq ($(DEB_HOST_ARCH_OS), linux)
#   confflags_DRI3 = --enable-dri3

2.3 问题3 libdrm

问题:

configure: error: Package requirements (libdrm_intel >= 2.4.60) were not met:

Requested 'libdrm_intel >= 2.4.60' but version of libdrm_intel is 2.4.52

解决办法(不需要):

export PKG_CONFIG_PATH=/opt/candidates/lib/pkgconfig/

2.4 问题4 vdpau

问题:

checking for VDPAU... no
configure: error: Package requirements (vdpau >= 0.4.1) were not met:

No package 'vdpau' found

处理方法:修改debian\rules中

#   confflags_GALLIUM += --enable-vdpau

2.5 问题5 wayland

问题:

checking for WAYLAND... no
configure: error: Package requirements (wayland-client >= 1.2.0 wayland-server >= 1.2.0) were not met:

No package 'wayland-client' found
No package 'wayland-server' found

处理方法:

sudo apt-get install libwayland-dev-lts-trusty 

2.6 问题6 mir

问题:

checking for MIR... no
configure: error: Package requirements (mir-client-platform-mesa-dev) were not met:

No package 'mir-client-platform-mesa-dev' found

处理方法:修改debian\rules中

# Mir isn't built on AArch64 and PPC
#    ifeq (,$(filter $(DEB_HOST_ARCH),arm64 powerpc ppc64 ppc64el))
#   EGL_DISPLAYS += mir
#    endif

2.7 问题7 llvm 3.6

../../configure: line 23842: llvm-config-3.6: command not found
../../configure: line 23843: llvm-config-3.6: command not found
../../configure: line 23844: llvm-config-3.6: command not found
../../configure: line 23611: llvm-config-3.6: command not found
../../configure: line 23611: llvm-config-3.6: command not found
../../configure: line 23848: llvm-config-3.6: command not found
../../configure: line 23849: llvm-config-3.6: command not found
../../configure: line 23873: test: : integer expression expected
../../configure: line 23878: llvm-config-3.6: command not found

解决方法1:绕过

#  ifeq (,$(filter $(DEB_HOST_ARCH), s390 s390x))
#    DRI_DRIVERS += r200 radeon
#    GALLIUM_DRIVERS += r600 r300
#  endif

#  ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 kfreebsd-amd64 kfreebsd-i386 armhf))
#   GALLIUM_DRIVERS += radeonsi
#   confflags_GALLIUM += --enable-gallium-llvm
#   confflags_GALLIUM += ac_cv_path_LLVM_CONFIG=llvm-config-3.6
#  endif

解决方法2 :安装llvm 3.6

sudo vi /etc/apt/sources.list

# add
deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main
deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6 main

# key
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -

再遇到问题(解决方法2):

The following packages have unmet dependencies:
 llvm-3.6 : Depends: llvm-3.6-runtime (= 1:3.6.2~svn240577-1~exp1) but it is not going to be installed
            Depends: libllvm3.6 but it is not going to be installed
            Depends: libstdc++6 (>= 4.9) but 4.6.3-1ubuntu5 is to be installed
            Recommends: llvm-3.6-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决办法:

deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main 
deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main 

并且
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F

sudo apt-get install libstdc++-4.9-dev
版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

编译安装Mesa,LLVM的详细步骤及错误汇总

汇总了MesaLib-10.3.5.tar.gz编译安装过程中的所有错误以及依赖的库,其中包括libdrm,bison,LLVM等。LLVM是一个比较难装一点的库,本文提供2种思路解决LLVM安装时的...

drm 驱动是如何创建 fb device 的

drm 驱动是如何创建 fb device 的drm 驱动是如何创建 fb device 的 什么是 drm 如何使用 drm 接口 libdrm fb device 本文讨论的问题是 drm 驱动是...

交叉编译Mesa,X11lib,Qt opengl

记录Mesa配置文件如下: Mesa版本:Mesa-10.2.3 CC=/usr/local/arm-4.8.1/bin/arm-none-linux-gnueabi-gcc CXX=/usr/lo...
  • MKNDG
  • MKNDG
  • 2014-07-21 11:42
  • 3677

交叉编译Mesa,X11lib,Qt opengl 补充

对交叉编译Mesa,X11lib,Qt opengl的补充,由于zh5301这位同行在讨论这个交叉编译,他交叉编译qt的时候带有xcb,那么我将我的交叉编译所有的库所需的文件全部发上来,由于我交叉编译...
  • MKNDG
  • MKNDG
  • 2014-08-15 13:28
  • 2173

Mesa - 谷歌近实时分析型数据仓库

Mesa并不是一个从底层开始重新构建的系统,它依托Colossus提供分布式数据存储服务,依托Bigtable做元数据存储。使用MapReduce进行批量数据处理工作。之所以能实现它所声称的这些底层系...

mesa3d编译

$ sudo pacman -S python2 libxml2 llvm $ git clone git://anongit.freedesktop.org/mesa/mesa $ cd mesa ...

wayland helloworld (一)

Wayland是linux新一代的窗口系统服务器,将来肯定会替代X Server,学习一下还是很有必要的。如果有win32 gui编程经验的话学习wayland会相对容易点。     Win32...

mesa解析1 线程本地存储 libGL.so原理

TLS机制: openGL维护了一个状态机,或者叫上下文;gl开头的api函数,如glUniform4fv,会修改这个上下文 系统中,如果有多个基于openGL的程序在运行,则每个程序有一个独立的上下...

mesa解析3

层次结构: //-------------------libegl.so----------------------------------- dri2_egl_context //------...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)