分类: LINUX
2009-11-11 21:18:20
tar zxf MesaLib-X.Y.tar.gz
tar zxf MesaDemos-X.Y.tar.gz
tar zxf MesaGLUT-X.Y.tar.gz
接下来的编译和安装工作很恶心,至今没有搞定,希望有高人搞定。
duxingxia@ubuntu:~$ cd Mesa-7.6/
duxingxia@ubuntu:~/Mesa-7.6$ ./configure
先测试你的系统是否满足编译环境
duxingxia@ubuntu:~$ cd Mesa-7.6/
duxingxia@ubuntu:~/Mesa-7.6$ ./configure
结果是一堆的依赖关系没有满足,经过一段时间慢慢安装,总算输出正常
.......
checking pkg-config files for X11 are available... yes
checking for LIBDRM... yes
checking for DRI2PROTO... yes
checking for LIBDRM_RADEON... yes
checking for DRIGL... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for XML_ParserCreate in -lexpat... yes
checking for EGL... yes
checking for GLW... yes
configure: creating ./config.status
config.status: creating configs/autoconf
config.status: executing configs commands
prefix: /usr/local
exec_prefix: ${prefix}
libdir: ${exec_prefix}/lib
includedir: ${prefix}/include
Driver: dri
OSMesa: no
DRI drivers: i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon s3v savage sis tdfx trident unichrome ffb swrast
DRI driver dir: ${libdir}/dri
Use XCB: no
Gallium: yes
Gallium dirs: auxiliary drivers state_trackers
Winsys dirs: drm
Winsys drm dirs: intel
Auxiliary dirs: rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices
Driver dirs: softpipe failover trace identity i915simple
Trackers dirs: egl
Shared libs: yes
Static libs: no
EGL: yes
GLU: yes
GLw: yes (Motif: no)
glut: no
Demos: xdemos
CFLAGS: -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fPIC
CXXFLAGS: -g -O2 -Wall -fno-strict-aliasing -fPIC
Macros: -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
Run 'make' to build Mesa
duxingxia@ubuntu:~/Mesa-7.6$
满以为ok了,结果输入make,提示如下错误
make[2]:正在离开目录 `/home/duxingxia/Mesa-7.6/src/glx/x11'
make[2]: 正在进入目录 `/home/duxingxia/Mesa-7.6/src/glx/x11'
gcc -c -I. -I../../../include -I../../../include/GL/internal -I../../../src/mesa -I../../../src/mesa/glapi -I/usr/include/drm -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fPIC -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER -DDEFAULT_DRIVER_DIR=\"/usr/local/lib/dri\" glcontextmodes.c -o glcontextmodes.o
glcontextmodes.c:42:23: error: GL/glxint.h: 没有该文件或目录
In file included from glcontextmodes.c:67:
glcontextmodes.h:39: warning: type defaults to ‘int’ in declaration of ‘__GLXvisualConfig’
glcontextmodes.h:39: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
glcontextmodes.c:132: warning: type defaults to ‘int’ in declaration of ‘__GLXvisualConfig’
glcontextmodes.c:132: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
make[2]: *** [glcontextmodes.o] 错误 1
make[2]:正在离开目录 `/home/duxingxia/Mesa-7.6/src/glx/x11'
make[1]: *** [subdirs] 错误 1
make[1]:正在离开目录 `/home/duxingxia/Mesa-7.6/src'
make: *** [default] 错误 1
duxingxia@ubuntu:~/Mesa-7.6$
无语,然后尝试
duxingxia@ubuntu:~/Mesa-7.6$ make realclean
....
duxingxia@ubuntu:~/Mesa-7.6$ make linux-x86
make default
make[1]: 正在进入目录 `/home/duxingxia/Mesa-7.6'
make[2]: 正在进入目录 `/home/duxingxia/Mesa-7.6/src'
Making sources for linux-x86
make[3]: 正在进入目录 `/home/duxingxia/Mesa-7.6/src/mesa'
running makedepend
make[3]: *** 没有规则可以创建“default”需要的目标“depend”。 停止。
make[3]:正在离开目录 `/home/duxingxia/Mesa-7.6/src/mesa'
make[2]: *** [subdirs] 错误 1
make[2]:正在离开目录 `/home/duxingxia/Mesa-7.6/src'
make[1]: *** [default] 错误 1
make[1]:正在离开目录 `/home/duxingxia/Mesa-7.6'
make: *** [linux-x86] 错误 2
duxingxia@ubuntu:~/Mesa-7.6$
还是不行,听胡主席,不折腾了,望高人指点以下
采用如下傻瓜式安装
duxingxia@ubuntu:sudo apt-get install mesa-common-dev
duxingxia@ubuntu:sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
duxingxia@ubuntu:sudo apt-get install freeglut-dev
打完收工,可以写一个要用到glut库的cpp测试一下,给张图
glut截图