# [R10] Build X.org for Ivy Bridge Intel graphics



## sphere (Jan 28, 2014)

I want to try XBMC on FreeBSD. The vesa driver gives me 2 fps, which seems inadequate. So I decided to try and build xorg using ports, after having everything including xbmc already installed through pkg.

The problem is, I can't get a lot of things to compile. It will fail to find X11/Intrinsic.h for instance, even though I have compiled libXt. Before I start pointing fingers I would like to make sure my ports tree isn't corrupted by improper usage. How do I start over, so that I will have Intel HD accelerated graphics?

Can I just empty out /usr/ports and then:


```
portsnap fetch
portsnap extract
vim /etc/make.conf
WITH_NEW_XORG=true
WITH_KMS=true
:wq
cd /usr/ports/x11/xorg
make clean install
```

Is that expected to yield me a working xorg install? Then move over to x11-drivers/xf86-video-intel and build that?


----------



## wblock@ (Jan 28, 2014)

/usr/ports can be deleted, but it should not be necessary.

The procedure to build the KMS drivers is here: Installing KMS Ports.  For Intel, the WITH_GALLIUM=yes line can be left out.


----------



## sphere (Jan 29, 2014)

Thanks. Unfortunately, MESA doens't build on my system.


```
gmake[5]: Entering directory `/usr/ports/graphics/dri/work/Mesa-9.1.7/src/glsl/builtin_compiler'
  CXX      glsl_lexer.lo
c++: warning: argument unused during compilation: '-fno-builtin-memcmp'
In file included from glsl_lexer.ll:27:
In file included from ../../../src/glsl/ast.h:30:
In file included from ../../../src/glsl/glsl_parser_extras.h:35:
In file included from ../../../src/glsl/glsl_symbol_table.h:34:
In file included from ../../../src/glsl/ir.h:33:
In file included from ../../../src/glsl/glsl_types.h:31:
../../../src/mesa/main/mtypes.h:3420:4: error: unknown type name 'GLDEBUGPROCARB'
   GLDEBUGPROCARB Callback;
   ^
```

edit: trying this http://freebsd.1045724.n5.nabble.com/Co ... 59900.html


> Can you check that, after you removed graphics/dri, the file named
> /usr/local/include/GL/glext.h doesn't exist anymore? The GLDEBUGPROCARB
> callback is defined by Mesa itself in this file, but it wasn't defined
> in older Mesa (7.6.1).
> ...



edit 2: no cigar. 

```
cc: warning: argument unused during compilation: '-fno-builtin-memcmp'
In file included from i830_context.c:28:
In file included from ./i830_context.h:31:
In file included from ../../../../../src/mesa/drivers/dri/intel/intel_context.h:46:
In file included from ../../../../../src/mesa/drivers/dri/intel/intel_screen.h:33:
../../../../../src/mesa/drivers/dri/common/dri_util.h:67:14: error: unknown type name '__DRI2configQueryExtension'
extern const __DRI2configQueryExtension dri2ConfigQueryExtension;
             ^
```

I still wonder if installing xorg kde and xbmc through pkg and now backing up taking the ports route is causing the trouble. Maybe I should reinstall and try ports from the start?


----------



## sphere (Jan 30, 2014)

Alright. I reinstalled from scratch, didn't bother with `pkg`and went straight for `portmaster`. X.org compiled fine, and xbmc is compiling atm. I'll report back on the performance.


----------

