Missing "webkit2gtk-4.0" package when compiling for ARM architecture

Hello. I’m trying to cross-compile plugins for the ELK platform, using JUCE v6.0.7 directly under Linux Mint.
Compiling for x86_64 works without any issues. But when configuring toolchain for ARM build, using SDK 0.9.0 for RPi4 64 bit , incl. performing source environment-setup-aarch64-elk-linux, i always get the same warning when executing the JUCE makefile:
“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”

During the following VST build, an error is thrown when compiling “include_juce_graphics.cpp” due to missing <ft2build.h> file: No such file or directory.

I searched and found webkit2gtk-4.0 packets under “/usr/lib/x86_64-linux-gnu/pkgconfig” folder and successfully added them to the PKG_CONFIG_PATH variable by manipulating the environment setup script, but build is still breaking with the same error message.
Any suggestions what i should try next? Thx in advance!

Hi Tschem and welcome to the forums. The fact that it tries to include “include_juce_graphics.cpp” suggests that you are compiling the plugin with an editor and not in a headless version, as required by Elk. webkit2gtk is not included in the RPI4 images for Elk, and thus not included in the SDK and the recommended way is to not depend on those libraries in the plugin built for elk.

As you’re using JUCE 6, you should be able to use the headless build option in JUCE. See this link for more info:


1 Like

Hi Gustav! thx for the warm welcome and the quick response. Finally i’ve managed to compile to ARM arch. by executing make CONFIG=Release CFLAGS="DJUCE_HEADLESS_PLUGIN_CLIENT=1"
Stupid me, i thought the flag was just needed for the ELK JUCE 5.4.x fork! :man_facepalming:

One last question: the VST3 plugin is created into a subfolder structure “Contents/x86_64-linux”. But i guess, this is wrong and i can expect a build for aarch64, right?
Thx a lot!

1 Like

HI @Tschem,
yes that is currently an issue due to JUCE using an older version of the VST3 SDK internally.

At the moment you should be able to run the plugin by simply renaming that folder as you guessed.


Sorry for the annoyance! I was a bit hasty in my previous reply, it seems that i ran the wrong session from another terminal, compiling for x86 again. :sweat:
Cross-compiling for ARM still does not work. After running the environment setup script, i browse to the JUCE makefile and run AR=aarch64-elk-linux-ar make -jnproc CONFIG=Release CFLAGS="-DJUCE_HEADLESS_PLUGIN_CLIENT=1 -Wno-psabi" TARGET_ARCH="-mcpu=cortex-a72 -mtune=cortex-a72". Still i get the “missing webkit2gtk-4.0” error.
Unsetting CC & CXX environment variable, as suggsted here leads to cc1plus: error: bad value (‘cortex-a72’) for ‘-mtune=’ switch error.
What am i missing?

Finally managed to compile to aarch. i did not disable the option for JUCE Browser under the module juce_gui_extra as suggested in build manual. After that it worked flawlessly. Thx for the support


Hi @Tschem,
sorry I actually tried to build some projects yesterday but I had to fix a few things in my setup :frowning:

Great that it worked for you, indeed we only tried JUCE 6 with CMake previously. The -DJUCE_HEADLESS_PLUGIN_CLIENT=1 option shouldn’t be needed anymore with JUCE 6, too.

1 Like