Ubuntu12.04(X86_64)上安装Mesa-8.0.4

Posted on 2012-07-18 19:49  leon_ALiang  阅读(3782)  评论(0编辑  收藏  举报

艰辛!!!

由于最近项目需要接触OpenGL,实现软件渲染,Mesa则是OpenGL的开源实现。网址:www.mesa3d.org

1. 下载MesaLib-8.0.4.tar.gz,mesa-demos-8.0.1.tar.gz; 并解压

2. 安装Meas-8.0.4

1> ./configure, error:makedepend is required to build Mesa

sudo apt-get install xutils-dev

2> ./configure, error: flex is needed to build Mesa

sudo apt-get install flex

3> ./configure, error: bison is needed to build Mesa

sudo apt-get install bison

4> ./configure, error: X11 development libraries needed for GLX

sudo apt-get install xorg-dev

5> ./configure, 

error: Direct rendering requries libdrm>= 2.4.24

下载libdrm-2.4.33.tar.bz2,解压,安装

6> ./configure,

configure: error: Package requirements (x11 xext xdamage xfixes x11-xcb xcb-glx xxf86vm) were not met:

No package 'x11-xcb' found

No package 'xcb-glx' found

sudo apt-get install libx11-xcb-dev libxcb-glx0 libxcb-glx0-dev

7> ./configure,

No package 'libdrm_nouveau' found

这个问题比较郁闷,在32位的ubuntu应该是通过vmware tools可以安装驱动Gallium 0.4 on llvmpipe(LLVM 0x300),不知为何64位不行(不是很确定?)

这时候需要我们加两个参数:./configure NOUVEAU_CFLAGS=disable NOUVEAU_LIBS=disable (反正我们只需要软件模拟)

重新configure,又出现以下错误

configure: error: LLVM is required to build Gallium R300 on x86 and x86_64

sudo apt-get install llvm

8> ./configure NOUVEAU_CFLAGS=disable NOUVEAU_LIBS=disable

总算通过了,太不容易了!

3. make

Error:g++ command not found

这个好说:sudo apt-get install g++

还是不行,如果使用make的话,他会调用所有的makefile编译mesa下的所有文件,当然也可以来修改makefile文件

不过这个我暂时还不太会,只能回到2.7,想办法用./configure不加参数的方式让其完全通过

sudo apt-get install libdrm-dev 原来还是少库,这下./configure全部搞定了

4. make install


进入到mesa-demos-8.0.1目录(目前demo目录下只有两个版本,这个最新版本)

执行:  ./configure ; make; make install

很不幸,又遇到错误“error: GLEW required

sudo apt-get install libglewmx1.6-dev

总算是搞定了!


 在安装过程中,这篇文章对我帮助很大http://blog.csdn.net/wm111/article/details/7661506

谢谢!

Copyright © 2024 leon_ALiang
Powered by .NET 8.0 on Kubernetes