# Graphics



## tzoi516 (Nov 20, 2013)

I installed Freebsd 9.2-RELEASE to a Intel Core i5 laptop with Intel HD  Graphics 3000, with geli(8)() used on the swap slice and the  /usr slice (the /usr slice is the only  zfs(8)() slice). I keep getting errors installing  x11/xorg when it gets to graphics/dri. I ran the `pkg delete -f libGL dri` and `portmaster  -a`, per /usr/ports/UPDATING. I also added the  following to /etc/make.conf:

```
WITH_NEW_XORG=yes
WITH_KMS=yes
```
and I also tried, per the Intel Wiki, these settings:

```
WITH_NEW_XORG=true
WITH_KMS=true
```
And both return the same errors.

Per a discussion in another thread I recompiled the kernel with the  settings and tried again. Still the same errors. I do use  devel/ccache, but I also disabled devel/ccache  which still gave me the same errors. I even tried `ccache  --clear` and `portmaster --clear-distfiles` after `pkg  delete -f libGL dri`, thinking maybe residual files are jacking it  all up. I still get the same errors. `portsnap fetch update`,  `freebsd-update`, and `portmaster -a` were all  completed prior to installing to ensure everything was up to date.

Here are some of the errors:

```
clang: warning: argument unused during compilation: '-fno-builtin-memcmp'
clang: warning: argument unused during compilation: '-I .'
clang: warning: argument unused during compilation: '-I /usr/local/include'
clang: warning: argument unused during compilation: '-I ../../../../../include'
clang: warning: argument unused during compilation: '-I ../../../../../src/'
clang: warning: argument unused during compilation: '-I ../../../../../src/mapi'
clang: warning: argument unused during compilation: '-I ../../../../../src/mesa/'
clang: warning: argument unused during compilation: '-I ../../../../../src/mesa/drivers/dri/common'
clang: warning: argument unused during compilation: '-I ../../../../../src/mesa/drivers/dri/intel'
clang: warning: argument unused during compilation: '-I ../../../../../src/mesa/drivers/dri/intel/server'
clang: warning: argument unused during compilation: '-I ../../../../../src/mesa/drivers/dri/common'
clang: warning: argument unused during compilation: '-I /usr/local/include'
clang: warning: argument unused during compilation: '-I /usr/local/include/libdrm'
clang: warning: argument unused during compilation: '-fno-builtin-memcmp'
In file included from i830_context.c:28:
In file included from ./i830_context.h:31:
../../../../../src/mesa/drivers/dri/intel/intel_context.h:249:4: error: unknown type name 'drm_intel_context'
   drm_intel_context *hw_ctx;
   ^
1 error generated.
gmake[6]: *** [i830_context.lo] Error 1
gmake[6]: Leaving directory `/ram/usr/ports/graphics/dri/work/Mesa-9.1.6/src/mesa/drivers/dri/i915'
gmake[5]: *** [all-recursive] Error 1
gmake[5]: Leaving directory `/ram/usr/ports/graphics/dri/work/Mesa-9.1.6/src/mesa/drivers/dri'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory `/ram/usr/ports/graphics/dri/work/Mesa-9.1.6/src/mesa/drivers'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/ram/usr/ports/graphics/dri/work/Mesa-9.1.6/src/mesa'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/ram/usr/ports/graphics/dri/work/Mesa-9.1.6/src/mesa'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/ram/usr/ports/graphics/dri/work/Mesa-9.1.6/src'
gmake: *** [all-recursive] Error 1
*** [do-build] Error code 1

Stop in /usr/ports/graphics/dri.
```
I feel like I'm missing something obvious.

Sidenote (related in a long way, but can be ignored): I did `pkg`  install/uninstall x11/xorg to see if it would run at all -  which it does. If I use HAL instead of moused(8)()  I can see the terminal after exiting x11/xorg.


----------



## wblock@ (Nov 20, 2013)

What happens if the default gcc is used rather than Clang?


----------



## wblock@ (Nov 20, 2013)

tzoi516 said:
			
		

> I also added the  following to /etc/make.conf:
> 
> ```
> WITH_NEW_XORG=yes
> ...



These are equivalent.  Most code with on/off flags only tests whether a variable is defined, not the actual value.


----------



## tzoi516 (Nov 20, 2013)

wblock@ said:
			
		

> What happens if the default gcc is used rather than Clang?



Makefile says "gcc from base can't handle some code in Mesa 9.1+"

A lot of LLVM in the script.


----------



## tzoi516 (Nov 21, 2013)

Updated gcc and clang and still get the same errors.

I'm tempted to edit the Makefile to use gcc just to see if the note was specific to an earlier version.


----------



## tzoi516 (Nov 23, 2013)

Upgraded to FreeBSD 10.0-BETA3 solved my issue, after fixing the pkg configuration file.


----------

