Error when I run Projucer (segmentation fault (core dumped)) ubuntu WSL2

Hello everyone,

For the last 2 days ive been trying to get Projucer to work using WSL2 with Ubuntu.

What I have done so far:

  • Cloned the JUCE repo

  • Created a Develop branch and pulled the latest commits

  • Download the necessary dependencies

  • went to “JUCE/extras/Projucer/Builds/LinuxMakefile” and rant he linux command to compile the make file

  • ran command ‘./Projucer’

Error I received:


JUCE v6.0.8


**********************************************************

Projucer 6.0.8 --- Build date: Jun 17 2021

Log started: 18 Jun 2021 9:56:16am


Linux

CPU: 3801MHz Cores: 16 16294MB

[1] 431 segmentation fault (core dumped) ./Projucer

What I have done so far:

I also ran ‘gdb Projcuer’ then ‘run’ and i get this error:


{9:56}/mnt/c/Users/Drech/Documents/SEI/JUCE/extras/Projucer/Builds/LinuxMakefile/build:develop ✗ ➭ gdb Projucer

GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2

Copyright (C) 2020 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

Type "show copying" and "show warranty" for details.

This GDB was configured as "x86_64-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.


For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from Projucer...

(gdb) run

Starting program: /mnt/c/Users/Drech/Documents/SEI/JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

JUCE v6.0.8

[New Thread 0x7fffff0c0700 (LWP 464)]

[New Thread 0x7ffffe8b0700 (LWP 465)]


**********************************************************

Projucer 6.0.8 --- Build date: Jun 17 2021

Log started: 18 Jun 2021 10:06:31am


Linux

CPU: 3801MHz Cores: 16 16294MB

[New Thread 0x7ffffdc60700 (LWP 466)]

[New Thread 0x7ffffd240700 (LWP 467)]

[New Thread 0x7ffffca30700 (LWP 468)]


Thread 1 "Projucer" received signal SIGSEGV, Segmentation fault.

juce::ComponentBoundsConstrainer::setBoundsForComponent (this=0x8db21c0, component=0x8db2080, targetBounds=...,

isStretchingTop=false, isStretchingLeft=false, isStretchingBottom=false, isStretchingRight=false)

at ../../../../modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp:119

119 auto screenBounds = Desktop::getInstance().getDisplays().getDisplayForPoint (targetBounds.getCentre())->userArea;

(gdb)

The last thing I tried was downloading the prebuilt windows Projucer from their website. This method allows me to open Projucer and create the project. However, I kept getting pathing issues which I fixed but then when I tried to build it I got hit with this error.


Executing task: C/C++: g++ build active file <


Starting build...

/usr/bin/g++ -g /mnt/c/Users/Drech/Documents/SEI/projects/SimpleEQ/Source/PluginProcessor.h -o /mnt/c/Users/Drech/Documents/SEI/projects/SimpleEQ/Source/PluginProcessor

/mnt/c/Users/Drech/Documents/SEI/projects/SimpleEQ/Source/PluginProcessor.h:9:9: warning: #pragma once in main file

9 | #pragma once

| ^~~~

In file included from /mnt/c/Users/Drech/Documents/SEI/JUCE/modules/juce_core/juce_core.h:65,

from /mnt/c/Users/Drech/Documents/SEI/JUCE/modules/juce_audio_basics/juce_audio_basics.h:53,

from /mnt/c/Users/Drech/Documents/SEI/projects/SimpleEQ/JuceLibraryCode/JuceHeader.h:15,

from /mnt/c/Users/Drech/Documents/SEI/projects/SimpleEQ/Source/PluginProcessor.h:11:

/mnt/c/Users/Drech/Documents/SEI/JUCE/modules/juce_core/system/juce_TargetPlatform.h:56:3: error: #error "No global header file was included!"

56 | #error "No global header file was included!"

| ^~~~~


Build finished with error(s).

The terminal process terminated with exit code: -1.


Terminal will be reused by tasks, press any key to close it.

Ive only really messed around with JavaScript and Python to make full stack applications. So any help with this will be greatly appreciated because I really want to make music software. Thank you for all the help!

We don’t test the Projucer under WSL on Windows, and I’m not aware of any other users attempting to build under WSL - there’s a fair chance you’re the first person to attempt building with this particular setup!

On Windows, the best-supported toolchain is probably building with the Projucer’s Visual Studio exporter. I’d strongly recommend installing a copy of Visual Studio 2019 and using this for development, especially if you’re just starting out with C++.

We also support development on Windows using CMake, which supports a few more build tools (including Ninja and CodeBlocks), but this is a bit more involved to set up and I wouldn’t recommend it to a beginner.

Thanks for the speedy reply. You really saved me from bashing my head against the wall.

I am trying to do this tutorial using JUCE framework from freecodecamp (Learn Modern C++ by Building an Audio Plugin (w/ JUCE Framework) - Full Course - YouTube)

Will the first windows option with using Visual Studio 2019 have the necessary tools to build out this Simple EQ?

Thank you again for the help!

Yes, the Projucer and Visual Studio workflow I mentioned above should have everything you need to follow that tutorial.

Thank you for all the help. I cant wait to start using this framework!