I’m trying to build a Projucer-based JUCE plugin for/on Raspberry Pi Debian Bookworm (for Zynthian.) The plugin works on Windows.
Building for ARM on Debian Bookworm, I get the following error:
error: ‘fabsf’ is not a member of ‘std’; did you mean ‘fabs’
Google AI explained the issue: different ways that fabsf is defined. It says to add the following to preprocessor options:
defines="JUCE_NAMESPACE_ROOT=1, fabsf=::fabsf
That causes the following:
error: explicit qualification in declaration of ‘float fabsf(float)’
What’s the correct fix?
I build JUCE plugin on GitHub provided Linux ARM64 images without issue.Given that std::fabsf is introduced in C++11, perhaps the compiler is too old?
1 Like
(venv) root@zynthian:~# cpp --version
cpp (Debian 12.2.0-14+deb12u1) 12.2.0
Juce is v8.0.13 - 19 May 2026, so it’s up-to-date. In Projucer project settings, C++ language support is the default of C++20.
That compiler looks good enough. A bit search shows that JUCE includes <math.h> and uses fabsf. So the problem should come from the code outside JUCE, right? If that is the case, perhaps you could just change those std::fabsf to std::abs?
1 Like
DaveH
June 16, 2026, 2:55pm
5
Hmm, I always thought std:abs chooses the correct version for you?
1 Like
Doh! I thought I had only seen errors in JUCE files, but my mistake. Thanks!