Sorry for the code dump...
-
@Straticah I built HISE again after @Christoph-Hart's post three above. I think commit 6971948 may have addressed enough of what I was seeing to allow successful plug-in builds again. What I'm building is just a learning project, though, focused on whatever limited functionality I'm working through from the documentation or that I've found here in the forum. It doesn't have the breadth or depth of production dev.
Where I had build-failing errors before, I now have warnings instead:
[CleverCrow - Shared Code] Compiling include_hi_tools_03.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_dev/CodeEditorApiBase.cpp:728:24: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32' (aka 'unsigned int') [-Wshorten-64-to-32] 728 | return Colour(label.hash()).withSaturation(0.5).withBrightness(0.7f).withAlpha(1.0f); | ~~~~~~ ~~~~~~^~~~~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_dev/CodeEditorApiBase.cpp:1021:8: unused variable 'legend' [-Wunused-variable] 1021 | auto legend = b.removeFromTop(24); | ^~~~~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_dev/CodeEditorApiBase.cpp:1226:7: unused variable 'isBase64' [-Wunused-variable] 1226 | auto isBase64 = [](uint8 c) | ^~~~~~~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_dev/CodeEditorApiBase.cpp:1294:2: non-void function does not return a value [-Wreturn-type] 1294 | } | ^ [CleverCrow - Shared Code] Compiling include_hi_tools_02.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling include_hi_tools_01.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_standalone_components/ChocWebSocket.cpp:10:8: unused variable 'isBase64' [-Wunused-variable] 10 | auto isBase64 = [](uint8 c) | ^~~~~~~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_standalone_components/ChocWebSocket.cpp:70:8: unused variable 'ok' [-Wunused-variable] 70 | auto ok = socket->waitUntilReady(true, 3000); | ^~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_standalone_components/ChocWebSocket.cpp:260:14: unused variable 'fin' [-Wunused-variable] 260 | bool fin = firstByte & 0x80; // FIN bit | ^~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_standalone_components/ChocWebSocket.cpp:270:42: multiple unsequenced modifications to 'offset' [-Wunsequenced] 270 | payloadLength = (frame[offset++] << 8) | frame[offset++]; | ^ ~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_standalone_components/ChocWebSocket.cpp:278:39: multiple unsequenced modifications to 'offset' [-Wunsequenced] 278 | maskingKey = (frame[offset++] << 24) | | ^ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_standalone_components/ChocWebSocket.cpp:303:35: implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] 303 | int numValues = payload.size() / 4; | ~~~~~~~~~ ~~~~~~~~~~~~~~~^~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_tools/hi_standalone_components/ChocWebSocket.cpp:342:5: non-void function does not return a value in all control paths [-Wreturn-type] 342 | } | ^ [CleverCrow - Shared Code] Compiling include_hi_streaming.cpp [CleverCrow - Shared Code] Compiling include_hi_snex_62.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_snex/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling include_hi_snex_61.c [CleverCrow - Shared Code] Compiling include_hi_snex_60.c [CleverCrow - Shared Code] Compiling include_hi_snex.mm ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_snex/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling include_hi_scripting_04.cpp [CleverCrow - Shared Code] Compiling include_hi_scripting_03.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_scripting/../hi_core/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling include_hi_scripting_02.cpp [CleverCrow - Shared Code] Compiling include_hi_scripting_01.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_scripting/../hi_core/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_scripting/scripting/api/ScriptingApi.cpp:6824:8: unused variable 'dh' [-Wunused-variable] 6824 | auto& dh = getScriptProcessor()->getMainController_()->getDebugSession(); | ^~ [CleverCrow - Shared Code] Compiling include_hi_frontend.mm ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_frontend/../hi_core/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling include_hi_dsp_library_02.cpp [CleverCrow - Shared Code] Compiling include_hi_dsp_library_01.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling include_hi_core_05.cpp [CleverCrow - Shared Code] Compiling include_hi_core_04.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_core/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_core/hi_sampler/sampler/ComplexGroupManager.cpp:525:9: unused variable 'input' [-Wunused-variable] 525 | auto input = jlimit(0.0f, 1.0f, value); | ^~~~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_core/hi_sampler/sampler/ComplexGroupManager.cpp:532:9: unused variable 'input' [-Wunused-variable] 532 | auto input = jlimit(0.0f, 1.0f, values[0]); | ^~~~~ ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_core/hi_sampler/sampler/ComplexGroupManager.cpp:1264:17: loop variable 'l_' creates a copy from type 'juce::Identifier const' [-Wrange-loop-construct] 1264 | for(const auto l_: layerIds) | ^ [CleverCrow - Shared Code] Compiling include_hi_core_03.cpp [CleverCrow - Shared Code] Compiling include_hi_core_02.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_core/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling include_hi_core.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_core/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^ [CleverCrow - Shared Code] Compiling PresetData.cpp [CleverCrow - Shared Code] Compiling Plugin.cpp ⚠️ /Users/spears/Documents/Projects/HISE/BuildHise/HISE/hi_core/../hi_dsp_library/../hi_tools/mcl_editor/code_editor/TextEditor.hpp:343:12: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] 343 | return std::move(v); | ^
-
@Vitruvius But good to know it works on your end. :) will try a couple older commits and see if its solved to confirm the new one is still the issue.
-
@Straticah did you clean your build folder and resave the juicer file?
-
@Christoph-Hart Couple of new build errors
../../../../../HISE/hi_tools/hi_standalone_components/ChocWebView.cpp:681:16: error: invalid use of incomplete type ‘class choc::ui::WebView’ 681 | webView->navigate("");
../../../../../HISE/hi_tools/../hi_dsp_library/../hi_tools/../JUCE/modules/juce_core/memory/juce_ByteOrder.h:81:21: error: call of overloaded ‘swap(long unsigned int&)’ is ambiguous 81 | return swap (value);
../../../../../HISE/hi_tools/../hi_dsp_library/../hi_tools/../JUCE/modules/juce_core/memory/juce_ContainerDeletePolicy.h:52:23: error: invalid application of ‘sizeof’ to incomplete type ‘choc::ui::WebView’ 52 | ignoreUnused (sizeof (ObjectType)); | ^~~~~~~~~~~~~~~~~~~
-
@d-healey Alright, I've tried one last time to fix this, if it still doesn't compile now on Linux, I'll boot up the VM and have to check for myself.
-
@Christoph-Hart Time to dust off that VM
I thought these may be related to the gtk version I have, I installed the dev files for gtk2 and passed the paths along within Projucer but it didn't seem to affect the errors.
../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h: In static member function ‘static long unsigned int choc::ui::createJUCEWebViewHolder(choc::ui::WebView&)::Holder::getWindowID(choc::ui::WebView&)’: ../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:2034:25: error: ‘gtk_plug_new’ was not declared in this scope; did you mean ‘atk_plug_new’? 2034 | auto plug = gtk_plug_new (0); | ^~~~~~~~~~~~ | atk_plug_new ../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:2037:37: error: ‘GTK_PLUG’ was not declared in this scope; did you mean ‘ATK_PLUG’? 2037 | return gtk_plug_get_id (GTK_PLUG (plug)); | ^~~~~~~~ | ATK_PLUG ../../../../../HISE/hi_tools/hi_standalone_components/choc/gui/choc_webview.h:2037:20: error: ‘gtk_plug_get_id’ was not declared in this scope; did you mean ‘atk_plug_get_id’? 2037 | return gtk_plug_get_id (GTK_PLUG (plug)); | ^~~~~~~~~~~~~~~ | atk_plug_get_id
../../../../../HISE/hi_tools/../hi_dsp_library/../hi_tools/../JUCE/modules/juce_core/memory/juce_ByteOrder.h:81:21: error: call of overloaded ‘swap(long unsigned int&)’ is ambiguous 81 | return swap (value);
I've been testing with my fork and your changes merged, but just to be sure I tried your develop branch and I get the same errors.
Also you'll need to merge this before the develop branch will compile on Linux - https://github.com/christophhart/HISE/pull/669
-
@d-healey said in Sorry for the code dump...:
error: ‘gtk_plug_new’ was not declared in this scope; did you mean ‘atk_plug_new’?
alright, just spend an incredibly frustrating hour trying to compile this mess and it cannot find the correct libraries / headers for GTK. There's this hint in the webview code from choc:
- On Linux, you'll need to: 1. Install the libgtk-3-dev and libwebkit2gtk-4.1-dev packages. 2. Link the gtk+3.0 and webkit2gtk-4.1 libraries in your build. You might want to have a look inside choc/tests/CMakeLists.txt for an example of how to add those packages to your build without too much fuss.
I added those, but it kept throwing the same errors at me.
@d-healey maybe you're better at this, as it doesn't seem to be a C++ issue but more like a Linux library / build configuration problem. Even ChatGPT did send me around in circles (not the best advertisement for Vibe coding lol).
If not, I'm happy to revert the commit and reintroduce our friend
SorryDavid
... -
@Christoph-Hart said in Sorry for the code dump...:
but more like a Linux library / build configuration problem.
Yeah that's what I suspected before. I'll play around with it for a bit and see if I can figure it out.
-
@Christoph-Hart Na I can't figure it out. I'm including the correct libraries as shown in the choc/test/cmake file. It keeps saying
gtk_plug_new’ was not declared
which implies that it can't find gtk.h but I've tried including it in a number of places and the error persists.If you're out of ideas too then just roll back to the previous iteration, I'm not missing the webview anyway. I just want to get my hands on that new broadcaster bypass feature :)
-
@d-healey I would love to give this is a shot and get WebViews working on Linux. I have a product which is blocked because of that with some real cool features :))
How would I go about to debug this is the latest develop branch of HISE equipped with all features needed and we just need to link the library?
-
@oskarsh I think you should use the commit from around the time of this thread before Christoph reverted his attempts at getting it running on Linux.
-
the webview websocket stuff sounds super intriguing, was wondering about how to communicate with the webview if I were to use it. is this no longer in the develop branch at all, or is there documentation about it?
-
@thrice801 said in Sorry for the code dump...:
is this no longer in the develop branch at all
Only on Linux, for Windows and MacOS it's there and working, has been for a good while.
-
@d-healey ah sweet thanks
-
@Christoph-Hart don't know if this is helpful or how hard it would be to implement in HISE/C++ side, but, since you never got this running in linux: as an alternative to using websockets (and this would be my preferred way of communication if it were possible), you could potentially ust mqtt for communication. That's what I've done with a pretty large electron sound design app I made, and it works great for ipc and communication. (plus it's more reliable, faster, and cleaner because you have topic based message routing).
Basically main process just spins up an mqtt broker on launch, and then all my different webviews, and swift audio rendering processes, just connect to the main broker and use that for pub sub. Disadvantage would be people would have to include a lib like https://github.com/mqttjs in their webview, but it looks like you need to add a little code already anyways to get the comms working.