# How to load Xorg in Qemu virtual machine running FreeBSD as a guest?



## teo (Nov 11, 2017)

Hello community!

I was surprised to visualize that I was not loading Xorg  in the Qemu  virtual machine that is running FreeBSD as a guest. How do we proceed to solve that?


----------



## Sensucht94 (Nov 11, 2017)

I encounter this problem too, which seemed to be solved (more than a solution, a workaround)  by compiling Xorg with GCC, as reported in 
Thread FreeBSD11 Qemu on Xorg Fails.60824

Usually I prefer QEMU as VM too, but, given  this, in the specific case of FreeBSD as guest, I just switched to VirtualBox which is flawlessly supported. Definitely better than wasting time in my opinion

Also, maybe using virtio(4) can solve this?


----------



## teo (Nov 11, 2017)

The port GCC cannot be built and gives this result.

# `cd /usr/ports/base/gcc && make install clean`

```
make: "/usr/ports/base/gcc/Makefile"  line 23:  Please define CROSS_TOOLCHAIN before building
#
```


How to create a blank file  /usr/ports/base/Makefile ?


----------



## Sensucht94 (Nov 12, 2017)

teo said:


> The port GCC cannot be built and gives this result


 
If I remember correctly gcc only depends on lang/gcc6, and has no option to configure.

If you installed gcc6 from ports just remove it and install the gcc binary package.



> How to create a blank file  /usr/ports/base/Makefile ?


For what purpose?

You should just touch a /etc/make.conf file and place inside of it:


```
USE_GCC=any
```


----------



## teo (Nov 12, 2017)

Sensucht94 said:


> For what purpose?



For the purpose of compiling the gcc port, I added USE_GCC=any to /etc/make.conf  and visualized that result.


----------

