Unable to build project on linux only


#1

Hi,

I’m unable to build my project on Linux mint.

It was generally not finding freetype, gtk, glib etc so I added them all to the header search path in projucer.

…/…/…/…/modules/juce_graphics/juce_graphics.cpp:95:12: fatal error: ‘ft2build.h’ file not found
#include <ft2build.h>

After getting them all in place, I’m now getting the error below, any ideas?

Compiling include_juce_gui_extra.cpp
In file included from …/…/JuceLibraryCode/modules/juce_gui_extra/juce_gui_extra.cpp:150:0,
from …/…/JuceLibraryCode/include_juce_gui_extra.cpp:9:
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:279:24: error: ‘WebKitNavigationAction’ has not been declared
WebKitNavigationAction* action,
^
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:300:23: error: ‘WebKitNavigationAction’ has not been declared
WebKitNavigationAction* action,
^
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp: In member function ‘int juce::GtkChildProcess::entry()’:
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:183:79: error: ‘webkit_web_view_new_with_settings’ was not declared in this scope
GtkWidget* webviewWidget = webkit_web_view_new_with_settings (settings);
^
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp: In member function ‘bool juce::GtkChildProcess::onNavigation(juce::String, int*, WebKitPolicyDecision*)’:
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:289:121: error: ‘webkit_navigation_action_get_request’ was not declared in this scope
params->setProperty (“url”, String (webkit_uri_request_get_uri (webkit_navigation_action_get_request (action))));
^
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp: In member function ‘bool juce::GtkChildProcess::onNewWindow(juce::String, int*, WebKitPolicyDecision*)’:
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:307:121: error: ‘webkit_navigation_action_get_request’ was not declared in this scope
params->setProperty (“url”, String (webkit_uri_request_get_uri (webkit_navigation_action_get_request (action))));
^
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp: In member function ‘bool juce::GtkChildProcess::onDecidePolicy(WebKitPolicyDecision*, WebKitPolicyDecisionType)’:
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:341:113: error: ‘webkit_navigation_policy_decision_get_navigation_action’ was not declared in this scope
webkit_navigation_policy_decision_get_navigation_action (navigationDecision),
^
…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:351:113: error: ‘webkit_navigation_policy_decision_get_navigation_action’ was not declared in this scope
webkit_navigation_policy_decision_get_navigation_action (navigationDecision),
^
Makefile:181: recipe for target ‘build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o’ failed
make: *** [build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o] Error 1

I tried the two approaches to no avail:



#2

I tried upgrading to webkit to libwebkit2gtk-4.0-dev with this output:

