Automated install for phc-k8 not working

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
RobShield
Posts: 5
Joined: Fri 7. Aug 2009, 09:16
[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

Automated install for phc-k8 not working

Post by RobShield » Fri 7. Aug 2009, 09:22

The automated DKMS build system can be used for this driver, just unpack this package and run "sudo make dkms_install". The module will be build automatically every time a new kernel version is installed. To uninstall, simply run "sudo make dkms_uninstall".
Or without DKMS, you can just run "make clean all && sudo make install" and do that every time you're running a new kernel version. For more detail, read the README file in the package.
I've been trying these commands but when doing that the terminal just sits there doing nothing. Or is it that this is something that takes very long time because I've been waiting a few minutes at most. If it is indeed working it seems odd that no output about it is shown and espevially since I don't get any request for the root password. My kernel is 2.6.29.6-217.2.3.fc11.i586. Or is it only that first 4 numbers that says which kernel it is? :)

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

Re: Automated install for phc-k8 not working

Post by DavidG » Fri 7. Aug 2009, 16:12

"make clean all" can hang if it cannot find the current kernel headers or source, I noticed recently. You can manually supply that by using "make clean all KERNELSRC=......" instead.

"make dkms_install" should not hang AFAIK, but let me know if it does and I'll try to sort out what is happening and fix it...
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

RobShield
Posts: 5
Joined: Fri 7. Aug 2009, 09:16
[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: Automated install for phc-k8 not working

Post by RobShield » Fri 7. Aug 2009, 17:36

DavidG wrote:"make clean all" can hang if it cannot find the current kernel headers or source, I noticed recently. You can manually supply that by using "make clean all KERNELSRC=......" instead.
Doing that yields this result when running as sudo:

Code: Select all

rm -f *~ *.o *.s *.ko *.mod.c .*.cmd Module.symvers Module.markers modules.order
rm -rf .tmp_versions
make -C /usr/src/kernels/2.6.29.6-217.2.3.fc11.i686.PAE/ SUBDIRS= modules
make[1]: Entering directory `/usr/src/kernels/2.6.29.6-217.2.3.fc11.i686.PAE'
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
make[2]: *** Ingen regel för att skapa målet "missing-syscalls".  Stannar.
make[1]: *** [prepare0] Fel 2
make[1]: Leaving directory `/usr/src/kernels/2.6.29.6-217.2.3.fc11.i686.PAE'
make: *** [phc-k8.ko] Fel 2

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

Re: Automated install for phc-k8 not working

Post by DavidG » Fri 7. Aug 2009, 22:42

RobShield wrote: Doing that yields this result when running as sudo:
...
I'm not really familiar with fedora, but I would recommend to use the dkms way instead. I'm sure there is a dkms RPM, that will also take care of all the necessary dependencies.

But doing it this way, I think you need to setup your kernel header or source, perhaps you only need to run "make modules_prepare" in the kernel directory... See for example http://www.eece.maine.edu/~sheaff/module.html or search for "building external kernel modules fedora" or something similar.

RobShield
Posts: 5
Joined: Fri 7. Aug 2009, 09:16
[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: Automated install for phc-k8 not working

Post by RobShield » Fri 14. Aug 2009, 20:08

DavidG wrote: I'm not really familiar with fedora, but I would recommend to use the dkms way instead. I'm sure there is a dkms RPM, that will also take care of all the necessary dependencies.
I've checked and I already have DKMS installed but nothing happens when issuing "sudo make dkms_install" except me having to enter my password.

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

Re: Automated install for phc-k8 not working

Post by DavidG » Mon 17. Aug 2009, 17:30

Could you replace the original Makefile in phc-k8_v0.4.1 with the attached one and check if this one works?
Attachments
Makefile.tar.gz
(1.2 KiB) Downloaded 291 times

RobShield
Posts: 5
Joined: Fri 7. Aug 2009, 09:16
[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: Automated install for phc-k8 not working

Post by RobShield » Mon 17. Aug 2009, 18:47

DavidG wrote:Could you replace the original Makefile in phc-k8_v0.4.1 with the attached one and check if this one works?

Code: Select all

awk: kommandorad:1: ödesdigert: kan inte öppna filen "/lib/modules/2.6.29.6-217.2.7.fc11.i586/build/include/linux/version.h" för läsning (Filen eller katalogen finns inte)
awk: kommandorad:1: ödesdigert: kan inte öppna filen "/lib/modules/2.6.29.6-217.2.7.fc11.i586/build/include/linux/version.h" för läsning (Filen eller katalogen finns inte)
**********************************************************************\nPlease remove previous DKMS installs for phc-k8 first:
phc-k8, 0.4.1: added 
For example: dkms remove -m "phc-k8" -v 0.4.0\n**********************************************************************\n
make: *** [dkms_mod_check] Fel 1
Translated into english:

Code: Select all

awk: command line:1: fatal: can't open file "/lib/modules/2.6.29.6-217.2.7.fc11.i586/build/include/linux/version.h" for reading (File or folder does not exist)
awk: command line:1: fatal: can't open file "/lib/modules/2.6.29.6-217.2.7.fc11.i586/build/include/linux/version.h" for reading (File or folder does not exist)
**********************************************************************\nPlease remove previous DKMS installs for phc-k8 first:
phc-k8, 0.4.1: added 
For example: dkms remove -m "phc-k8" -v 0.4.0\n**********************************************************************\n
make: *** [dkms_mod_check] Error 1
I tried dkms remove -m "phc-k8" -v 0.4.0 but that gave this result:

Code: Select all

Error! Invalid number of parameters passed.
Usage: remove -m <module> -v <module-version> --all
   or: remove -m <module> -v <module-version> -k <kernel-version>

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

Re: Automated install for phc-k8 not working

Post by DavidG » Mon 17. Aug 2009, 23:47

RobShield wrote: I tried dkms remove -m "phc-k8" -v 0.4.0 but that gave this result:

Code: Select all

Error! Invalid number of parameters passed.
Usage: remove -m <module> -v <module-version> --all
   or: remove -m <module> -v <module-version> -k <kernel-version>
If you add "--all" it should work, but I have forgotten to add that to the error message. :oops: So please use dkms remove -m "phc-k8" -v 0.4.0 --all instead.

Sorry for the inconvenience!
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

RobShield
Posts: 5
Joined: Fri 7. Aug 2009, 09:16
[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: Automated install for phc-k8 not working

Post by RobShield » Tue 18. Aug 2009, 18:20

After successfully removing with --all I get this when doing make dkms_install:

Code: Select all

awk: kommandorad:1: ödesdigert: kan inte öppna filen "/lib/modules/2.6.29.6-217.2.8.fc11.i586/build/include/linux/version.h" för läsning (Filen eller katalogen finns inte)
awk: kommandorad:1: ödesdigert: kan inte öppna filen "/lib/modules/2.6.29.6-217.2.8.fc11.i586/build/include/linux/version.h" för läsning (Filen eller katalogen finns inte)
mkdir -p ""/usr/src/"phc-k8"-"0.4.1"""
install -m 644 -o root -g root Makefile dkms.conf phc-k8.c phc-k8.h ""/usr/src/"phc-k8"-"0.4.1"""
install -m 744 -o root -g root phc-k8.add ""/usr/src/"phc-k8"-"0.4.1"""
dkms add build install -m "phc-k8" -v "0.4.1"

Creating symlink /var/lib/dkms/phc-k8/0.4.1/source ->
                 /usr/src/phc-k8-0.4.1

Running the post_add script:

DKMS: add Completed.

Error! Your kernel source for kernel 2.6.29.6-217.2.8.fc11.i586 cannot be found at
/lib/modules/2.6.29.6-217.2.8.fc11.i586/build or /lib/modules/2.6.29.6-217.2.8.fc11.i586/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
make: *** [dkms_install] Fel 1
So when trying make dkms_install --kernelsourcedir="path_to_source" it's not a valid option. And when using dkms install -m "phc-k8" -v 0.4.1 --kernelsourcedir="path_to_source" I get this:

Code: Select all

Error! Could not locate phc-k8.ko for module phc-k8 in the DKMS tree.
You must run a dkms build for kernel 2.6.29.6-217.2.8.fc11.i586 (i586) first.
Is the last way the way to go, running a dkms build for my kernel or is there a way of showing where my kernel source is with the command make dkms_install?

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

Re: Automated install for phc-k8 not working

Post by DavidG » Tue 18. Aug 2009, 22:15

Hmmm, apparently the fedora+dkms setup is broken, because dkms is not working out of the box as it is supposed to be... It kind of defeats the purpose of dkms (making installing externel kernel modules easy) if the environment is not setup correctly... I will try to look at Fedora.

O, I already found out that Virtualbox users suffer from the same problem, perhaps this helps:
http://forums.fedoraforum.org/showthread.php?t=223706
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

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