Ticket #542 (closed task)

Opened 7 years ago

Mandrake RPM - Missing symbols (Examined/Solved - lm_sensors 2.5.1 2.2.15-4mdk)

Reported by: contact Owned by: somebody
Priority: minor Milestone:
Component: kernel Version:
Keywords: Cc:

Description

I tried your 2.5 package first with the RPMs but had no luck at all. Im using

Mandrake 7.1 and am relativly new to Linux (ugh). The RPMs didn't like my

version of the kernal or something. Either way, I uninstalled them after

playing around a bit and thought I needed to compile my own modules.

So here I am with the .tar.gz install versions of i2c and lm_sensors. I did a

make and make install on i2c. I then added the info to conf.modules so it would

find it. I then did a depmod -a and I get this: (BTW, this contains LM sensors

data too)

depmod: *** Unresolved symbols in /lib/modules/extra/misc/i2c-core.o

depmod: kmalloc

depmod: create_proc_entry

depmod: proc_bus

depmod: kfree

depmod: remove_proc_entry

depmod: sprintf

depmod: printk

depmod: generic_copy_to_user

depmod: *** Unresolved symbols in /lib/modules/extra/misc/i2c-dev.o

depmod: generic_copy_from_user

depmod: kmalloc

depmod: unregister_chrdev

depmod: register_chrdev

depmod: kfree

depmod: printk

depmod: generic_copy_to_user

(and tons more of things like this)

As a result, I can do a modprobe i2c and something loads, but modprobe i2c-dev

fails. modprobe i2c-i810 (which is what I have) gives me this:

/lib/modules/extra/misc/i2c-algo-bit.o: unresolved symbol i2c_add_adapter

/lib/modules/extra/misc/i2c-algo-bit.o: unresolved symbol i2c_del_adapter

/lib/modules/extra/misc/i2c-algo-bit.o: insmod /lib/modules/extra/misc/i2c-algo-

bit.o failed

/lib/modules/extra/misc/i2c-algo-bit.o: insmod i2c-i810 failed

So I'm stuck. I checked in my /usr/src/linux directory and the only i2c.h I

found in there is the same as the one in your install package (just to make

sure because I think mandrake includes the very old i2c satuff in limited

fashion).

This the the output from modprobe i2c-dev:

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_master_send

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_transfer

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_smbus_xfer

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_del_driver

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_get_functionality

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_check_addr

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_control

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_master_recv

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_adapter_id

/lib/modules/extra/misc/i2c-dev.o: unresolved symbol i2c_add_driver

/lib/modules/extra/misc/i2c-dev.o: insmod /lib/modules/extra/misc/i2c-dev.o fail

ed

/lib/modules/extra/misc/i2c-dev.o: insmod i2c-dev failed

I think that's about all. I can get any other info for you and even create you

an account on my machine if we need to (I'm on DSL and this is a new box with

nothing important on it yet).

Thanks for your help!

--- Our expert responded below.

Ticket closed MDS 2/24/01

The provided RPM packages are for Mandrake 7.0, not Mandrake 7.1. The

README insructions clearly state that kernel-i2c and lm_sensors-drivers

are kernel dependent. Since these packages were compiled for Mandrake

7.0 kernel, they will not work with Mandrake 7.1 kernel. These packages

contain the dependency information inside them and if you try to install

them, they will complain that you do not have the required kernel. This

is exactly what you are seeing.

You need to rebuild the packages for Mandrake 7.1. To do so, get the

source rpm packages and rebuild with:

rpm --rebuild kernel-i2c*.src.rpm (step a)

rpm --rebuild lm_sensors*.src.rpm (step b)

Before rebuilding the lm_sensors, you need to install the binary package

kernel-i2c which will be built at step (a). The binary packages of

lm_sensors will be built at step (b). Install them as well.

Alternatively, you can install the source rpms, edit the spec files to

change tag 7.0 to 7.1 and rebuild the rpms. If you do this, the release

of the binary packages will have 7.1 prepended to them, not 7.0. This is

purely cosmetic, I think, and is really required for production rpms

only.

I did a

make and make install on i2c. I then added the info

to conf.modules so it would

find it. I then did a depmod -a and I get this:

depmod: *** Unresolved symbols in

/lib/modules/extra/misc/i2c-core.o

depmod: kmalloc

depmod: create_proc_entry

......... (a lot of such unresolved symbols).

This is because you try to build modules for stock Mandrake kernel. They

use RedHat? kernel packaging, which means the kernel source installed has

neither configuration information nor the version symbols information of

the running kernel. This makes building third-parties kernel modules

virtually impossible, since you have to guess how your kernel had been

configured and pass this information to the source of your third party

modules manually.

The source RPM I have built takes automatic care of this. It knows how

to find and pass all the necessary information. For instance Mandarake

7.0 provides 5 (!) differently configured binary kernel packages but one

kernel-source package. Even if you have all five binary kernels

installed, you will have no problems building i2c and lm_sensors. Boot

kernel-secure, and kernel-i2c-2.5.1secure will be built, boot kernel-fb

and kernel-i2c-2.5.1fb will be built, boot kernel-smp and

kernel-i2c-2.5.1smp will be built,etc. All this is done from the same

source rpm without changing a single line in the spec file!

No, he does not need to build a new kernel. He needs either to rebuild

the source rpm (since the binary rpms are for Mandrake 7.0 and he uses

7.1), or, in the case he wants to build manually, he needs to build

with:

make MODVER=3D1 SMP=3D1 in the case of SMP kernel

and make MODVER=3D1 SMP=3D0 in the case of UP kernel

He needs to pass the parameters manually since the kernels source in

Mandrake and RedHat? distros has no config and version info for the

running kernel.

But in that case, 'make install' will not install in the right place

either, so why to bother when

rpm --rebuild kernel-i2c*.src.rpm

will do the proper job.

He has symbol troubles when trying to build manually (not via source

rpm!). That is not when trying to install the binary RPMs. Everything is

logical:

a) since he is running a Mandarake 7.1 kernel, binary rpms compiled for

Mandarke 7.0 kernel will not install;

b) compiling modules for stock kernels manually is a pain in the neck

(please see above), but to ease this task the SOURCE RPM has been

written. All one needs to do is to type 'rpm -ba *.spec ' or 'rpm

--rebuild *.src.rpm'. It should always work and no guesses must be made.

I hope you're joking when you say I have to compile a kernel

You do not need to compile a new kernel. You need to rebuild the

packages as described above or wait untill binary RPMs for Mandrake 7.1

will be provided. Do not expect packages built for Mandrake 7.0 to work

under 7.1, especially when these packages are kernel (drivers) related.

Constantine Gavrilov

Note: See TracTickets for help on using tickets.