Linux projucer ? do i need to "build" it for UBUNTU?

Hi sorry can I use the projucer under linux ?
I have an Ubuntu 20.04.1 LTS
partition

I downloaded the latest version of JUCE
Instructions seemed vague I couldn’t seem to open a “projucer” gui.

Saw something about building it . Headed to builds and type “make” and it blew up like this

seanw@seanw-Legion-Y530-15ICH:~/Desktop/JUCE/extras/Projucer/Builds/LinuxMakefile$ make
Compiling jucer_NewProjectWizard.cpp
Compiling jucer_StartPageComponent.cpp
Compiling jucer_AutoUpdater.cpp
Compiling jucer_CommandLine.cpp
Compiling jucer_Main.cpp
Compiling jucer_MainWindow.cpp
Compiling jucer_DocumentEditorComponent.cpp
Compiling jucer_OpenDocumentManager.cpp
Compiling jucer_SourceCodeEditor.cpp
Compiling jucer_Modules.cpp
Compiling jucer_HeaderComponent.cpp
Compiling jucer_Project.cpp
Compiling jucer_ProjectExporter.cpp
Compiling jucer_ProjectSaver.cpp
Compiling jucer_ResourceFile.cpp
Compiling jucer_AppearanceSettings.cpp
Compiling jucer_StoredSettings.cpp
Compiling jucer_CodeHelpers.cpp
Compiling jucer_FileHelpers.cpp
Compiling jucer_MiscUtilities.cpp
Compiling jucer_NewFileWizard.cpp
Compiling jucer_VersionInfo.cpp
Compiling jucer_PIPGenerator.cpp
Compiling jucer_Icons.cpp
Compiling jucer_JucerTreeViewBase.cpp
Compiling jucer_ProjucerLookAndFeel.cpp
Compiling jucer_SlidingPanelComponent.cpp
Compiling BinaryData.cpp
Compiling include_juce_build_tools.cpp
Compiling include_juce_core.cpp
Compiling include_juce_core_CompilationTime.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_graphics_Harfbuzz.cpp
In file included from ../../../../modules/juce_graphics/juce_graphics_Harfbuzz.cpp:90,
                 from ../../JuceLibraryCode/include_juce_graphics_Harfbuzz.cpp:8:
/usr/include/c++/9/utility:308:22: error: ‘__make_integer_seq’ does not name a type
  308 |       using __type = __make_integer_seq<_IdxTuple, size_t, _Num>;
      |                      ^~~~~~~~~~~~~~~~~~
/usr/include/c++/9/utility:330:9: error: ‘__make_integer_seq’ does not name a type
  330 |       = __make_integer_seq<integer_sequence, _Tp, _Num>;
      |         ^~~~~~~~~~~~~~~~~~
/usr/include/c++/9/utility:343:33: error: ‘make_integer_sequence’ does not name a type; did you mean ‘integer_sequence’?
  343 |     using make_index_sequence = make_integer_sequence<size_t, _Num>;
      |                                 ^~~~~~~~~~~~~~~~~~~~~
      |                                 integer_sequence
/usr/include/c++/9/utility:347:32: error: ‘make_index_sequence’ does not name a type; did you mean ‘index_sequence’?
  347 |     using index_sequence_for = make_index_sequence<sizeof...(_Types)>;
      |                                ^~~~~~~~~~~~~~~~~~~
      |                                index_sequence
In file included from /usr/include/c++/9/functional:54,
                 from ../../../../modules/juce_graphics/fonts/harfbuzz/hb-cplusplus.hh:32,
                 from ../../../../modules/juce_graphics/fonts/harfbuzz/hb.hh:542,
                 from ../../../../modules/juce_graphics/juce_graphics_Harfbuzz.cpp:91,
                 from ../../JuceLibraryCode/include_juce_graphics_Harfbuzz.cpp:8:
/usr/include/c++/9/tuple: In function ‘constexpr decltype(auto) std::apply(_Fn&&, _Tuple&&)’:
/usr/include/c++/9/tuple:1693:4: error: ‘make_index_sequence’ does not name a type; did you mean ‘index_sequence’?
 1693 |  = make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>;
      |    ^~~~~~~~~~~~~~~~~~~
      |    index_sequence
