Dependency Issues building in Ubuntu

I have the project currently building successfully
in Windows and Mac but the make command in Ubuntu is throwing undefined reference errors to __atomic_load, __atomic_store, __atomic_load_16, __atomic_store_16

Googling around it seemed to be an issue with older gcc compilers but I’m running gcc 11.2 and the project is using C++14. But it does look like it’s looking in the C++11 library because it prints /usr/include/c++/11/atomic:271 as part of the error.
Does this look familiar to anyone else?

This is my first time trying to build a project in Linux so I could be missing something as fundamental as a dependency, although I’ve installed everything listed in the "Linux Dependencies
doc. And lastly, in case this throws any red flags, I’m building on Ubuntu 20.04 running as a virtual machine in UTM. The host machine is an Apple Silicon MacBook.

looks like smth is misconfigured
is the C++14 set in the .jucer?
is gcc 11.2 the default compiler?
g++ -version

It’s actually fine. There should not /usr/include/c++/14 in includes.
Does JUCE examples or AudioPluginHost builds for you in Linux?

IIRC on Raspberry Pi i had such linker errors while building with gcc.
Perhaps it is something like that.
Note that on Ubuntu it is supposed to compile fine.

You can try to build with clang:

make CXX=clang++

Or explicitly add the atomic library:

make LDFLAGS=-latomic

2 Likes

Perhaps you have to install the build-essential packages first:
try that:
sudo apt update
sudo apt install build-essential

and after that reinstall:

First off, thanks everyone for your help! @nicolasdanet, your recommendation of make LDFLAGS=-latomic worked. I thought I had tried this flag in Projucer but I must’ve set it as a compiler flag rather than a linker flag (which works also, for anyone who stumbles unto this thread.)

Just set -latomic in the “Extra Linker Flags” field in Projucer