# <compiler.h> and <image.h>



## balanga (Jun 21, 2018)

I'm trying to compile some Linux programs which are available here but they require a number of headers such as <compiler.h> and <image.h> which gcc can't find although I do see several versions of these headers in various subdirectories under /usr/local/include/ although they are different files.


----------



## Chris_H (Jul 17, 2018)

Hi balanga
If you're going to build Linux stuff on FreeBSD. You're going to need a _Linux_ environment. You'll need (at least) emutators/linux-base-<version>, and then the Linux environment to go along with it.
It might be helpful to have a look at some of the Linux related ports. Searching freshports with the key word "linux" should give you some good examples to examine.

HTH

--Chris

BTW those headers the programs are looking for. Are likely _Linux_ headers. Not the FreeBSD headers (why you need the Linux bits installed).


----------



## balanga (Jul 21, 2018)

Thanks for the tip, but I'm not really sure what *<version>* refers to...


----------



## Chris_H (Jul 22, 2018)

balanga said:


> Thanks for the tip, but I'm not really sure what *<version>* refers to...


There are several Linux "dase" versions, some FreeBSD versions come with more than one linux-base-<version>.
IOW <version> is a place holder for what ever Linux base version is available on the FreeBSD version you're running;
linux-base-c7 , for example. For example, on one of the 11-STABLE boxes I'm running. I see this

```
ls /usr/ports/emulators/ | grep linux_base
linux_base-c6
linux_base-c7
```
So in this case <version> could stand for either *c6*, or *c7*.
Sorry I wasn't clearer.

HTH

--Chris


----------



## balanga (Oct 23, 2018)

I just tried installing emulators/linux-c7 on FreeBSD v11.2 amd64 and get





> Cannot install package: kernel missing Linux support
> pkg: PRE-INSTALL script failed



I guess I need to install something else first...


----------



## SirDice (Oct 23, 2018)

balanga said:


> I guess I need to install something else first...


`kldload linux`


----------

