[yocto] How to add libudev.h

Fred Ollinger Fred.Ollinger at seescan.com
Thu Nov 3 09:49:06 PDT 2016

I belive this goes in your .bb file:

DEPENDS = "             \
    udev         \

RDEPENDS_${PN} = "         \
    udev         \

Also, you probably need the right flags for libudev.

Here are docs on that:


Of course, you need to tailor your build system to use these and incorporate this into your project.

I like automake so here's how to use pkgconfig with automake:


NOTE: systemd also provides libudev so if you have systemd, it's likely getting installed there and conflicts with udev, but I'm not sure, so you want to look into this as well. When I installed source for my debian jessie, I got systemd, and not udev sources. YMMV.


From: yocto-bounces at yoctoproject.org <yocto-bounces at yoctoproject.org> on behalf of mickael <m.le-stephan at laposte.net>
Sent: Thursday, November 3, 2016 4:55 AM
To: yocto at yoctoproject.org
Subject: [yocto]  How to add libudev.h

Hi all, i need to build a lib --> openZwave (on a imx6 card) libudev.h.
I have this error during the build :
/home/root/openzwave-1.4.164/cpp/hidapi/linux/hid.c:44:21: fatal error:
libudev.h: No such file or directory
I have tried to add udev to my local.conf but this not resolve the problem.
How i can add it to my build please ?
yocto mailing list
yocto at yoctoproject.org

More information about the yocto mailing list