- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
I'm creating a recipe to add on my image. My product have 1 executable and 4 libraries, which I load dynamically.
Here is how my recipe looks like:
FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
SRC_URI += "file://"
SRC_URI += "file://.service"
SRC_URI += "file://.so"
SRC_URI += "file://.so"
SRC_URI += "file://.so"
SRC_URI += "file://.so"
SYSTEMD_SERVICE_${PN} = ".service"
RDEPENDS_${PN} = "systemd"
DEPENDS = "systemd"
inherit systemd
S = "${WORKDIR}"
do_compile() {
}
do_install() {
# install service file
install -d ${D}${systemd_unitdir}/system
install -c -m 0644 ${WORKDIR}/.service ${D}${systemd_unitdir}/system
# install my binary
install -d ${D}${bindir}
install -c -m 0755 ${B}/ ${D}${bindir}
# install my libraries
install -d ${D}${libdir}
install -c -m 0755 ${B}/.so ${D}${libdir}
install -c -m 0755 ${B}/.so ${D}${libdir}
install -c -m 0755 ${B}/.so ${D}${libdir}
install -c -m 0755 ${B}/.so ${D}${libdir}
}
FILES_${PN} = "${base_libdir}/systemd/system/..service"
FILES_${PN} += "${bindir}/."
FILES_${PN} += "${libdir}/.so"
FILES_${PN} += "${libdir}/.so"
FILES_${PN} += "${libdir}/.so"
FILES_${PN} += "${libdir}/.so"
With that I have my executable copied to /usr/bin, but my dynamic libraries were not copied to /usr/lib... If I change from ${libdir} to ${binddir} I got the .so copied to /usr/bin, but this isn't what I want.
Do you have any idea why this is not working or what would be the correct way to have my dynamic libraries installed into /etc/lib?
Thanks a lot in advance,
Angelo Ribeiro.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Angelo,
Have you tried using /usr/lib instead of {bindir} or {libdir}?
Also, you mentioned that you would like to include them on /etc/lib; I've seen these libraries on /usr/lib but not on /etc/lib. Are you creating this folder on your filesystem?
Regards,
Charlie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks Charlie,
/etc/lib was a typo, i want to put on /usr/lib.
I tried a bunch of variations without success.
DId you see any sample that generated a .so file and deployed into /usr/lib?
Also, do you know a good way of debugging these recipes? (like with echo or printf?)
Thanks
Angelo Ribeiro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Angelo,
Have you checked if the .so are located on /lib? When you bitbake the image, do you get errors? Run a find instruction to see if the .so are being generated and where have been located when you build your image.
Did you also try without the FILES_${PN} lines? There could be a conflict with these instructions and install -d ${D}${libdir}.
I will do some tests and investigate regarding this and I will let you know, please let me know about my questions above.
What do you want to debug? How are the recipes being built or all the build process?
You can find some information here: http://www.yoctoproject.org/docs/1.7/ref-manual/ref-manual.html# usingpoky-debugging http://www.yoctoproject.org/docs/1.7/ref-manual/ref-manual.html# usingpoky-debugging You can also use FILES_${PN}-dbg. Let me know if this approach helps on how you want to debug this.
Regards,
Charlie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Chalie,
Yep, I have checked on /lib and everyplace and the .so was not there. It seems like we have a conflict when we put FILES_${PN} and do_install...
So, I fixed by adding the following like on my makefiles (not on my BB).
So, here is how I fixed the problem:
- Starting compiling my code, instead of copying binaries;
- Added the following line on my makefiles: install(TARGETS DESTINATION bin) for executables and install(TARGETS LIBRARY DESTINATION lib) for libraries.
- Changed my recipe (removed the do_install...
So, my new recipe is like this:
DESCRIPTION = ""
LICENSE = ""
SRC_URI = "file:///home//"
LIC_FILES_CHKSUM = "file:///;md5=4283671594edec4c13aeb073c219237a"
PROVIDES = ""
DEPENDS = "glib-2.0 curl"
EXTRA_OECMAKE = ""
S = "${WORKDIR}/home/"
SYSTEMD_SERVICE_${PN} = ".service"
FILES_${PN} = "${systemd_unitdir}/system/*"
FILES_${PN} += "${bindir}/*"
FILES_${PN} += "${libdir}/*.so"
FILES_SOLIBSDEV = ""
inherit pkgconfig cmake systemd
do_install_append() {
# install service file
install -d ${D}${systemd_unitdir}/system
install -c -m 0644 ${WORKDIR}/home/azure-iot-field-gateway-sdk/samples/simple_device_cloud_upload/src/simple_device_cloud_upload.service ${D}${systemd_unitdir}/system
}
That's it! Problem solved!
Thanks!
Angelo Ribeiro.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Angelo,
I'm very glad to know that you were able to solve this.
Kind regards,
Charlie

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page