# make-ing `lsof`



## Mausy5043 (Jan 25, 2018)

Trying to make sysutils/lsof requires me to set `MAKE_JOBS_UNSAFE` but the still leads me to an error.

`sudo env MAKE_JOBS_UNSAFE=yes make install`

Eventually ends in:


```
dnode.c:916:13: error: no member named 'i_dev' in 'struct inode'
            if (i->i_dev
                ~  ^
dnode.c:926:27: error: no member named 'i_dev' in 'struct inode'
                dev = Dev2Udev((KA_T)i->i_dev);
                                     ~  ^
2 errors generated.
*** Error code 1

Stop.
make[1]: stopped in /usr/obj/usr/ports/sysutils/lsof/work/lsof_4.90Q.freebsd
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/lsof
```

What can I do now? Any help appreciated.

System info:

```
kern.ostype: FreeBSD
kern.osrelease: 11.0-RELEASE-p17
kern.osrevision: 199506
kern.version: FreeBSD 11.0-RELEASE-p17 #0 14a0f7db3(stable/17.7): Tue Dec 12 03:19:44 CET 2017
```


----------



## swegen (Jan 25, 2018)

Update to FreeBSD 11.1-RELEASE with `freebsd-update` then the build should complete without problems.

11.0-RELEASE is EOL.


----------



## tobik@ (Jan 25, 2018)

lsof uses internal kernel data structures and the sources in /usr/src need to match the kernel you're running. Is this the case?



Mausy5043 said:


> System info:
> `kern.ostype: FreeBSD
> kern.osrelease: 11.0-RELEASE-p17
> kern.osrevision: 199506
> kern.version: FreeBSD 11.0-RELEASE-p17 #0 14a0f7db3(stable/17.7): Tue Dec 12 03:19:44 CET 2017`


Judging by the stable/17.7 branch and commit 14a0f7db3 this appears to be OPNsense, maybe ask on their forums instead. Whatever advice we can give might not apply to OPNsense.

PC-BSD, FreeNAS, NAS4Free, and all other FreeBSD Derivatives


----------

