JUCE 4.2.1 setup on apt based Linux, Ubuntu 16.04 LTS, mint, elementary OS-Freya


#1

Based on earlier postings for older Linux / Juce versions the following set-up procedure was successful for me:

Installation / version details:
JUCE 4.2.1 as of May 7, 2016 on Linux Ubuntu Studio 64-bit 16.04 LTS,
verified earlier with Ubuntu 14.04 64-bit, Ubuntu Studio 14.04 64-bit, elementary OS 0.3.2 (Freya) 64-bit, Mint 17.3 Cinnamon 64-bit
Note: for RedHat, RPM packaging based linux line, e.g. Fedora 23 see reply below

Might be, this update is useful for others too.

Steps:

  1. Install Ubuntu 64-bit

  2. Install the following tools and libraries:

sudo apt-get -y install llvm sudo apt-get -y install clang sudo apt-get -y install libfreetype6-dev sudo apt-get -y install libx11-dev sudo apt-get -y install libxinerama-dev sudo apt-get -y install libxrandr-dev sudo apt-get -y install libxcursor-dev sudo apt-get -y install mesa-common-dev sudo apt-get -y install libasound2-dev sudo apt-get -y install freeglut3-dev sudo apt-get -y install libxcomposite-dev sudo apt-get -y install libcurl4-gnutls-dev
  1. Install VST SDK from https://www.steinberg.net/en/company/developers.html (requires developer registration - free)
    Create a folder SDKs directly in your home directory and copy the VST SDK, folder ‚VST3 SDK’ into it. (~/SDKs/VST3 SDK). This is one of the configuration rules for JUCE to facilitate cross platform configuration compatibility in Projucer.

  2. Download and install JUCE linux distribution from https://www.juce.com/get-juce
    (Personally I’ve extracted the zip archive directly in my home directory (~/JUCE )

Note (1) as of Apr 9, 2016: The executable Projucer from the distribution didn’t start – I had first to compile it JUCE/extras/Projucer/Builds/LinuxMakefile . Just open a terminal and type ‚make’ will do it and should run without errors if everything is installed as noted above.

redefine CC, CCXX on the shell to point to clang, clang++: export CC=/usr/bin/clang export CXX=/usr/bin/clang++

then ‚make’ as usual throughout the Builds/LinuxMakefile directories in extras and examples.

Note: If not all examples have already a LinuxMakefile target you have generate the LinuxMakefile target from a Windows or Mac Projucer and complie it than on Linux.
:relaxed:Tom


List of Juce dependencies under linux
How can I install JUCE in Linux Fedora?
Which compilers are supported on Linux?
Freeze when opening FileChooser
#2

A follow-up in case you don’t want to use clang++, g++ v5 supports more of the compiler flags used by JUCE than g++v4 (but still not all - I was only able to compile all the examples wthout error using clang++ does):
apt-get install g++ installs by default version 4.8.4
If you prefer to have version 5 installed and activated, these are the steps to get gcc 5, g++ 5 installed and active (just apt-get install gcc-5, g+±5 wasn’t enough… ):

sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-5 g++-5 sudo update-alternatives sudo update-alternatives --remove-all gcc sudo update-alternatives --remove-all g++ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20 sudo update-alternatives --config gcc sudo update-alternatives --config g++

-Tom


Freeze when opening FileChooser
#3

Cool! I’ve added a link to this post in the Linux dependencies sticky post.


#4

Update:
Equivalent dependency installation for JUCE 4.2.1 on the RedHat RPM package based linux line would be as shown below, verified on Fedora 23.

sudo dnf install -y llvm sudo dnf install -y clang sudo dnf install -y freetype-devel sudo dnf install -y libX11-devel sudo dnf install -y libXinerama-devel sudo dnf install -y libXrandr-devel sudo dnf install -y libXcursor-devel sudo dnf install -y mesa-libGL-devel sudo dnf install -y freeglut-devel sudo dnf install -y alsa-lib-devel sudo dnf install -y libXcomposite-devel sudo dnf install -y gnutls-devel sudo dnf install -y libcurl-devel

Before compiling point CC, CXX in your shell to clang:

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++


#5

For those of you who use that kind of stuff, I made a docker container with the proper packages installed for clang and JUCE dependencies. I’ll probably add some versioning in the future to be able to have a defined environment for a given tag.

https://hub.docker.com/r/adanselm/docker-clang-juce/

It doesn’t contain any SDK though (nor JUCE), since it is hosted on a public hub.


Unable to build project on linux only
#6

couldn’t install anything until I used the suggestion here: https://askubuntu.com/a/99538/699802

also installed (not exactly sure if these are all needed but i just installed things until projucer built successfully):

sudo apt-get -y install vflib3-dev
sudo apt-get -y install libwebkit2gtk-4.0-dev