/usr/include/c++/9/tuple:1696:11: error: ‘_Indices’ was not declared in this scope
 1696 |           _Indices{});
      |           ^~~~~~~~
/usr/include/c++/9/tuple: In function ‘constexpr _Tp std::make_from_tuple(_Tuple&&)’:
/usr/include/c++/9/tuple:1712:2: error: ‘make_index_sequence’ was not declared in this scope; did you mean ‘index_sequence’?
 1712 |  make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>{});
      |  ^~~~~~~~~~~~~~~~~~~
      |  index_sequence
/usr/include/c++/9/tuple:1712:63: error: expected primary-expression before ‘{’ token
 1712 |  make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>{});
      |                                                               ^
/usr/include/c++/9/tuple:1712:63: error: expected ‘)’ before ‘{’ token
 1712 |  make_index_sequence<tuple_size_v<remove_reference_t<_Tuple>>>{});
      |                                                               ^
      |                                                               )
/usr/include/c++/9/tuple:1710:41: note: to match this ‘(’
 1710 |       return __make_from_tuple_impl<_Tp>(
      |                                         ^
make: *** [Makefile:306: build/intermediate/Debug/include_juce_graphics_Harfbuzz_60c52ba2.o] Error 1

I am trying to create a linux makefile for this funny old chorus thing

I managed to do this a couple of years back don’t remember how :slight_smile:

Thanks for you help if anyone knows what to do in 2024.

Did you clone the repo or download a .zip file?

My advice:

  1. Clone the JUCE repo, submodule init --recursive, etc.
  2. Checkout JUCE tag 7.0.12
  3. Build Projucer as above

I’m not convinced that Ubuntu/Linux support on JUCE 8.0.4 is as tested as it should be, but I have had results building 7.0.12.

Get this far, and then we’ll have some further clues as to what is going on - and where possible, on Linux at least for now, try to use the stable releases of JUCE in lieu of JCUE-develop, which is where the team are moving fast and breaking things …

1 Like

This looks like a bug (?) in gcc or harfbuzz that prevents JUCE from building with specific versions of gcc. I recommend installing another version of gcc using apt install (e.g. gcc-7 or gcc-12) and using that instead. When building, you’ll need to invoke make like so, replacing 7 with the version of gcc you installed.
CC=gcc-7 CXX=g++-7 make

1 Like

thanks all ! I think it’s working. checking out the 7.0.12 tag seemed to do the trick and it then compiled with make.

Compiling include_juce_gui_basics.cpp
Compiling include_juce_gui_extra.cpp
Linking Projucer - App
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile$ git status
HEAD detached at 7.0.12
nothing to commit, working tree clean
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile$ ^C
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile$ ls
build  Makefile
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile$ cd build
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ ls
intermediate  Projucer
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ cd Projucer
bash: cd: Projucer: Not a directory
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ ./Projucer
JUCE v7.0.12

**********************************************************
Projucer 7.0.12  ---  Build date: Dec 10 2024
Log started: 10 Dec 2024 10:34:01pm

Linux
CPU: 2600MHz  Cores: 12  15919MB
Shutdown
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ ls
intermediate  Projucer
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ ^C
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ 
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ ^C
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ ^C
seanw@seanw-Legion-Y530-15ICH:~/Desktop/juce_git/extras/Projucer/Builds/LinuxMakefile/build$ 

still going here excuse my verbosity. I see the linux makefile was created when saved under OSX.
I had to edit the make file and change the path to JUCE .
now its building and crashing

seanw@seanw-Legion-Y530-15ICH:~/Desktop/waylosynth2-main/Builds/LinuxMakefile$ make
Compiling include_juce_audio_plugin_client_LV2.cpp
Compiling ADSR.cpp
Compiling AttackDecayEnvelope.cpp
Compiling CheapLFO.cpp
Compiling Crossfade.cpp
Compiling DcBlock.cpp
Compiling Filters.cpp
Compiling Oscillator.cpp
In file included from ../../Source/Oscillator.h:4,
                 from ../../Source/Oscillator.cpp:4:
../../Source/../JuceLibraryCode/JuceHeader.h:41:3: error: #error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
   41 |  #error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
      |   ^~~~~
make: *** [Makefile:224: build/intermediate/Debug/Oscillator_8a6cfe29.o] Error 1
seanw@seanw-Legion-Y530-15ICH:~/Desktop/waylosynth2-main/Builds/LinuxMakefile$ 

thats a weird error because I believe in OSX I had the latest version of projucer

If you search your Makefile for JUCE_PROJUCER_VERSION what does it show?

1 Like

JUCE_PROJUCER_VERSION is 0x7000c

I built the projucer and opened the JUCER built on osx but when you save on linux it didnt rebuild the linux makefile. Why not ?

I will try targeting the old version of JUCE on OSX as well

So I checked out the same JUCE version on the OSX machine. I opened the plugin jucer using the projucer version 7.0.12 that I had checked out. I deleted the linuxmakefile directory. “make clean” didnt work to well on the mac.
Then I uploaded the new make file to github by hand and pulled on the linux machine then this happened with a new make command.

seanw@seanw-Legion-Y530-15ICH:~/Desktop/waylochorus2-main/waylochorus2/waylochorus2/Builds/LinuxMakefile$ make
Compiling PluginProcessor.cpp
Compiling PluginEditor.cpp
../../Source/PluginEditor.cpp: In member function ‘virtual void Waylochorus2AudioProcessorEditor::paint(juce::Graphics&)’:
../../Source/PluginEditor.cpp:32:22: error: ‘FontOptions’ is not a member of ‘juce’
   32 |     g.setFont (juce::FontOptions (15.0f));
      |                      ^~~~~~~~~~~
make: *** [Makefile:183: build/intermediate/Debug/PluginEditor_94d4fb09.o] Error 1

At least I got to see a different error message today.
Not sure where to go from here.
Its not possible to build a makefile completely in linux using the projucer in Linux or away from OSX ? You have to build a makefile under OSX then run it on Linux ? Thats like using XCODE to build a Csharp program. I could open a projucer under linux but it didnt seem to do much I don’t quite see the point.

juce::FontOptions is introduced in JUCE 8.

BTW, I would suggest keeping JUCE as a submodule and using CMake to build plugins. The template pamplejuce might help.

1 Like

If you want to have a good time with JUCE, use Projucer only so far as you need to go, to get a working CMake (or use FRUT to build one), then refine your CMake chops.

Of course you can use Projucer to make targets for development, and worry about the CMake thing later.

But, in the end, all good cross-platform multi-format roads lead to CMake. Actually, once you do it for Linux you’ll want to do it for OSX (and iOS) and Windows too, so … if you bite this chew, make your first CMake on Linux and then port it …

Completely agree with you. In fact, making tracktion_engine the front-door for a JUCE application is also kind of productive, if you want what te:: gives (which is, a lot..)

For a general plugin intended to be delivered on all the build harnesses available, its still a good idea to at least have a modules/JUCE folder hierarchy, a la te:: .. just saying ..

Still not having much luck with this using make.

sean@ubuntu:~/Desktop/waylochorus_zynthian/Builds/LinuxMakefile$ make clean
Cleaning waylochorus2
sean@ubuntu:~/Desktop/waylochorus_zynthian/Builds/LinuxMakefile$ make
Compiling include_juce_audio_plugin_client_VST3.cpp
../../JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp:8:10: fatal error: juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp: No such file or directory
    8 | #include <juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:194: build/intermediate/Debug/include_juce_audio_plugin_client_VST3_dd633589.o] Error 1
sean@ubuntu:~/Desktop/waylochorus_zynthian/Builds/LinuxMakefile$ 

I cloned this repo on an UBUNTU 24.04 virtual machine on my M2 macbook pro.

I install these dependencies

Did you do:

git submodule update --init --recursive

… in your JUCE folder?

no why would I do that ?
I cloned JUCE on my OSX machine. Then I checked out an old branch

seanwayland@MacBook-Air-de-sean JUCE % git status
HEAD detached at 7.0.4
nothing to commit, working tree clean
seanwayland@MacBook-Air-de-sean JUCE % 
commit 4e68af7fde8a0a64e808fb1a37999a690873c9de (HEAD, tag: 7.0.4)
Merge: 4791f28f7 a9b079df9
Author: Tom Poole <tom@juce.com>
Date:   Thu Jan 5 14:58:57 2023 +0000

    JUCE version 7.0.4

commit a9b079df9db085217defc1eb1f124ec2209f75a7
Author: Tom Poole <tom@juce.com>
Date:   Fri Nov 25 16:44:03 2022 +0000

    macOS: Handle unavailable Metal device
seanwayland@MacBook-Air-de-sean JUCE % 

After cloning I created a project using the projucer with a linux target only and saved it. That creates the jucelibrarycode which and the makefile which is in the git repo here

I cloned that repo on the Ubuntu virtual machine and Make generates that error.

This shows that you have a problem with your project setup and paths … at first I thought it meant you didn’t clone the JUCE sources fully, but I see now its more of a project organization issue:

Your copy of the Linux Makefile can’t find your JUCE sources.

This is really messy.

Try this simple CMake-based project, to be sure - this will properly set up JUCE as a submodule for your project. Make a testJUCEApp project somewhere:

$ mkdir -p testJUCEApp/Source

Then copy this CMakeLists.txt in your testJUCEApp/ directory:

cmake_minimum_required(VERSION 3.15)

project(testJUCEApp VERSION 1.0)

# JUCE Setup
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)

include(FetchContent)
FetchContent_Declare(
  juce
  GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
  GIT_TAG        master
)
FetchContent_MakeAvailable(juce)

# Add executable target
juce_add_gui_app(
  testJUCEApp
  PRODUCT_NAME "testJUCEApp"
)

# Add source files
target_sources(testJUCEApp
  PRIVATE
    Source/Main.cpp
    Source/MainComponent.cpp
)

# Link JUCE module
target_link_libraries(testJUCEApp
  PRIVATE
    juce::juce_gui_extra
)

Copy a Source/Main.cpp and Source/MainComponent.cpp from, for example, the $JUCE/examples/CMake/GuiApp directory, into your testJUCEApp/ folder …

Then do cd testJUCEApp/build; cmake .. to make sure you can actually build a JUCE based app.

Once you’ve completed this step you’ll know that your Ubuntu system can properly build JUCE as a module, with CMake … and you can work it out from there.

Your issues appears to be the result of an unconventional, or at least … messy … project/folder/module structure. The above CMakeLists.txt is as tidy a solution as you might find … when this builds successfully you can go to the build/_deps/juce-src/[extra,examples] folders, and attempt to build Projucer …

But please, take care. None of this is a problem with Ubuntu, so far …

Thanks for your help.
I don’t quite understand how “PampleJUCE” can “build an LV2 plugin under OSX” is that possible?
I went to my Ubuntu VM and using a modified version of your makefile I ran the cmake command. It didn’t seem to build an LV2 plugin just spat out loads of stuff and a makefile. Do I then need to debug a makefile and get that to work ? Why not just start with the makefile generated by the projucer ? Why add the extra CMAKE step when my goal is just to build a plugin that works on OSX and create an LV2 version. Not interested in a “cross platform” build or a CICD pipeline or Jenkins or github actions or any of that stuff. That sounds like my job in a bank :slight_smile: This is where I am at. The makefile generated from all this doesn’t work but the cmake command invoked like this succeeded and filled the build directory with stuff.

cmake -S "/home/sean/Desktop/testJUCEApp/Source" -B "/home/sean/Desktop/testJUCEApp/build"
sean@ubuntu:~/Desktop/testJUCEApp/build$ ls
CMakeCache.txt  CMakeFiles  cmake_install.cmake  _deps  Makefile  testJUCEApp_artefacts
sean@ubuntu:~/Desktop/testJUCEApp/build$ cd ..
sean@ubuntu:~/Desktop/testJUCEApp$ ls
build  Source
sean@ubuntu:~/Desktop/testJUCEApp$ ls -all Source
total 24
drwxrwxrwx 2 sean sean 4096 Dec 31 06:07 .
drwxrwxr-x 4 sean sean 4096 Dec 31 06:09 ..
-rwxrwxr-x 1 sean sean  597 Dec 31 06:07 CMakeLists.txt
-rwxrwxrwx 1 sean sean  869 Dec 31 05:57 MainComponent.cpp
-rwxrwxrwx 1 sean sean 4171 Dec 31 06:05 Main.cpp
sean@ubuntu:~/Desktop/testJUCEApp$ cat Source/CMakeLists.txt 
cmake_minimum_required(VERSION 3.15)

project(testJUCEApp VERSION 1.0)

# JUCE Setup
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)

