# Can't build Projucer on Pi

**URL:** <https://forum.juce.com/t/cant-build-projucer-on-pi/41790>\
**Category:** General JUCE discussion\
**Created:** [September 17, 2020, 4:57pm UTC](https://forum.juce.com/t/cant-build-projucer-on-pi/41790 "2020-09-17T16:57:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RolandMR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rolandmr/32/641_2.png) [@RolandMR](https://forum.juce.com/u/RolandMR)\
**Post date:** [September 17, 2020, 4:57pm UTC](https://forum.juce.com/t/cant-build-projucer-on-pi/41790/1 "2020-09-17T16:57:34Z")

</div>

```auto
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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

Make:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![johngalt91](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@johngalt91](https://forum.juce.com/u/johngalt91)\
**Post date:** [September 17, 2020, 5:41pm UTC](https://forum.juce.com/t/cant-build-projucer-on-pi/41790/2 "2020-09-17T17:41:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [September 17, 2020, 6:07pm UTC](https://forum.juce.com/t/cant-build-projucer-on-pi/41790/3 "2020-09-17T18:07:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RolandMR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rolandmr/32/641_2.png) [@RolandMR](https://forum.juce.com/u/RolandMR)\
**Post date:** [September 17, 2020, 7:08pm UTC](https://forum.juce.com/t/cant-build-projucer-on-pi/41790/4 "2020-09-17T19:08:50Z")

</div>

I download and built the latest cmake

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

CMake suite maintained and supported by Kitware (kitware.com/cmake).

```

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

```auto
  /usr/bin/ld:
  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
  `__atomic_load_8'

  /usr/bin/ld:
  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
  `__atomic_fetch_xor_8'

  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:

```auto
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

    project(ProjectName)

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

  CMake is pretending there is a "project(Project)" command on the first
  line.
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?

---

<div class="post-metadata">

**Author:** ![RolandMR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rolandmr/32/641_2.png) [@RolandMR](https://forum.juce.com/u/RolandMR)\
**Post date:** [September 17, 2020, 7:40pm UTC](https://forum.juce.com/t/cant-build-projucer-on-pi/41790/5 "2020-09-17T19:40:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jrlanglois](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jrlanglois/32/21372_2.png) [@jrlanglois](https://forum.juce.com/u/jrlanglois)\
**Post date:** [September 18, 2020, 2:03pm UTC](https://forum.juce.com/t/cant-build-projucer-on-pi/41790/6 "2020-09-18T14:03:25Z")

</div>

This is in the same vein as my post from aeons ago; [RaspberryPi 3 Warnings & Errors](https://forum.juce.com/t/raspberrypi-3-warnings-errors/38993)
