艱辛!!!
由於最近項目需要接觸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不加參數的方式讓其完全通過
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
謝謝!