phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.19

Discuss about PHC here. For problems please use the PHC Help forum
lio
Posts: 87
Joined: Wed 2. Mar 2011, 18:37

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by lio » Tue 29. Mar 2016, 23:47

Aalexeey wrote:I'm not able to post any code, it's recognized as a spam?
One more thing I wasn't able to register on this site with mail.ru e-mail service (One of the biggest service with very good spam filtering/adjustments) why?
Don't know about that. For the rest: If you only need to change CC=... in the makefile to make things work, then `make CC=...` should do the trick, too. Without some log or error message it's hard to tell what is going wrong. If the code-tags don't work, try quotes or just put the stuff directly in your message.

Code: Select all

test 1 2 3
lio

Aalexeey
Posts: 14
Joined: Wed 23. Mar 2016, 14:28

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by Aalexeey » Wed 30. Mar 2016, 11:41

Code: Select all

root@blabla:/home/bla/phc-intel-pack-rev20# make
Preparing build area for phc-intel-0.3.2:
searching for patch directory... using ./inc/4.4
copying files
patching file phc-intel.c
SUCCESS. Build area ready.

make -C /lib/modules/`uname -r`/build SUBDIRS=/home/bla/phc-intel-pack-rev20 modules
make[1]: Entering directory `/usr/src/linux-headers-4.4-6.dmz.1-liquorix-686'
  CC [M]  /home/bla/phc-intel-pack-rev20/phc-intel.o
cc1: error: -Werror=date-time: no option -Wdate-time
make[2]: *** [/home/bla/phc-intel-pack-rev20/phc-intel.o] Error 1
make[1]: *** [_module_/home/bla/phc-intel-pack-rev20] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-4.4-6.dmz.1-liquorix-686'
make: *** [phc-intel.ko] Error 2
root@blabla:/home/bla/phc-intel-pack-rev20#
So the reason was Cyrilic parts in code (why not?), I translated them.
Last edited by Aalexeey on Fri 15. Apr 2016, 19:30, edited 1 time in total.

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

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by DavidG » Thu 7. Apr 2016, 18:01

Aalexeey wrote:
lio wrote:try quotes or just put the stuff directly in your message
So the reason was Cyrilic parts in code (why not?), I translated them. What's wrong with mail.ru?
In the past our forum was spammed massively from mail.ru and as a countermeasure it was blacklisted, maybe that is why the cyrilic part was blocked? (We do still get a lot of spam from Russia.) There were about 10 messages from you awaiting approval :D We could remove mail.ru from the blacklist and see how well that goes...
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

Aalexeey
Posts: 14
Joined: Wed 23. Mar 2016, 14:28

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by Aalexeey » Thu 7. Apr 2016, 22:51

DavidG wrote:We could remove mail.ru from the blacklist and see how well that goes...
There very could be spammers, but there are very good reach adjustable filters (some brain storm ones a year and box can be used for a years) so it's possible to prevent spam to enter my box (they will spend time to get nothing, hate parasites). I was getting one spam message from mail.ru yearly usualy, most of other spam are very international.

lio
Posts: 87
Joined: Wed 2. Mar 2011, 18:37

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by lio » Mon 16. May 2016, 13:13

phc-intel-pack-rev21 is out with refreshed patches for kernel 4.6

lio

PS: I didn't implement a solution for kernels with different gcc-requirements (yet). However, if dkms-builds fail because of this, one can always build the module by hand and specify the gcc binary to use at the command line, e.g

Code: Select all

make CC=gcc-5; make install
to build the module for the current kernel with a binary named gcc-5 instead of the default gcc.

Bluubekt
Posts: 9
Joined: Tue 22. Nov 2011, 17:32

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by Bluubekt » Fri 20. May 2016, 02:25

lio wrote:phc-intel-pack-rev21 is out with refreshed patches for kernel 4.6
Excellent, many thanks for this!

schulz
Posts: 4
Joined: Mon 20. Jun 2016, 15:08

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by schulz » Mon 20. Jun 2016, 15:43

Hello,

Thank you for the great work on updating this for newer kernels :).
For the rev21 code, building the module the old way (make, make install) is working as intended on Fedora 23.

However, using the dkms build options (dkms_install, or dkms_mkrpm) is resulting in the errors below:

Code: Select all

DKMS make.log for phc-intel-0.3.2 for kernel 4.5.7-200.fc23.x86_64 (x86_64)
Mon Jun 20 10:01:23 BRT 2016
make[1]: Entering directory '/var/lib/dkms/phc-intel/0.3.2/build'
make[1]: *** No rule to make target 'phc-intel.c', needed by 'phc-intel.ko'.  Stop.
make[1]: *** Waiting for unfinished jobs....
Preparing build area for phc-intel-0.3.2:
searching for patch directory... using ./inc/
copying files
cp: cannot stat ‘./inc//acpi-cpufreq.c’: No such file or directory
Makefile:152: recipe for target '.prepare' failed
make[1]: *** [.prepare] Error 1
make[1]: Leaving directory '/var/lib/dkms/phc-intel/0.3.2/build'
In summary, the first error is related to the phc-intel.c dependency, which make doesn't know how to build. A workaround is replacing the dependency with .prepare which seems to provide the phc-intel.c file (as far as I could understand).
The second error is related to the variable KERNELVERSION being empty. A workaround was commenting the line which sets the SKIPKERNEL flag, so that the code that sets KERNELVERSION is ensured to run on every call to make.
This is the diff showing the changes I made to the Makefile:

Code: Select all

24,25c24,25
<   # No need to run this multiple times on recursive make
<   export SKIPKERNEL := true
---
>   # No need to run this multiple times on recursive make (Actually needed for using dkms in Fedora 23).
>   # export SKIPKERNEL := true
140c140
< $(TARGET): $(SOURCE)
---
> $(TARGET): .prepare
In Fedora 23, the make version is GNU Make 4.0 and the dkms version is 2.2.1.0. I hope this helps anyone on a similar configuration and future versions of the patch.

lio
Posts: 87
Joined: Wed 2. Mar 2011, 18:37

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by lio » Tue 21. Jun 2016, 16:56

schulz wrote:

Code: Select all

Preparing build area for phc-intel-0.3.2:
searching for patch directory... using ./inc/
copying files
cp: cannot stat ‘./inc//acpi-cpufreq.c’: No such file or directory
In summary, the first error is related to the phc-intel.c dependency, which make doesn't know how to build.
The second error is related to the variable KERNELVERSION being empty.
They are the same. The first problem occurred because the script wasn't able to determine the kernel version so it couldn't fetch acpi-cpufreq.c from the appropriate patch directory.
In Fedora 23, the make version is GNU Make 4.0 and the dkms version is 2.2.1.0
Where did you get dkms 2.2.1.0 from? Seems like Fedora is shipping 2.2.0.3 which is the latest upstream version. The only reference I could find for 2.2.1.0 is a modified fork on github. Please try the original.

lio

schulz
Posts: 4
Joined: Mon 20. Jun 2016, 15:08

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by schulz » Tue 21. Jun 2016, 22:28

lio wrote: Where did you get dkms 2.2.1.0 from? Seems like Fedora is shipping 2.2.0.3 which is the latest upstream version. The only reference I could find for 2.2.1.0 is a modified fork on github. Please try the original.
You are correct, the version is 2.2.0.3 (more precisely dkms-2.2.0.3-34.git.9e0394d.fc23.noarch) as being reported by dnf. The 2.2.1.0 comes from running 'dkms --version'. I reinstalled the package the same machine and checked in a different machine and it's the same, so I'm pretty sure I'm running the version from the repos.

lio
Posts: 87
Joined: Wed 2. Mar 2011, 18:37

Re: phc-intel 0.3.2 and 0.4.0 + dkms for kernel 2.6.27 to 4.

Post by lio » Wed 22. Jun 2016, 22:13

schulz wrote:I'm pretty sure I'm running the version from the repos
Thanks for your effort. I could reproduce your issue partially on a vanilla Fedora 23.

make tries to build acpi-cpufreq.c while this file is not ready for prime time. You can see the same effect if you run `make -j` on a multi-processor system. phc-intel-pack.21.1 disables parallel make - it's a fast fix, won't introduce unwanted sideeffects and parallel make is of little to no use anyway as there is only one file to build. Of course, propper dependencies are prefereable on the long run.

The other issue of yours I could not reproduce. After installing all dependencies, including kernel-headers and kernel-devel, make and dkms both were able to locate header files and get the correct kernel version.

lio

Post Reply