Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

If you have trouble with PHC you can ask and hope for help here.
Post Reply
cucio
Posts: 6
Joined: Mon 4. Jan 2010, 19:42

Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by cucio » Mon 4. Jan 2010, 19:49

Hi!

I am getting errors trying to build phc-intel-0.3.2-9 for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt (Fedora 11 kernel plus realtime patches, found at PlanetCCRMA repository.)

Code: Select all

$ make prepare
FOUND AVAILABLE PATCHSET. PREPARING.
patching file phc-intel.c

$ make
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/kompoza/devel/phc-intel-0.3.2-9 modules
make[1]: Entering directory `/usr/src/kernels/2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt'
  CC [M]  /home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.o
In file included from <command-line>:0:
./include/linux/autoconf.h:169:1: warning: "CONFIG_ENABLE_MUST_CHECK" redefined
<command-line>: warning: this is the location of the previous definition
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c: In function ‘acpi_cpufreq_target’:
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:402: error: storage size of ‘it’ isn’t known
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:434: error: implicit declaration of function ‘trace_power_mark’
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:434: error: ‘POWER_PSTATE’ undeclared (first use in this function)
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:434: error: (Each undeclared identifier is reported only once
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:434: error: for each function it appears in.)
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:402: warning: unused variable ‘it’
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c: In function ‘acpi_cpufreq_cpu_init’:
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:614: error: implicit declaration of function ‘percpu_ptr’
/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:614: warning: assignment makes pointer from integer without a cast
make[2]: *** [/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.o] Error 1
make[1]: *** [_module_/home/kompoza/devel/phc-intel-0.3.2-9] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt'
make: *** [phc-intel.ko] Error 2
Any help much appreciated, thanks!

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by the-fallen » Fri 8. Jan 2010, 17:03

I'm sorry. I hoped that someone else may have an idea but nobody answeared you so I am doing it.
I do not know what's wrong and I do not know what you can do.

Maybe - If you want to try - use a vanilla kernel (from kernel.org) just to check if it is working there or if you get the same errors.

If it is working than something is wrong with your stock kernel. If the problems exists some libraries could be missing.

cucio
Posts: 6
Joined: Mon 4. Jan 2010, 19:42

Re: Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by cucio » Sat 9. Jan 2010, 14:55

That's too bad, I wouldn't mind going through the compiler errors and trying to patch them if I had some hints, but I don't think I have the time to figure out everything by myself.

I guess there is some sort of incompatibility between these two versions of the RT patch and the PHC patch. Didn't happen in previous versions of the RT kernel or with the FC 11 stock kernel (2.6.30.10-105.fc11.i586).

I'll see if downgrading either the kernel or the patch will help.

Cheers!

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by the-fallen » Sat 9. Jan 2010, 16:01

I hope you will find a solution.
Please let us know if you have fixed that problem.

Good luck.

cucio
Posts: 6
Joined: Mon 4. Jan 2010, 19:42

Re: Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by cucio » Sat 9. Jan 2010, 16:38

OK, I am giving a try to patch the patch.

I've solved my first error:

Code: Select all

/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:402: error: storage size of ‘it’ isn’t known
by adding

Code: Select all

#include <trace/power.h>
to the patched phc-intel.c.

But then, I got the following error:

Code: Select all

/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:616: error: implicit declaration of function ‘percpu_ptr’
There are no references to any of the percpu stuff in my 2.6.29 kernel tree (no linux/percpu.h include available anywhere, which is where percpu_ptr should be found.)

Then I tried the 2.6.30 patch, but I got:

Code: Select all

/home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.c:563: error: implicit declaration of function ‘zalloc_cpumask_var_node’
So it seems I am stuck somewhere in the middle between 2.6.29 and 2.6.30. I guess that's the end of the road until my distro releases a newer kernel. :( nCurses!

cucio
Posts: 6
Joined: Mon 4. Jan 2010, 19:42

Re: Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by cucio » Sat 9. Jan 2010, 17:04

OK, I think I have succeeded.

I installed the kernel RPMS, built it to the 'prepare' stage, extracted acpi-cpufreq.h and substituted it for the one in inc/2.6.29.

Code: Select all

rpm -i http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetcore/11/SRPMS/kernel-2.6.29.6-1.rt23.4.fc11.ccrma.src.rpm

rpmbuild -bp --target i686 ~/rpmbuild/SPECS/kernel.spec

cp ~/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.i686/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c inc/2.6.29/acpi-cpufreq.c
The patch applies with some fuzz, but I can compile, load and use the module:

Code: Select all

$ make prepare
FOUND AVAILABLE PATCHSET. PREPARING.
patching file phc-intel.c
Hunk #2 succeeded at 61 with fuzz 1.
Hunk #3 succeeded at 115 (offset 3 lines).
Hunk #4 succeeded at 786 (offset 15 lines).
Hunk #5 succeeded at 805 (offset 15 lines).

$ make
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/kompoza/devel/phc-intel-0.3.2-9 modules
make[1]: Entering directory `/usr/src/kernels/2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt'
  CC [M]  /home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.o
In file included from <command-line>:0:
./include/linux/autoconf.h:169:1: warning: "CONFIG_ENABLE_MUST_CHECK" redefined
<command-line>: warning: this is the location of the previous definition
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.mod.o
In file included from <command-line>:0:
./include/linux/autoconf.h:169:1: warning: "CONFIG_ENABLE_MUST_CHECK" redefined
<command-line>: warning: this is the location of the previous definition
  LD [M]  /home/kompoza/devel/phc-intel-0.3.2-9/phc-intel.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt'

$ su

# make install
install -m 644 -o root -g root phc-intel.modprobe /etc/modprobe.d/phc-intel.conf
mkdir -p /lib/modules/2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt/extra
install -m 644 -o root -g root phc-intel.ko /lib/modules/2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt/extra/
depmod 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt -a

# rmmod acpi-cpufreq && modprobe phc-intel

# echo "12:14 10:8 8:3 6:0" > /sys/devices/system/cpu/cpu0/cpufreq/phc_controls

# cat /sys/devices/system/cpu/cpu0/cpufreq/phc_controls 
12:14 10:8 8:3 6:0
So all seems to be OK so far, I'll cross my fingers.

the-fallen
Administrator
Posts: 346
Joined: Wed 9. Jul 2008, 19:57

Re: Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by the-fallen » Sat 9. Jan 2010, 17:10

What a trip...

The errors in the messages you posted (compile error messages) do not belong to the PHC part so it seems that those kernels are different to the Vanilla one. Maybe the distribution patched something in the acpi subsystem.

cucio
Posts: 6
Joined: Mon 4. Jan 2010, 19:42

Re: Build failed for kernel 2.6.29.6-1.rt23.4.fc11.ccrma.i586.rt

Post by cucio » Mon 11. Jan 2010, 12:33

Luis Garrido fleshed out this procedure and published a blog entry about PHC for Fedora users here:

http://sourceforge.net/userapps/wordpre ... a-kernels/

Post Reply