how to add shared library to recipes

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

how to add shared library to recipes

跳至解决方案
20,807 次查看
banuprakash
Contributor II

Hi,

I can able to install libMSO.so.1.2 but i cant able to make symbolic libMSO.so.

DESCRIPTION = "program"
PR = "r0"
LICENSE = "GPLv2"    
S = "${WORKDIR}"

LIC_FILES_CHKSUM = "file://libMSO.so.1.2;md5=49b4ca37bfccc1a103e0ea32073358e6"
SRC_URI += "file://libMSO.so.1.2"

do_install() {
             install -d ${D}${libdir}/
         install -m 0755 ${S}/libMSO.so.1.2 ${D}${libdir}/
         ln -sf ${D}/${libdir}/libMSO.so.1.2 ${D}/${libdir}/libMSO.so
}
    
FILES_${PN} = "${libdir}/libMSO.so.1.2"

can any tell me to make symbolic to shared librery.

1 解答
13,955 次查看
banuprakash
Contributor II

i got the solution now i can able to install .so

FILES_${PN} += "${libdir}/*.so"
FILES_SOLIBSDEV = ""
INSANE_SKIP_${PN} += "dev-so"

we should add this three lines in .bb file

在原帖中查看解决方案

4 回复数
13,956 次查看
banuprakash
Contributor II

i got the solution now i can able to install .so

FILES_${PN} += "${libdir}/*.so"
FILES_SOLIBSDEV = ""
INSANE_SKIP_${PN} += "dev-so"

we should add this three lines in .bb file

10,315 次查看
JannePaalijarvi
Contributor I

Thank you so much. This seems to be the only way to do easily as of 2022-01-20.

13,955 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Banu,

I do not exactly understand what are you trying to do with LibMSO, i think should be LibM.so, but general information about creating symbolink links in Yocto :

TipsAndTricks/Packaging Prebuilt Libraries - Yocto Project 

also to create and install a new library please check;

[yocto] How to create and install a library in yocto -- Hello Library 

Hope his helps

0 项奖励
回复
13,955 次查看
banuprakash
Contributor II

Hi,

      libMSO.so.1.2 is my application shared library. i can able to install libMSO.so.1.2 and i can't able to make symbolink to .so

do_install_append() {
             install -d ${D}${libdir}/
         install -m 0777 ${S}/libMSO.so.1.2 ${D}${libdir}/libMSO.so.1.2
         ln -sf libMSO.so.1.2 ${D}${libdir}/libMSO.so
         install -m 0777 ${S}/libMSOComm.so.1.2 ${D}${libdir}/libMSOComm.so.1.2
         ln -sf libMSOComm.so.1.2 ${D}${libdir}/libMSOComm.so.1
         ln -sf libMSOComm.so.1.2 ${D}${libdir}/libMSOComm.so
}

Directory of rootfs/usr/bin - there is no libMSOComm.so  link.

 libMSOComm.so.1 -> libMSOComm.so.1.2
 libMSOComm.so.1.2

local.conf i change the priority too

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

 

# We have a packages directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
            ${LAYERDIR}/recipes-*/*/*.bbappend"

 

BBFILE_COLLECTIONS += "plum"
BBFILE_PATTERN_plum := "^${LAYERDIR}/"
BBFILE_PRIORITY_plum = "6"

0 项奖励
回复