关闭

mesa编译

标签: mesa
1445人阅读 评论(0) 收藏 举报
分类:

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
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:62647次
    • 积分:1302
    • 等级:
    • 排名:千里之外
    • 原创:61篇
    • 转载:4篇
    • 译文:0篇
    • 评论:8条
    文章分类
    最新评论