Yocto - "bitbake projucer-native" gives pkg-config error?

projucer

#1

Hi all,
I am trying to use yocto to build a linux distro for my raspberry pi 3 Juce project.
If I try to “bitbake projucer-native” I always get errors related to the pkg-config, as if some packages where missing.
If I try “pkg-config --list-all” it shows these packages (‘gtk±x11-3.0’ and 'webkit2gtk-4.0’ ) are there. (on my build machine, since it`s na native) I also compiled JUCE/Projucer successful before without yocto on my build machine using the installJUCE.sh script from the Forum.

Any ideas would be appreciated.
Thx, Clemens

➜ build bitbake projucer-native
NOTE: Starting bitbake server…
Parsing recipes: 100% |##########################################################################################################################################| Time: 0:00:38
Parsing of 2103 .bb files complete (0 cached, 2103 parsed). 2872 targets, 153 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.35.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "raspberrypi2"
DISTRO = "poky"
DISTRO_VERSION = "2.3"
TUNE_FEATURES = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU = "hard"
meta
meta-poky = "master:55bf88603927469de9aa9f6fd4d449230d2e61e3"
meta-multimedia
meta-oe
meta-networking
meta-python = "master:ac2a6d2b5d69937577effcb8bb2149651bac0176"
meta-raspberrypi = "master:1b589998f4e96a0d1576de42f1927d69482c9cb4"
meta-qt5 = "master:2940d8421579de855ce37e8a069911ce6968df38"
meta-juce = "master:c837187fd0fd726e885a446360200b8cf6c84d3d"
meta-xavier = "master:8f048bdf2b9bd673ddfd1c0437e84488646bc409"
meta-rpi = "pyro:1fc49af73e547a7f40084d40dee1d6b5b5be21a3"

Initialising tasks: 100% |#######################################################################################################################################| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: projucer-native-5.0.1-r0 do_compile: oe_runmake failed
ERROR: projucer-native-5.0.1-r0 do_compile: Function failed: do_compile (log file is located at /home/clemens/rpi/build/tmp/work/x86_64-linux/projucer-native/5.0.1-r0/temp/log.do_compile.31423)
ERROR: Logfile of failure stored in: /home/clemens/rpi/build/tmp/work/x86_64-linux/projucer-native/5.0.1-r0/temp/log.do_compile.31423
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 12
| Package gtk±x11-3.0 was not found in the pkg-config search path.
| Perhaps you should add the directory containing gtk+-x11-3.0.pc' | to the PKG_CONFIG_PATH environment variable | No package 'gtk+-x11-3.0' found | Package webkit2gtk-4.0 was not found in the pkg-config search path. | Perhaps you should add the directory containingwebkit2gtk-4.0.pc’
| to the PKG_CONFIG_PATH environment variable
| No package ‘webkit2gtk-4.0’ found
| Package gtk±x11-3.0 was not found in the pkg-config search path.
| Perhaps you should add the directory containing gtk+-x11-3.0.pc' | to the PKG_CONFIG_PATH environment variable | No package 'gtk+-x11-3.0' found | Package webkit2gtk-4.0 was not found in the pkg-config search path. | Perhaps you should add the directory containingwebkit2gtk-4.0.pc’
| to the PKG_CONFIG_PATH environment variable

| No package ‘webkit2gtk-4.0’ found
| Makefile:422: recipe for target ‘check-pkg-config’ failed
| make: *** [check-pkg-config] Error 1
| make: *** Waiting for unfinished jobs…
| Compiling jucer_FileHelpers.cpp
| Compiling jucer_Icons.cpp
| Compiling jucer_MiscUtilities.cpp
| Compiling jucer_JucerTreeViewBase.cpp
| Compiling jucer_ProjucerLookAndFeel.cpp
| Compiling jucer_SlidingPanelComponent.cpp
| Compiling jucer_StoredSettings.cpp
| ERROR: oe_runmake failed
| WARNING: /home/clemens/rpi/build/tmp/work/x86_64-linux/projucer-native/5.0.1-r0/temp/run.do_compile.31423:1 exit 1 from ‘exit 1’
| ERROR: Function failed: do_compile (log file is located at /home/clemens/rpi/build/tmp/work/x86_64-linux/projucer-native/5.0.1-r0/temp/log.do_compile.31423)
ERROR: Task (/home/clemens/poky/meta-openembedded/meta-multimedia/recipes-multimedia/juce/projucer-native_git.bb:do_compile) failed with exit code '1’
NOTE: Tasks Summary: Attempted 377 tasks of which 376 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/clemens/poky/meta-openembedded/meta-multimedia/recipes-multimedia/juce/projucer-native_git.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.


[Announcement] JUCE support for Embedded Linux
#2

It seems there is no ‘gtk±x11-3.0’ installed as well as 'webkit2gtk-4.0’
Maybe just try to install them again?

I had similar problem to get working the software under Yocto which uses this webkit2gtk-4.0. AFAIR the webkit was not neccessary in JUCE 4. I have no time to investigate it, so I just removed the modules from my software referring to the webkit package when compiling with JUCE 5.


#3

Yes. I know it seems like this. But I successfully installed JUCE 5 with the install script (and it has the same dependencies, right?)
Also “pkg-config --list-all” gives me a list of all pkg-config-packages and ‘gtk±x11-3.0’ as well as 'webkit2gtk-4.0’ are in this list.

The Problem could be something with the pkg-config, since in yocto you seem to have 2 pkg configs (one for the target an one for the host). But I dont know how to handle those.

Has anybody successfully used yocto to build a Juce 5 image (which automatically bitbakes projucer-native, right?) ?


#4

I’m not an expert with Yocto so this may be completely irrelevant to your problem:

JUCE’s WebComponent needs webkit2gtk-4.0 and gtk-x11-3.0, if your project is not using the WebComponent you can disable it which will remove the dependency. You can do this in two ways:

  1. Remove the juce_gui_extra module from your project. This will remove any other things that are also in the juce_gui_extra module.

  2. Or disable JUCE_WEB_BROWSER in the Projucer:
    31

However, the Projucer does use the WebComponent so you will need those dependencies on your build machine (not the target) so that you can build the Projucer.


#5

Thanks, but I think the problem ist that as soon as you want to bitbake any juce-recipe (even without WebComponent), yocto tries to install the projucer on the build machine (thats what the “native” in “projucer-native” stands for.
So the problem seems to be with the build machine configuration.

So maybe:

  • pkg-config or pkg-config-wrapper is faulty : Since yocto needs 2 different pkg-config-configurations, one for target and one for build machine. But for the build machine only webkit2gtk-4.0 and gtk-x11-3.0 are missing so far, all others seem to work? I got gtk-x11-3.0.pc and webkit2gtk-4.0.pc file in /usr/lib/x86_64-linux-gnu/pkgconfig but the PKG_CONFIG_PATH- environment variable doesn’t seem to apply to the yocto - native/build machine pkg-config.

  • since for example gtk-x11-3.0 seems to be missing on the build machine to compile the projucer-native maybe I would need to add something like gtk+3-native to the recipe. But nothing provides this.


#6

Sorry this is beyond me, but I believe that @ftonello wrote the original yocto recipes. Maybe you can send him a pm?


#7

I will do that, thank you


#8

I have replied to it here.