7

I'm building yocto image and a newbie for this. I'm having an error when I type bitbake piflo command (piflo is my image name) like shown figure below:

oe_runmake failed with do_compile

It says ERROR: batctl-2017.1-r0 do_compile: oe_runmake failed and also says pkg-config not found. from makefile.

I found some solutions from web and tried, but it gave me same error as figure above. It was building OK but after getting new batctl and batman-adv it fails building.

Does anybody have an idea for this? Please help me out here.

If needs more information or code, I will EDIT.

Thanks in advance.

paulc1111
  • 631
  • 3
  • 14
  • 32

2 Answers2

6

Sounds like a broken package. First things first, try cleaning it and rebuilding

bitbake -c cleanall batctl  
bitbake -c cleanall batman-adv  
bitbake batman-adv  
bitbake batctl

Also, do you actually need those packages? If not just remove them by adding to your local.conf

IMAGE_INSTALL_remove = " batctl batman-adv "
metamorphling
  • 369
  • 3
  • 9
  • Thank you for answering my question. I need those packages actually.. :'( I tried what you wrote in answer, and `bitbake batman-adv` went through well but `bitbake batctl` gave me same error like figure in my question... :'( – paulc1111 Jun 23 '17 at 05:18
  • The "pkg-config not found" looks suspicious. Do you have it installed on your system? Try to call pkg-config from command line. – metamorphling Jun 23 '17 at 05:31
  • Hm.. you mean like `IMAGE_INSTALL += "pkg-config"`?? – paulc1111 Jun 23 '17 at 06:02
  • Nope, the host machine. bb recipe on do_compile step usually calls "make" or "oe_runmake", so it just executes makefile. In source code I see PKG_CONFIG = pkg-config ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),) $(error $(PKG_CONFIG) not found) endif which implies your build system(pc I assume) may not have pkg-config installed. – metamorphling Jun 23 '17 at 06:14
  • Hmm.. I see. When I type `pkg-config --help` or `--version` it shows me version as `0.29.1` – paulc1111 Jun 23 '17 at 06:41
  • Isn't that mean pkg-config is installed?? :) – paulc1111 Jun 23 '17 at 06:47
  • Yocto does not use host pkg-config so that's not the issue. "inherit pkgconfig" in the broken recipe might help it find the yocto pkg-config . – Jussi Kukkonen Jun 23 '17 at 06:49
  • Wow, that's strange. Makefile checks if "which pkg-config" command returns path to binary, if not it's assumed you don't have it on your system and failure occurs. As a dirty hack you can comment out lines 62-67 and check if it helps. – metamorphling Jun 23 '17 at 06:49
  • 2
    @jku @metamorphling Thanks for all the replies I figured out what I was wrong, From bb file, originally I wrote like `DEPENDS = "libnl"` only, but after I change that to `DEPENDS = "libnl pkgconfig-native"` it went thorough OK! :D Thanks alot for helping me out guys! – paulc1111 Jun 23 '17 at 08:11
2

Yes, like you just found out, you need to add pkg-config to your recipe's DEPENDS.

In earlier OpenEmbedded (Yocto) it often worked out anyway, as some other recipe had pkg-config in its DEPENDS. However, from the Pyro release, each recipe gets it's own sysroot; thus, you have to explicitly add everything that the recipe needs to it's DEPENDS. This is done to improve determinism in the builds.

Anders
  • 8,541
  • 1
  • 27
  • 34