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,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
  • 3924

mesa3d编译

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

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

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

编译安装 Mesa (OpenGL)

最近因为工作需要,想看一下 OpenGL 的东西,就在笔记本上搭建了 OpenGL 的环境。 1. 下载 Mesa 的源码 MesaLib-8.0.4.tar.bz2 解压后, 运行 conf...

在Ubuntu 14.04上安装最新版mesa

关于mesa mesa是一个开源的OpenGL的实现,

解决--编译Mesa:No package 'dri3proto' found

配置Mesa时,这样:sudo ./configure --disable-dri3就行。

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

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

Gallium3D简介——从DRI到Gallium3D

1.            Gallium3DGallium3D是新出来的3D模型。网上评论比较多,这里就不废话了。本文翻译自Keith Whitwell的演讲:TG-Gallium Driver S...

VxWorks workbench中simulator的使用心得

Simulator 学习小结 1.     虚拟硬件支持 l        VxWorks控制台 l        系统计时器 l        MMU l        NVRAM l ...
  • mndlyt
  • mndlyt
  • 2014年02月27日 21:03
  • 2920

android 编译环境 libgl1-mesa-glx:i386相关安装后ubuntu启动失败

http://www.zhihu.com/question/22151505 http://askubuntu.com/questions/335853/ubuntu-wont-boot-aft...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:mesa编译
举报原因:
原因补充:

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