include(FetchContent)
FetchContent_Declare(
  juce
  GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
  GIT_TAG        master
)
FetchContent_MakeAvailable(juce)

# Add executable target
juce_add_gui_app(
  testJUCEApp
  PRODUCT_NAME "testJUCEApp"
)

# Add source files
target_sources(testJUCEApp
  PRIVATE
    ./Main.cpp
    ./MainComponent.cpp
)

# Link JUCE module
target_link_libraries(testJUCEApp
  PRIVATE
    juce::juce_gui_extra
)

This is what happens if I head to “build” and try “make”

sean@ubuntu:~/Desktop/testJUCEApp/build$ ls
CMakeCache.txt  CMakeFiles  cmake_install.cmake  _deps  Makefile  testJUCEApp_artefacts
sean@ubuntu:~/Desktop/testJUCEApp/build$ make
[  8%] Building CXX object CMakeFiles/testJUCEApp.dir/Main.cpp.o
/home/sean/Desktop/testJUCEApp/Source/Main.cpp:1:10: fatal error: MainComponent.h: No such file or directory
    1 | #include "MainComponent.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/testJUCEApp.dir/build.make:76: CMakeFiles/testJUCEApp.dir/Main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/testJUCEApp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
sean@ubuntu:~/Desktop/testJUCEApp/build$ 

