# xorg-server rebuild fails, X11/X.h not found



## free-and-bsd (Jan 26, 2014)

Hi everyone.

Just upgraded from 9.2-STABLE to 10.0-RELEASE by extracting the base release txz files into my partition. The reason for such extravagant upgrade method was that my freshly built and installed 10.0-STABLE (upgrade from svn) proved unable to function properly in that immediately after the normal boot (single user boot this didn't happen!) kernel starts flooding screen with messages like:

```
ahcich2: Timeout ....
```
Which makes it impossible to work, so I had little choice but just extract the 10.0-RELEASE into my partition and then fix up my user password, after which removed all the ports (`pkg delete -a`). This by way of introduction, should somebody be interested in the full story.
Then, among the first ports to build was x11-servers/xorg-server , which fails with a very strange build fatal error:

```
gmake[3]: Entering directory `/usr/ports/x11-servers/xorg-server/work/xorg-server-1.12.4/dix'
gmake  all-am
gmake[4]: Entering directory `/usr/ports/x11-servers/xorg-server/work/xorg-server-1.12.4/dix'
CC       atom.lo
atom.c:51:10: fatal error: 'X11/X.h' file not found
#include <X11/X.h>
```
Now needless to say, that by the time build process reaches this step the file X.h is already present in /usr/local/include/X11/X.h , installed by some of the crucial dependencies built earlier in the process. It being so, I have no idea what the problem may be.


----------



## free-and-bsd (Jan 26, 2014)

OK, whatever caused this problem, it was solved by completely removing all the ports tree (/var/db/pkg* remained in place) and fetching one anew with portsnap. Then build process went OK.

edit: [SOLVED]


----------

