[yocto] can't find libudev.h

Derek Dresser dresser.net at gmail.com
Fri Mar 15 09:58:54 PDT 2019

Hello,  I am trying to build a recipe that has a header dependency on
libudev.h.  I have added a

DEPENDS += "systemd"

because it looks like systemd provides libudev, but I continue to get the
following error:

   hid.c:44:21: fatal error: libudev.h: No such file or directory

This is what a find shows:

find /build -name libudev.h 2>/dev/null

Any thoughts on how to resolve or troubleshoot this are appreciated.
Recipe and full error message are below.


SRC_URI = "\
git at git.bitbucket.is.company.com/abc/abc.git;protocol=ssh;destsuffix=abc;name=abc
git at git.bitbucket.is.company.com/abc/sequencer.git;protocol=ssh;destsuffix=abc/sequencer;name=sequencer

# Modify these as desired
#PV = "1.0+git${SRCPV}"
PV = "0.1"
SRCREV_default = "${AUTOREV}"
SRCREV_sequencer = "${AUTOREV}"

DEPENDS += "systemd"
RDEPENDS_${PN} += "systemd"

S = "${WORKDIR}/abc"

# NOTE: this is a Makefile-only piece of software, so we cannot generate
much of the
# recipe automatically - you will need to examine the Makefile yourself and
# that the appropriate arguments are passed in.

do_patch[noexec] = "1"

do_configure () {
        # Specify any needed configure commands here

do_compile () {
        # You will almost certainly need to add additional arguments here

do_install () {
        # NOTE: unable to determine what to put here - there is a Makefile
but no
        # target named "install", so you will need to define this yourself

Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 72
| cd MCP2210-Library; make CXXFLAGS=-fPIC CFLAGS=-fPIC all
| make[1]: Entering directory
| for CONF in Debug Release ; \
| do \
|     "make" -f nbproject/Makefile-${CONF}.mk QMAKE= SUBPROJECTS=
.build-conf; \
| done
| make[2]: Entering directory
| "make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/hidusbtest
| make[3]: Entering directory
| mkdir -p build/Debug/GNU-Linux-x86
| rm -f build/Debug/GNU-Linux-x86/hid.o.d
| gcc -fPIC   -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/hid.o.d -o
build/Debug/GNU-Linux-x86/hid.o hid.c
| hid.c:44:21: fatal error: libudev.h: No such file or directory
| compilation terminated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190315/4192dad1/attachment.html>

More information about the yocto mailing list