CMake and Projucer are both “project generators”—tools that take a description of a project and generate a suitable build system for it. For example, Projucer can generate a Makefile for Linux and an Xcode project for macOS.

The issue arises when something changes after these build systems are created. For instance, the path to the JUCE codebase might have been moved or updated. In such cases, you’ll typically need to re-run Projucer to regenerate the build systems with the correct settings. While it’s possible to manually modify the Makefile, doing so can be risky. Makefiles are notoriously rigid and prone to subtle errors, especially when they’ve been machine-generated, as is the case with Projucer.

CMake provides a build-system-agnostic approach, allowing you to build your project on various platforms. Our CMake support is pretty fantastic (I can say this, I didn’t implement it), and it’s the recommended build system tool.

Although using CMake might feel like extra “administration” work, it will save you countless hours of troubleshooting in the long run. C++ build systems can be staggeringly complicated, and CMake simplifies much of that complexity.

To help, I’ve converted the Projucer project file into a CMakeLists.txt configuration file. This file will automatically download JUCE and configure your project for you, serving as a solid starting point.

CMakeLists.txt (2.0 KB)

It works on my WSL2 Ubuntu instance. Here are the steps verbatim I used to build it:

  • mkdir waylo && cd waylo
  • Copy CMakeLists.txt into waylo
  • git clone --depth=1 git@github.com:seanwayland/waylochorus2.git
  • cmake -B build -DWAYLO2_SOURCE_DIR=“waylochorus2/waylochorus2/waylochorus2”
  • cmake --build build --config Debug

You should now have your plugin in Standalone, VST3 and LV2 formats :slight_smile:

Oh that’s very nice oli1 thank you ! I believe I built something ! I changed your invocation of cmake and removed the quotations which crashed it.

cmake -B build -DWAYLO2_SOURCE_DIR=waylochorus2/waylochorus2/waylochorus2

This appears to be an lv2 plugin. The quotations around the filename seems strange.

sean@ubuntu:~/Desktop/waylo/build/waylochorus2_artefacts/LV2$ ls -all
total 12
drwxrwxr-x 3 sean sean 4096 Dec 31 23:40  .
drwxrwxr-x 6 sean sean 4096 Dec 31 23:47  ..
drwxrwxr-x 2 sean sean 4096 Dec 31 23:47 'Waylo Chorus 2.lv2'
sean@ubuntu:~/Desktop/waylo/build/waylochorus2_artefacts/LV2$ 

I managed to get the plugin to build on the zynthian using this cmakelists but it didnt work ie no sound was produced. One issue I encountered was that the lv2 folder that was created had created quotes around its name which I had to remove using shell commands. Looking at the cmakelists file here I notice only cpp files not header files are included in the source. Is that supposed to be like that ?