Compiling sqlite3.c
Compiling PluginWindow.cpp
Compiling PluginCache.cpp
Compiling VstSampler.cpp
Compiling MainComponent.cpp
Compiling Main.cpp
Compiling include_juce_audio_basics.cpp
Compiling include_juce_audio_devices.cpp
Compiling include_juce_audio_formats.cpp
Compiling include_juce_audio_processors.cpp
Compiling include_juce_core.cpp
Compiling include_juce_cryptography.cpp
Compiling include_juce_data_structures.cpp
Compiling include_juce_events.cpp
Compiling include_juce_graphics.cpp
Compiling include_juce_gui_basics.cpp
Compiling include_juce_gui_extra.cpp
Compiling include_juce_opengl.cpp
Compiling include_juce_video.cpp
Linking GUI_VST - App
build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In function juce::GtkChildProcess::entry()': /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:165: undefined reference togtk_init’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:167: undefined reference to webkit_settings_new' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:179: undefined reference togtk_plug_new’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:181: undefined reference to gtk_scrolled_window_new' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:183: undefined reference towebkit_web_view_new_with_settings’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:184: undefined reference to webkit_web_view_get_type' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:184: undefined reference tog_type_check_instance_cast’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:187: undefined reference to gtk_container_get_type' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:187: undefined reference tog_type_check_instance_cast’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:187: undefined reference to gtk_container_add' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:188: undefined reference togtk_container_get_type’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:188: undefined reference to g_type_check_instance_cast' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:188: undefined reference togtk_container_add’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:190: undefined reference to webkit_web_view_load_uri' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:193: undefined reference tog_signal_connect_data’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:196: undefined reference to g_signal_connect_data' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:199: undefined reference tog_signal_connect_data’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:201: undefined reference to gtk_widget_show_all' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:202: undefined reference togtk_plug_get_type’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:202: undefined reference to g_type_check_instance_cast' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:202: undefined reference togtk_plug_get_id’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:211: undefined reference to g_unix_fd_add' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:214: undefined reference togtk_main’
build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In function juce::GtkChildProcess::goToURL(juce::var const&)': /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:223: undefined reference towebkit_web_view_load_uri’
build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In function juce::GtkChildProcess::handleDecisionResponse(juce::var const&)': /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:235: undefined reference towebkit_policy_decision_use’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:237: undefined reference to webkit_policy_decision_ignore' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:240: undefined reference tog_object_unref’
build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In function juce::GtkChildProcess::handleCommand(juce::String const&, juce::var const&)': /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:249: undefined reference towebkit_web_view_go_back’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:250: undefined reference to webkit_web_view_go_forward' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:251: undefined reference towebkit_web_view_reload’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:252: undefined reference to webkit_web_view_stop_loading' build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In functionjuce::GtkChildProcess::quit()’:
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:275: undefined reference to gtk_main_quit' build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In functionjuce::GtkChildProcess::onNavigation(juce::String, _WebKitNavigationAction*, _WebKitPolicyDecision*)’:
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:284: undefined reference to g_object_ref' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:289: undefined reference towebkit_navigation_action_get_request’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:289: undefined reference to webkit_uri_request_get_uri' build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In functionjuce::GtkChildProcess::onNewWindow(juce::String, _WebKitNavigationAction*, _WebKitPolicyDecision*)’:
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:307: undefined reference to webkit_navigation_action_get_request' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:307: undefined reference towebkit_uri_request_get_uri’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:311: undefined reference to webkit_policy_decision_ignore' build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In functionjuce::GtkChildProcess::onLoadChanged(WebKitLoadEvent)’:
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:325: undefined reference to webkit_web_view_get_uri' build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In functionjuce::GtkChildProcess::onDecidePolicy(_WebKitPolicyDecision*, WebKitPolicyDecisionType)’:
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:337: undefined reference to webkit_navigation_policy_decision_get_type' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:337: undefined reference tog_type_check_instance_cast’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:338: undefined reference to webkit_navigation_policy_decision_get_frame_name' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:340: undefined reference towebkit_navigation_policy_decision_get_navigation_action’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:347: undefined reference to webkit_navigation_policy_decision_get_type' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:347: undefined reference tog_type_check_instance_cast’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:348: undefined reference to webkit_navigation_policy_decision_get_frame_name' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:350: undefined reference towebkit_navigation_policy_decision_get_navigation_action’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:357: undefined reference to webkit_response_policy_decision_get_type' /home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/../../JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:357: undefined reference tog_type_check_instance_cast’
/home/caseybasichis/Prog/black_coffee/VSTsampler/Builds/Linux/…/…/JuceLibraryCode/modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp:361: undefined reference to `webkit_policy_decision_use’
collect2: error: ld returned 1 exit status
Makefile:94: recipe for target ‘build/GUI_VST’ failed
make: *** [build/GUI_VST] Error 1


#3

They are linker errors - I suspect that your project has included the correct header files but the final linking step isn’t picking up the correct webkit library.

Doing make V=1 will show you the link command.


#4

hi t0m,

It seems x11r6 may be the issue? sudo apt-get install libx11-dev reports that it’s already installed but it’s not present in /usr/

Does that look like the issue? Any ideas what I might do?

Linking GUI_VST - App
mkdir -p build
mkdir -p build
mkdir -p build
g++ -o build/GUI_VST build/intermediate/Debug/sqlite3_a6cd1aa8.o build/intermediate/Debug/PluginWindow_609dbc0c.o build/intermediate/Debug/PluginCache_310dd2f0.o build/intermediate/Debug/VstSampler_e1ae03ba.o build/intermediate/Debug/MainComponent_a6ffb4a5.o build/intermediate/Debug/Main_90ebc5c2.o build/intermediate/Debug/include_juce_audio_basics_8a4e984a.o build/intermediate/Debug/include_juce_audio_devices_63111d02.o build/intermediate/Debug/include_juce_audio_formats_15f82001.o build/intermediate/Debug/include_juce_audio_processors_10c03666.o build/intermediate/Debug/include_juce_core_f26d17db.o build/intermediate/Debug/include_juce_cryptography_8cb807a8.o build/intermediate/Debug/include_juce_data_structures_7471b1e3.o build/intermediate/Debug/include_juce_events_fd7d695.o build/intermediate/Debug/include_juce_graphics_f817e147.o build/intermediate/Debug/include_juce_gui_basics_e3f79785.o build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o build/intermediate/Debug/include_juce_opengl_a8a032b.o build/intermediate/Debug/include_juce_video_be78589.o -march=native -Lbuild -Lbuild -L/usr/X11R6/lib/ -lasound -lfreetype -lcurl -lX11 -lXext -lXinerama -lGL -ldl -lpthread -lrt -march=native
build/intermediate/Debug/include_juce_gui_extra_6dee1c1a.o: In function `juce::GtkChildProcess::entry()’:

locate x11r6 shows:

/usr/lib/x86_64-linux-gnu/X11/rstart/commands/x11r6
/usr/lib/x86_64-linux-gnu/X11/rstart/commands/x11r6/@List
/usr/lib/x86_64-linux-gnu/X11/rstart/commands/x11r6/LoadMonitor
/usr/lib/x86_64-linux-gnu/X11/rstart/commands/x11r6/Terminal
/usr/lib/x86_64-linux-gnu/X11/rstart/contexts/x11r6


#5

My link line includes -lwebkit2gtk-4.0 -lgtk-3, which is generated from a pkg-config --libs alsa freetype2 libcurl x11 xext xinerama webkit2gtk-4.0 gtk+-x11-3.0 command. It looks like pkg-config isn’t adding those libraries.


#6

I’m up and running!

Removing the explicit lib search path for /usr/x11r6 allowed it to build.

The long manual list of dependencies was still needed. Oddly pkg-config seems to find the libs:

pkg-config --cflags freetype2
-I/usr/include/freetype2

Thanks for your help. Seeing the linker list really put me onto a solution.