how to add shared library to recipes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to add shared library to recipes

Jump to solution
18,739 Views
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 Solution
11,887 Views
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

View solution in original post

4 Replies
11,888 Views
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

8,247 Views
JannePaalijarvi
Contributor I

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

11,887 Views
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 Kudos
11,887 Views
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 Kudos