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

**URL:** <https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865>\
**Category:** Linux\
**Created:** [August 23, 2017, 2:54pm UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865 "2017-08-23T14:54:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clemens500](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@Clemens500](https://forum.juce.com/u/Clemens500)\
**Post date:** [August 23, 2017, 2:54pm UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/1 "2017-08-23T14:54:16Z")

</div>

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 containing `webkit2gtk-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 containing `webkit2gtk-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.

---

<div class="post-metadata">

**Author:** ![MBO](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mbo/32/5045_2.png) [@MBO](https://forum.juce.com/u/MBO)\
**Post date:** [August 23, 2017, 3:41pm UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/2 "2017-08-23T15:41:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Clemens500](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@Clemens500](https://forum.juce.com/u/Clemens500)\
**Post date:** [August 23, 2017, 4:14pm UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/3 "2017-08-23T16:14:33Z")

</div>

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?) ?

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [August 24, 2017, 10:21am UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/4 "2017-08-24T10:21:03Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/a/af9fd8eb6768369c3e9df0ba04b0cc13bb321e14.png)

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.

---

<div class="post-metadata">

**Author:** ![Clemens500](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@Clemens500](https://forum.juce.com/u/Clemens500)\
**Post date:** [August 24, 2017, 11:38am UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/5 "2017-08-24T11:38:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [August 24, 2017, 11:40am UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/6 "2017-08-24T11:40:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Clemens500](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@Clemens500](https://forum.juce.com/u/Clemens500)\
**Post date:** [August 24, 2017, 12:04pm UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/7 "2017-08-24T12:04:26Z")

</div>

I will do that, thank you

---

<div class="post-metadata">

**Author:** ![ftonello](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ftonello/32/149_2.png) [@ftonello](https://forum.juce.com/u/ftonello)\
**Post date:** [September 1, 2017, 6:56pm UTC](https://forum.juce.com/t/yocto-bitbake-projucer-native-gives-pkg-config-error/23865/8 "2017-09-01T18:56:02Z")

</div>

I have replied to it [here](https://forum.juce.com/t/announcement-juce-support-for-embedded-linux/18625/12).
