Build Dependency on Debian Package: Bitbake

Viewed 15

Trying to add the Debian package libsystemd. But I keep get the following error after, not sure how to solve this.

ERROR: Nothing PROVIDES 'libsystemd' (but example.bb DEPENDS on or otherwise requires it). Close matches:
  libteam
  systemd
  systemd RPROVIDES libsystemd
NOTE: Runtime target 'example' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['example', 'libsystemd']
Missing or unbuildable dependency chain was: [ 'example', 'libsystemd']

fatal error: systemd/sd-daemon.h: No such file or directory | 16 | #include <systemd/sd-daemon.h>

Related post: Yocto Build Dependency on Debian Package

example.bb

DESCRIPTION = "Example Utilities"
LICENSE = "CLOSED"

inherit cmake systemd useradd

require common.inc

S = "${WORKDIR}/git/example-server"

DEPENDS = "simple-web-server boost sqlite3 libsystemd"
1 Answers

systemd/sd-daemon.h is provided by systemd recipe:

In image (${D}) folder there is:

$ tree usr/include/
usr/include/
├── libudev.h
└── systemd
    ├── sd-bus.h
    ├── sd-bus-protocol.h
    ├── sd-bus-vtable.h
    ├── _sd-common.h
    ├── sd-daemon.h    <======(Header file you are looking for)
    ├── sd-device.h
    ├── sd-event.h
    ├── sd-hwdb.h
    ├── sd-id128.h
    ├── sd-journal.h
    ├── sd-login.h
    └── sd-messages.h

Also, libsystemd is provided by systemd package, so change DEPENDS to:

DEPENDS = "simple-web-server boost sqlite3 systemd"
#                                           ^
#                                           |
# ===========================================
Related