Can't build Projucer on Pi

gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO


Linking Projucer - App
/usr/bin/ld: build/intermediate/Release/include_juce_core_f26d17db.o: in function `juce::Random::setSeedRandomly()':
include_juce_core.cpp:(.text+0xece0): undefined reference to `__atomic_load_8'
/usr/bin/ld: include_juce_core.cpp:(.text+0xef68): undefined reference to `__atomic_fetch_xor_8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:144: build/Projucer] Error 1

Have you tried using Clang? Gcc have me some problems aswell on Raspberry, whereas Clang did just fine. I’m talking about JUCE 5 though, I don’t know if JUCE 6 is what gives you the errors

You could try adding -latomic to LDFLAGS when building, which should make the undefined symbols available.

Alternatively, you could build the Projucer using CMake, which should (as of recently!) add -latomic automatically when building on the Pi.

I download and built the latest cmake

rrabien@pi4:~/dev/plugins/modules/juce $ /usr/local/bin/cmake --version
cmake version 3.18.2

CMake suite maintained and supported by Kitware (

I went to the root of the juce directory and tried /usr/local/bin/cmake .

  CMakeFiles/juceaide.dir/__/__/__/modules/juce_core/juce_core.cpp.o: in
  function `std::__atomic_base<long long>::operator long long() const':

  /usr/include/c++/8/bits/atomic_base.h:396: undefined reference to

  CMakeFiles/juceaide.dir/__/__/__/modules/juce_core/juce_core.cpp.o: in
  function `std::__atomic_base<long long>::operator^=(long long)':

  /usr/include/c++/8/bits/atomic_base.h:344: undefined reference to

  collect2: error: ld returned 1 exit status

  make[2]: *** [extras/Build/juceaide/CMakeFiles/juceaide.dir/build.make:194:
  extras/Build/juceaide/juceaide_artefacts/Debug/juceaide] Error 1

  make[1]: *** [CMakeFiles/Makefile2:152:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/all] Error 2

  make: *** [Makefile:149: all] Error 2

If I go to the Projucer directory:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as


  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:24 (juce_add_gui_app):
  Unknown CMake command "juce_add_gui_app".

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.18)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/rrabien/dev/plugins/modules/juce/extras/Projucer/CMakeFiles/CMakeOutput.log".

So I must cmake all of juce, not just the Projucer?

However, doing make CONFIG=Release LDFLAGS=-latomic is easy enough, so I’ll just do that for now.

This is in the same vein as my post from aeons ago; RaspberryPi 3 Warnings & Errors