Page 1 of 1

build phc-k8 faild in kernel 2.6.36

Posted: Tue 26. Oct 2010, 10:32
by jarryson
First i met this problem:

Code: Select all

awk: (FILENAME=/lib/modules/2.6.36-ARCH-BFS/build/include/linux/version.h FNR=2) fatal: cannot open file `/lib/modules/2.6.36-ARCH-BFS/build/include/linux/utsrelease.h' for reading (No such file or directory)
Makefile:18: *** Kernel version not found, maybe you need to install appropriate kernel-headers or run make with KERNELSRC parameter, e.g.: make KERNELSRC=/usr/src/linux.  Stop.
i changed that line to :

Code: Select all

KERNELVERSION = $(shell awk -F\" '/REL/ {print $$2}' $(KERNELSRC)/include/linux/version.h $(KERNELSRC)/include/generated/utsrelease.h)
but then i met this, and i don't know how to solve this:

Code: Select all

make -C /lib/modules/`uname -r`/build SUBDIRS=/home/user/phc-k8_v0.4.2 modules
make[1]: Entering directory `/usr/src/linux-2.6.36-ARCH-BFS'
  CC [M]  /home/user/phc-k8_v0.4.2/phc-k8.o
/home/user/phc-k8_v0.4.2/phc-k8.c:1737:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1738:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1738:3: warning: (near initialization for 'powernow_k8_phc_default_controls.attr')
/home/user/phc-k8_v0.4.2/phc-k8.c:1745:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1746:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1746:3: warning: (near initialization for 'powernow_k8_phc_controls.attr')
/home/user/phc-k8_v0.4.2/phc-k8.c:1754:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1755:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1755:3: warning: (near initialization for 'powernow_k8_phc_default_vids.attr')
/home/user/phc-k8_v0.4.2/phc-k8.c:1762:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1763:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1763:3: warning: (near initialization for 'powernow_k8_phc_vids.attr')
/home/user/phc-k8_v0.4.2/phc-k8.c:1771:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1772:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1772:3: warning: (near initialization for 'powernow_k8_phc_default_fids.attr')
/home/user/phc-k8_v0.4.2/phc-k8.c:1779:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1780:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1780:3: warning: (near initialization for 'powernow_k8_phc_available_fids.attr')
/home/user/phc-k8_v0.4.2/phc-k8.c:1791:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1792:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1792:3: warning: (near initialization for 'powernow_k8_phc_fids.attr')
/home/user/phc-k8_v0.4.2/phc-k8.c:1799:5: error: unknown field 'owner' specified in initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1800:3: warning: excess elements in struct initializer
/home/user/phc-k8_v0.4.2/phc-k8.c:1800:3: warning: (near initialization for 'powernow_k8_phc_version.attr')
make[2]: *** [/home/user/phc-k8_v0.4.2/phc-k8.o] Error 1
make[1]: *** [_module_/home/user/phc-k8_v0.4.2] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.36-ARCH-BFS'
make: *** [phc-k8.ko] Error 2

Re: build phc-k8 failed in kernel 2.6.36

Posted: Tue 26. Oct 2010, 13:20
by DavidG
As a workaround you can delete all the lines with ".owner = THIS_MODULE" that cause these errors as a temporary workaround - but be sure NOT to remove the one line with .owner that does not trigger an error.

However, I am working on an updated version of phc-k8, but I'm still working on it to make it support older kernels. I am striving to be uploading a test-release soon, but I have no clue what kernel versions need to be supported, see my call for feedback on this forum... Initially I will probably only be supporting kernels from 2.6.32.y to 2.6.36.y.

By the way, this version of the driver will not yet be supporting undervolting family 10h and 11h processors (Phenom/Phenom II/Athlon II/Turion64/Turion II) since I have to rework some of that code first.

Re: build phc-k8 faild in kernel 2.6.36

Posted: Wed 27. Oct 2010, 22:59
by DavidG
I just uploaded a phc-k8 0.4.3 beta 1 driver to "Test-releases" in the download section that fixes this. Could you test it as well and see if it's okay?

Re: build phc-k8 faild in kernel 2.6.36

Posted: Wed 3. Nov 2010, 09:43
by jarryson
works fine here, 0.4.3beta.

what is mperf.ko?

Re: build phc-k8 failed in kernel 2.6.36

Posted: Wed 3. Nov 2010, 10:05
by DavidG
mperf.ko is an additional module that has been added to powernow-k8 since kernel 2.6.35 and therefore has been added to phc-k8. Basically it's used for intelligently handling the "Turbo Core" feature in AMD processors that support it. I added it because I wanted to use the latest powernow-k8 code and include as much code as reasonably possible. Also, it needs to be there if the driver is going to support undervolting Turbo Core processors, but I'm still waiting for someone that has one...

Re: build phc-k8 faild in kernel 2.6.36

Posted: Thu 11. Nov 2010, 16:04
by DavidG
FYI: I released the v0.4.3 driver today that fixes the build failure...

Re: build phc-k8 faild in kernel 2.6.36

Posted: Sat 4. Dec 2010, 06:03
by pinsb
I'm getting the same error on an Intel build

phc-intel-0.3.2-12-1_2.6.36 being compiled against a Fedora kernel

Any ideas?

Re: build phc-k8 faild in kernel 2.6.36

Posted: Fri 10. Dec 2010, 16:51
by fs4000