0

Open Embedded Mosquitto recipe将mosquitto 安装为守护进程,但 Target 上没有 libmosquitto.so。

如何修改配方以安装库?

已经创建mosquitto_%.bbappend并尝试do_install使用类似的方法扩展该功能。

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

编辑:

再深入一点,发现 libmosquitto.so 在构建和映像目录中可用,就像 Layer shippes 一样。所以我在创建 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
4

1 回答 1

0

并完成我的橡皮鸭调试,就像添加正确的包一样简单IMAGE_INSTALL

  • mosquitto, 安装服务器
  • libmosquitto1, libmosquittopp1, 安装库(libmosquitto不起作用)
  • mosquitto-clients, 安装 mosquitto_pub, _sub 命令

所以只需将希望的包添加到IMAGE_INSTALL

IMAGE_INSTALL_append = " \
                    libmosquitto1 \
                    libmosquittopp1 \
"
于 2021-08-19T09:46:08.493 回答