Reputation: 115
I'm having an issue with a new bitbake recipe. My recipe depends on files produced by a net-snmp recipe from openembedded, but net-snmp doesn't seem to be building before trying to compile my recipe.
In my .bb file, I have:
DEPENDS = " \
net-snmp \
...
EXTRA_OEMAKE += " \
BINDIR=${STAGING_BINDIR} \
...
do_compile() {
oe_runmake foo
}
Then my makefile includes
CFLAGS=`${BINDIR}/net-snmp-config --cflags` ...
When I run bitbake foo, do_compile throws the error
/bin/sh: [some-path-to-net-snmp-config]: No such file or directory
If I check the staging directory, net-snmp-config is indeed missing. But if I then run bitbake -C compile net-snmp foo, foo builds successfully, and net-snmp-config is in the staging directory.
What am I doing wrong here?
Edit: I've just noticed that even if foo builds successfully, net-snmp is suspiciously absent from my final rootfs image. If I add RDEPENDS="net-snmp" to my recipe, I get the error:
satisfy_dependencies_for: Cannot satisfy the following dependencies for packagegroup-core-boot:
| * net-snmp *
Upvotes: 0
Views: 777
Reputation: 115
I think I found the solution. Based on this blog entry, I added the line
do_compile[depends] += "net-snmp:do_install"
Now my recipe builds successfully every time.
I was also trying to use RDEPENDS incorrectly. Since net-snmp outputs several packages, I needed to specify the individual packages in RDEPENDS in order to include them in my final build.
Upvotes: 0