jl66
asked on
How to fix the linux kernel make error: implicit declaration of function class_device_create
When compiling code with make, I got the errors:
--------------------
make -C /lib/modules/`uname -r`/build modules M=$PWD
make: Entering directory `/usr/src/kernels/2.6.27.2 1-170.2.56 .fc10.i686 '
CC [M] /home/jeff/modules/plp_kme m/plp_kmem .o
/home/jeff/modules/plp_kme m/plp_kmem .c: In function plp_kmem_init:
/home/jeff/modules/plp_kme m/plp_kmem .c:193: error: implicit declaration of function class_device_create
/home/jeff/modules/plp_kme m/plp_kmem .c: In function plp_kmem_exit:
/home/jeff/modules/plp_kme m/plp_kmem .c:212: error: implicit declaration of function class_device_destroy
make[1]: *** [/home/jeff/modules/plp_km em/plp_kme m.o] Error 1
make: *** [_module_/home/jeff/module s/plp_kmem ] Error 2
make: Leaving directory `/usr/src/kernels/2.6.27.2 1-170.2.56 .fc10.i686 '
--------------
Can any expert shed some light on it?
--------------------
make -C /lib/modules/`uname -r`/build modules M=$PWD
make: Entering directory `/usr/src/kernels/2.6.27.2
CC [M] /home/jeff/modules/plp_kme
/home/jeff/modules/plp_kme
/home/jeff/modules/plp_kme
/home/jeff/modules/plp_kme
/home/jeff/modules/plp_kme
make[1]: *** [/home/jeff/modules/plp_km
make: *** [_module_/home/jeff/module
make: Leaving directory `/usr/src/kernels/2.6.27.2
--------------
Can any expert shed some light on it?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The most important lines in the compiling message seem as follows:
----
error: implicit declaration of function 'class_device_create'
error: implicit declaration of function 'class_device_destroy'
----
There are some hits in the net. Is there anything I can do to fix this?
----
error: implicit declaration of function 'class_device_create'
error: implicit declaration of function 'class_device_destroy'
----
There are some hits in the net. Is there anything I can do to fix this?
the class_device_* api's have long been deprecated.... now removed I guess. Look at using device_create() instead.
> I basically use yum to upgrade Fedora 10 to this release (instead of rpm in the link you recommended). I
> installed the original one from CDs downloaded from linux site. The issue here is that when I tried to
If wht you mean is you had a previous release of FC and you've upgraded to this version you'll may be need to check your /etc/yum.d folder and look for any .rpmnew files there If you have them you'll need to remove the ones from the older version and and be replaced by the newere version.
I think you're may be getting the older versions when updating. then you do a yum clean and redo yum update before attempting to compile.
ans will you post the output of:
rpm -qa |grep kernel
> installed the original one from CDs downloaded from linux site. The issue here is that when I tried to
If wht you mean is you had a previous release of FC and you've upgraded to this version you'll may be need to check your /etc/yum.d folder and look for any .rpmnew files there If you have them you'll need to remove the ones from the older version and and be replaced by the newere version.
I think you're may be getting the older versions when updating. then you do a yum clean and redo yum update before attempting to compile.
ans will you post the output of:
rpm -qa |grep kernel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I basically use yum to upgrade Fedora 10 to this release (instead of rpm in the link you recommended). I installed the original one from CDs downloaded from linux site. The issue here is that when I tried to compile an kernel book example, the errors occurred. I believe this example was well written. The error messages are not new. There are some hits on the net, but they are not detail enough, so I asked help from your experts.