0

The Open Embedded Mosquitto recipe installs mosquitto as a deamon, but there is no libmosquitto.so on the Target.

How can I modify the recipe to install the libs?

Already created mosquitto_%.bbappend and try to extend the do_install function with something like this.

    do_install_append() {
        install -m 0755 ${FILES_libmosquitto1} ${D}${libdir}/
    }

edit:

Digged a little deeper and found that libmosquitto.so is available in build and in image direcory, just as the Layer shippes. So I must be missing something when creating the rootfs.

bitbake mosquitto -c configure
bitbake mosquitto -c compile
bitbake mosquitto -c install

WORKDIR=./build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mosquitto/1.6.12-r0

# lib is available in after do_compile
cd ${WORKDIR}/build/lib
tree
├── libmosquitto.so -> libmosquitto.so.1
├── libmosquitto.so.1 -> libmosquitto.so.1.6.12
└── libmosquitto.so.1.6.12

# lib is available after do_install, also headers and binary is available (in include, sbin respectively)
cd ${WORKDIR}/image/usr/lib
tree
├── libmosquitto.so -> libmosquitto.so.1
├── libmosquitto.so.1 -> libmosquitto.so.1.6.12
└── libmosquitto.so.1.6.12
kluszon
  • 375
  • 5
  • 19
Lumpi
  • 98
  • 1
  • 9
  • 1
    First of all try to compile it on your own and see is and where *libmosquitto.so* file is creating during the build. Then you can create bbappend file similarly to yours example above. – kluszon Aug 19 '21 at 06:16
  • @kluszon, thanks for pointing me into that direction. That helped me to figure out that the libs actually existst. – Lumpi Aug 19 '21 at 09:54

1 Answers1

0

And to complete my rubberduck debugging, its as simple as adding the right Package to IMAGE_INSTALL

  • mosquitto, installs the server
  • libmosquitto1, libmosquittopp1, installs the library (libmosquitto does not work)
  • mosquitto-clients, installs the mosquitto_pub, _sub commands

So just add the wished packages to IMAGE_INSTALL

IMAGE_INSTALL_append = " \
                    libmosquitto1 \
                    libmosquittopp1 \
"
Lumpi
  • 98
  • 1
  • 9