# Cannot kldload pefs from compiled port



## pvenkman (Oct 26, 2015)

Hello,

I am trying to install sysutils/pefs-kmod on a FreeBSD 10.1 box:

```
FreeBSD 10.1-RELEASE-p19 FreeBSD 10.1-RELEASE-p19 #0: Sat Aug 22 03:55:09 UTC 2015  root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

with the following hardware:

```
CPU: Intel(R) Atom(TM) CPU D525  @ 1.80GHz (1800.10-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x106ca  Family = 0x6  Model = 0x1c  Stepping = 10
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x40e31d<SSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant, performance statistics
```

I ran
`[/usr/ports/sysutils/pefs-kmod]# make install clean`

successfully. When trying to
`# kldload pefs`

I get the following error message:

```
kldload: an error occurred while loading the module. Please check dmesg(8) for more details.
```

`# dmesg`
gets me this:

```
KLD pefs.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
```

When comparing this procedure to the my FreeBSD 9.3 box (where I can successfully use PEFS), the pefs.ko file is present in the identical folder: /boot/modules/pefs.ko
(and not /boot/kernel)

I tried removing the port and installing the package instead
`# pkg remove pefs-kmod`
`# pkg install pefs-kmod`
and afterwards
`# kldload pefs`
which works instantly, running
`[/boot/kernel]# kldstat`

shows the module was correctly loaded. Now since my intention is not to mix ports and packages, I would like to know where the difference lies and why compiling it brings up the kernel issue.

Please support.


----------



## tobik@ (Oct 26, 2015)

Maybe your source tree in /usr/src out of sync with the running FreeBSD version. Make sure it is up to date and is for FreeBSD 10.1. You can check the top of /usr/src/COPYRIGHT to see the version of your source tree.


----------

