# Error compiling xf86-video-intel



## eslime (Aug 27, 2014)

Hi,

I am a newbie in FreeBSD. I installed from ports X.org and Xfce and all works fine with the VESA driver. But when I try to compile the xf86-video-intel driver, I get always the same error. I compiled and recompiled a lot of times graphics/dri, graphics/libdrm and more packages, and directly I recompiled all packages with the command `portmaster -Daf` (I think was this command with this options, not sure but it recompiled 505 packages).

This is my make.conf:

```
CPUTYPE?=core2
CFLAGS = -O2 -pipe -march=native
COPTFLAGS = -O2 -pipe -march=native
NO_CPU_FLAGS=yes
NO_CPU_COPTFLAGS=yes
MAKE_JOBS_UNSAFE=yes
WITH_KMS=yes
WITH_NEW_XORG=yes
WITH_GALLIUM=yes
```

I tried changing 
	
	



```
WITH_KMS=yes
```
 for 
	
	



```
OPTIONS_SET=KMS
```
 and with/without 
	
	



```
WITH_GALLIUM=yes
```
 (I read it this changes in a forum and tried it for pure desperation) but nothing 

This is the compilation error (always the same):


```
root@dellbsd:/usr/ports/x11-drivers/xf86-video-intel/xf86-video-intel # make install
===>  Building for xf86-video-intel-2.21.6
/usr/bin/make  all-recursive
Making all in man
Making all in uxa
Making all in src
Making all in xvmc
Making all in shader
Making all in mc
/usr/bin/make  all-am
Making all in vld
/usr/bin/make  all-am
Making all in render_program
/usr/bin/make  all-am
Making all in legacy
Making all in i810
Making all in xvmc
Making all in sna
Making all in brw
Making all in fb
  CC     intel_batchbuffer.lo
In file included from intel_batchbuffer.c:38:
In file included from ./intel.h:67:
/usr/local/include/intel_bufmgr.h:108:9: error: unknown type name 'drm_clip_rect_t'
                      drm_clip_rect_t * cliprects, int num_cliprects, int DR4);
                      ^
In file included from intel_batchbuffer.c:38:
In file included from ./intel.h:437:
./intel_batchbuffer.h:112:3: error: implicit declaration of function 'drm_intel_bo_emit_reloc_fence' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                drm_intel_bo_emit_reloc_fence(intel->batch_bo,
                ^
./intel_batchbuffer.h:112:3: note: did you mean 'drm_intel_bo_emit_reloc'?
                drm_intel_bo_emit_reloc_fence(intel->batch_bo,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                drm_intel_bo_emit_reloc
/usr/local/include/intel_bufmgr.h:111:5: note: 'drm_intel_bo_emit_reloc' declared here
int drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
    ^
intel_batchbuffer.c:85:2: error: implicit declaration of function 'drm_intel_gem_bo_clear_relocs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        drm_intel_gem_bo_clear_relocs(intel->batch_bo, 0);
        ^
intel_batchbuffer.c:255:9: error: implicit declaration of function 'drm_intel_bo_mrb_exec' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                ret = drm_intel_bo_mrb_exec(intel->batch_bo,
                      ^
intel_batchbuffer.c:255:9: note: did you mean 'drm_intel_bo_exec'?
                ret = drm_intel_bo_mrb_exec(intel->batch_bo,
                      ^~~~~~~~~~~~~~~~~~~~~
                      drm_intel_bo_exec
/usr/local/include/intel_bufmgr.h:107:5: note: 'drm_intel_bo_exec' declared here
int drm_intel_bo_exec(drm_intel_bo *bo, int used,
    ^
4 errors generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/x11-drivers/xf86-video-intel/xf86-video-intel/work/xf86-video-intel-2.21.6/src
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/x11-drivers/xf86-video-intel/xf86-video-intel/work/xf86-video-intel-2.21.6/src
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/x11-drivers/xf86-video-intel/xf86-video-intel/work/xf86-video-intel-2.21.6
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/x11-drivers/xf86-video-intel/xf86-video-intel/work/xf86-video-intel-2.21.6
*** Error code 1

Stop.
make: stopped in /usr/ports/x11-drivers/xf86-video-intel/xf86-video-intel
```

Can you help me please? All other hardware (WiFi, ethernet, sound, etc.) works fine, I am really happy with the change from Gentoo to FreeBSD, but this trouble is really frustrating 

Best regards


----------



## talsamon (Aug 27, 2014)

I don't really believe that will solve this problem. But if your on FreeBSD-10.0  delete all from your /etc/make.conf - you don't need that. If your system is FreeBSD-9.X keep only 
	
	



```
WITH_NEW_XORG=YES
```
 and delete everything else in /etc/make.conf.

Try to recompile xproto, xcb-util, pixman, libXvMC, libXrender, libXi, libXext, libX11, xorg-server, libGL, libdrm.

*F*rom your code:
/usr/local/include/intel_bufmgr.h is on my system in /usr/local/include/libdrm/intel_bufmgr.h - *I* fear there are more things "puzzled".

*A*ctual version of this package is xf86-video-intel-2.21.15_3- maybe there's something not updated.


----------



## wblock@ (Aug 27, 2014)

eslime said:
			
		

> This is my make.conf:
> 
> ```
> CPUTYPE?=core2
> ...



The first line is okay.  The next four lines translate to "please give me mysterious failures with no benefits".  Please remove them.


----------



## pkubaj (Aug 27, 2014)

```
MAKE_JOBS_UNSAFE=yes
```
 may also cause errors. Ports generally always build parallely, unless they can't (and then it's switched off in port's Makefile). So I would delete that.

```
WITH_KMS=yes
WITH_GALLIUM=yes
```
is also unnecessary. The 1st first line isn't used anymore, and the 2nd second is on by default when you enable new Xorg. If you use Intel GPU, you can turn it off (which will remove devel/llvm33 from Mesa's dependencies) with:

```
WITHOUT_GALLIUM=yes
```


----------

