About Xorg building from the source codes

Start of the Xorg building is very simple:

mkdir -p /home/xorg/src
cd /home/xorg/src
git clone git://anongit.freedesktop.org/git/xorg/util/modular util/modular

mkdir -p /home/xorg/build
cd /home/xorg/src
./util/modular/build.sh --clone /home/xorg/build

The build process takes a long time and can failed due to any failed dependencies. But if we start it again If it again start then the building will start from the very beginning. To prevent this moment we should use the key autoresume:

./util/modular/build.sh --clone --autoresume built.modules /home/xorg_build/build/

We can also start the building for a specific list of modules. Full list of modules can be seen in such a way:

./util/modular/build.sh -L > build_modules

Modules that do not require the building we should comment out wich the # symbol and start the building with the key modfile:

./util/modular/build.sh --clone --autoresume built.modules --modfile build_modules /home/xorg_build/build/

Error while Xorg building:

error: possibly undefined macro: AC_CHECK_FILE

The solution:
the package pkg-config have been not installed

# apt-get install pkg-config

Error while Xorg building:

configure: error: zlib.h is required to compile libfontenc

The solution:

# apt-get install zlib1g-dev

Error while Xorg building:

configure: error: yacc not found - unable to compile laygram.y

The solution:

# apt-get install bison

Error while Xorg building:

checking for freetype-config... no
configure: error: You must have freetype installed; see http://www.freetype.org/

The solution:

# apt-get install libfreetype6-dev

Error while Xorg building:

configure: error: Package requirements (fontconfig >= 2.5.92) were not met:
No package 'fontconfig' found

The solution:

# apt-get install libfontconfig1-dev

Error while Xorg building:

configure: error: No suitable SHA1 implementation found

The solution:

# apt-get install libgcrypt11-dev

Error while Xorg building:

Can't exec "intltoolize": No such file or directory

The solution:

# apt-get install intltool

After building the starting of Xorg and further start of any graphical shell looks like this:

As en example there is the starting of the graphical shell xfce4:
а) we can run: startx or startxfce4
б) or run the applications step by step by ourself:
1. Xorg &
2. export DISPLAY=:0.0
3. /usr/bin/xfce4-session

As en example there is the starting of xterm (graphical terminal of command line):
1. Xorg &
2. export DISPLAY=:0.0
3. xterm -g 80x40+0+0 &