Skip to contentSkip to conversation

about symbol link of library

DISCUSSION Ni Qingliang 2 participants 3 messages Oct 13, 2011 – Oct 14, 2011

lore
Share & tools
lore
#0 lore raw

hello all.

I have added 2 packages, one is lib, and the other is bin.

the lib will generate 2 files:

	libx.so.1.0.1
	libx.so -> libx.so.1.0.1

the latter linked to the other one.

the bin package will link to the libx.so.

compile/install are all OK, but when populate rootfs, I got error:
error: Failed dependencies:
| libx.so is needed by bin......

after checked the rpm, the libx.so is located in libx-dev, but not in libx.

what is the right way to resolve this problem?

Signature · 3 lines
Yi Qingliang
[email protected]
http://niqingliang2003.wordpress.com
#1 lore raw
Quoted 7 lines · Ni Qingliang

hello all.

I have added 2 packages, one is lib, and the other is bin.

the lib will generate 2 files:

	libx.so.1.0.1
	libx.so -> libx.so.1.0.1
Quoted 7 lines

the latter linked to the other one.

the bin package will link to the libx.so.

compile/install are all OK, but when populate rootfs, I got error:
error: Failed dependencies:
| libx.so is needed by bin......

I suspect your libx.so.1.0.1 is missing an SONAME. One should be added to it that matches the filename of the "real" library. (It's possible that it has an soname already, it just doesn't match the filename.)

Once that is done, then the dynamic linker should be able to find it w/o the libx.so link.

(The links should only ever be used for development. This is a somewhat common bug, and a good way to find these problems.)

I'd also suggest we add a sanity check for this condition, so it will be easier for people to identify in the future.

--Mark

Quoted 8 lines

after checked the rpm, the libx.so is located in libx-dev, but not in libx.

what is the right way to resolve this problem?

#2 lore raw

thanks! It looks like OK now.

the libx package contain symlink libx.so now.

Quoted 44 lines · Mark Hatle
Quoted 7 lines · Ni Qingliang

hello all.

I have added 2 packages, one is lib, and the other is bin.

the lib will generate 2 files:

      libx.so.1.0.1
      libx.so -> libx.so.1.0.1
Quoted 7 lines

the latter linked to the other one.

the bin package will link to the libx.so.

compile/install are all OK, but when populate rootfs, I got error:
error: Failed dependencies:
| libx.so is needed by bin......

I suspect your libx.so.1.0.1 is missing an SONAME. One should be added to it that matches the filename of the "real" library. (It's possible that it has an soname already, it just doesn't match the filename.)

Once that is done, then the dynamic linker should be able to find it w/o the libx.so link.

(The links should only ever be used for development. This is a somewhat common bug, and a good way to find these problems.)

I'd also suggest we add a sanity check for this condition, so it will be easier for people to identify in the future.

--Mark

Quoted 8 lines

after checked the rpm, the libx.so is located in libx-dev, but not in libx.

what is the right way to resolve this problem?

_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Signature · 3 lines
Yi Qingliang
[email protected]
http://niqingliang2003.wordpress.com