0

I am using this recipe, which by default doesn't copy the resulting .a lib (it expects header only usage I think)

I am trying to get the resultant libspdlog.a into my sysroot, but I can't seem to make that happen. I coppied the recipe to my layer (had to anyway because my project refereces an older version of meta-oe)

So far i've tried:

FILES_${PN} += "${libdir}/libspdlog.a"
FILES_${PN}-dev += "${libdir}/libspdlog.a"
FILES_${PN}-staticdev += "${libdir}/libspdlog.a" 

and

do_install() {
    install -d ${D}${libdir}
    install -m 0644 libspdlog.a ${D}${libdir}
 }

I'm pretty sure do_install is not getting called. I had to add to my IMAGE_INSTALL spd-dev so maybe this has something to do with it

Thanks

gcb
  • 366
  • 5
  • 16

1 Answers1

0

do_install is right and for now just have FILES_${PN} += "${libdir}/libspdlog.a".

If you have kept the same name of the recipe when you copied over you will need to add the following IMAGE_INSTALL_append = " spdlog" (in either local.conf or an image recipe if you have one) to put into image.

To verify do_install is working ok:

  • Inside your build folder (where you issue bitbake from) there will be tmp/work (if you haven't changed this in your local.conf)
  • Find the location of your recipe folder <recipe_name>/<recipe_version> (eg. spdlog/1.8.0-r0/)
  • Inside here there will be a packages-split/spdlog folder
  • Inside this you should see your structure usr/lib/libspdlog.a
elcfd
  • 46
  • 1
  • I have that file only in: tmp/sysroots-components/cortexa5t2hf-neon-vfpv4/spdlog/usr/lib/libspdlog.a. Also for the image it has to be spdlog-dev. Maybe thats a clue? In the recipe itself it mentions something about header only... – gcb Oct 05 '20 at 15:03
  • 1
    Run `oe-pkgdata-util find-path /usr/lib/libspdlog.a` and add the package which has this file to your image. That should do it. – qschulz Oct 05 '20 at 18:07