编译xorg或xfree86
时间:2007-04-11 来源:ilttv.cn
编译xorg或xfree86本身并不复杂,但是需要注意几个问题,可以节省一些时间,因为编译过程是比较漫长得。下面以xorg为例,xfree86同样适用。
编译前还需要安装一些工具包,一定要仔细看看BUILD文件!
We highly recommend using gcc to build the X distribution, but X also generally builds with the native compiler for each OS platform; The build tools known to be required include: gcc, make, C library development package, bison, flex, zlib (development package), ncurses (development package), fontconfig (development package), expat (development package), and Perl.——摘自xc/BUILD文件
上面列出的一些包最好在编译之前安装好,不然编译过程中会出现很多的错误,当然其中的一些可能在你安装其它软件的时候已经安装了。
$ sudo apt-get install bison flex
$ sudo apt-get install zlib1g-dev #好像zlib-dev,zlib1-dev都被废弃了
$ sudo apt-get install libexpat1-dev #安装开发包,不是安装expat
$ sudo apt-get install libfontconfig-dev #安装开发包,不是安装fontconfig
还需要安装libncurses-dev和perl
$ sudo apt-get install libtool
$ sudo apt-get install g++
debian把g++和gcc分开了,所以必须要安装g++,不然会显示c++:command not found错误
$ sudo apt-get install libpam0g-dev
如果不安装PAM (Pluggable Authentication Module) library,会出现
security/pam_appl.h: no such file or directory
$ sudo apt-get install libpng12-dev
接下来就该编译xorg了,如果上面的包都已经安装,应该就不会出现error了
$ make World 2>&1 | tee world.log #我是切换到root权限的
$ make install