build phc-k8 faild in kernel 2.6.36

If you have trouble with PHC you can ask and hope for help here.
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
jarryson
Posts: 2
Joined: Tue 26. Oct 2010, 10:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

build phc-k8 faild in kernel 2.6.36

Post by jarryson » Tue 26. Oct 2010, 10:32

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

User avatar
DavidG
Posts: 180
Joined: Fri 18. Jul 2008, 11:25
Contact:

Re: build phc-k8 failed in kernel 2.6.36

Post by DavidG » Tue 26. Oct 2010, 13:20

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.
A bank is a place where they lend you an umbrella in fair weather and ask for it back when it begins to rain -- R. Frost

User avatar
DavidG
Posts: 180
Joined: Fri 18. Jul 2008, 11:25
Contact:

Re: build phc-k8 faild in kernel 2.6.36

Post by DavidG » Wed 27. Oct 2010, 22:59

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?

jarryson
Posts: 2
Joined: Tue 26. Oct 2010, 10:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: build phc-k8 faild in kernel 2.6.36

Post by jarryson » Wed 3. Nov 2010, 09:43

works fine here, 0.4.3beta.

what is mperf.ko?

User avatar
DavidG
Posts: 180
Joined: Fri 18. Jul 2008, 11:25
Contact:

Re: build phc-k8 failed in kernel 2.6.36

Post by DavidG » Wed 3. Nov 2010, 10:05

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...
A bank is a place where they lend you an umbrella in fair weather and ask for it back when it begins to rain -- R. Frost

User avatar
DavidG
Posts: 180
Joined: Fri 18. Jul 2008, 11:25
Contact:

Re: build phc-k8 faild in kernel 2.6.36

Post by DavidG » Thu 11. Nov 2010, 16:04

FYI: I released the v0.4.3 driver today that fixes the build failure...

pinsb
Posts: 2
Joined: Sat 4. Dec 2010, 00:19
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: build phc-k8 faild in kernel 2.6.36

Post by pinsb » Sat 4. Dec 2010, 06:03

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?

fs4000
Posts: 1
Joined: Sun 6. Dec 2009, 22:31
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: build phc-k8 faild in kernel 2.6.36

Post by fs4000 » Fri 10. Dec 2010, 16:51


Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable