# RaspberryPi 3 Warnings & Errors

**URL:** <https://forum.juce.com/t/raspberrypi-3-warnings-errors/38993>\
**Category:** Linux\
**Created:** [April 24, 2020, 6:59pm UTC](https://forum.juce.com/t/raspberrypi-3-warnings-errors/38993 "2020-04-24T18:59:50Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [April 24, 2020, 6:59pm UTC](https://forum.juce.com/t/raspberrypi-3-warnings-errors/38993/1 "2020-04-24T18:59:50Z")

</div>

Note that this affects all branches.

First, I’m running into the same warnings as in this post:  
[Lots of warnings like "parameter passing for argument of type ... changed in GCC 7.1" when compiling with GCC 8](https://forum.juce.com/t/lots-of-warnings-like-parameter-passing-for-argument-of-type-changed-in-gcc-7-1-when-compiling-with-gcc-8/33885) . From the looks of it passing `-Wno-psabi` into all projects _could_ fix the issue, but blanket warning disabling kind of sucks… so I’ll leave that up to you.

As for the errors:

- When unit tests are enabled, the DSP module tests `SIMDRegister` in an environment that doesn’t apply.
- We need to apply `-latomic` explicitly otherwise we get an assortment of undefined references regarding atomics. This means `juce_core` will need to be updated to `rt dl pthread atomic` for its `linuxLibs`, and subsequently all projects will need to be resaved.

I have a patch to fix all of this:

```auto
diff --git a/modules/juce_core/juce_core.h b/modules/juce_core/juce_core.h
index 49ee367fb..40054ace2 100644
--- a/modules/juce_core/juce_core.h
+++ b/modules/juce_core/juce_core.h
@@ -41,7 +41,7 @@
   dependencies:
   OSXFrameworks: Cocoa IOKit
   iOSFrameworks: Foundation
- linuxLibs: rt dl pthread
+ linuxLibs: rt dl pthread atomic
   mingwLibs: uuid wsock32 wininet version ole32 ws2_32 oleaut32 imm32 comdlg32 shlwapi rpcrt4 winmm
 
  END_JUCE_MODULE_DECLARATION
diff --git a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp
index 2b18c829b..4b8163e4a 100644
--- a/modules/juce_dsp/containers/juce_AudioBlock_test.cpp
+++ b/modules/juce_dsp/containers/juce_AudioBlock_test.cpp
@@ -321,12 +321,8 @@ public:
 private:
     //==============================================================================
     template <typename T>
- using ScalarVoid = typename std::enable_if_t < std::is_scalar <T>::value, void>;
+ using ScalarVoid = typename std::enable_if_t<std::is_scalar<T>::value, void>;
 
- template <typename T>
- using SIMDVoid = typename std::enable_if_t <! std::is_scalar <T>::value, void>;
-
- //==============================================================================
     template <typename T = SampleType>
     ScalarVoid<T> copyingTests()
     {
@@ -356,6 +352,40 @@ private:
     }
 
     template <typename T = SampleType>
+ ScalarVoid<T> smoothedValueTests()
+ {
+ block.fill ((SampleType) 1.0);
+ SmoothedValue<SampleType> sv { (SampleType) 1.0 };
+ sv.reset (1, 4);
+ sv.setTargetValue ((SampleType) 0.0);
+
+ block.multiplyBy (sv);
+ expect (block.getSample (0, 2) < (SampleType) 1.0);
+ expect (block.getSample (1, 2) < (SampleType) 1.0);
+ expect (block.getSample (0, 2) > (SampleType) 0.0);
+ expect (block.getSample (1, 2) > (SampleType) 0.0);
+ expectEquals (block.getSample (0, 5), (SampleType) 0.0);
+ expectEquals (block.getSample (1, 5), (SampleType) 0.0);
+
+ sv.setCurrentAndTargetValue (-1.0f);
+ sv.setTargetValue (0.0f);
+ otherBlock.fill (-1.0f);
+ block.replaceWithProductOf (otherBlock, sv);
+ expect (block.getSample (0, 2) < (SampleType) 1.0);
+ expect (block.getSample (1, 2) < (SampleType) 1.0);
+ expect (block.getSample (0, 2) > (SampleType) 0.0);
+ expect (block.getSample (1, 2) > (SampleType) 0.0);
+ expectEquals (block.getSample (0, 5), (SampleType) 0.0);
+ expectEquals (block.getSample (1, 5), (SampleType) 0.0);
+ }
+
+ //==============================================================================
+ #if JUCE_USE_SIMD
+
+ template<typename T>
+ using SIMDVoid = typename std::enable_if_t<! std::is_scalar <T>::value, void>;
+
+ template<typename T = SampleType>
     SIMDVoid<T> copyingTests()
     {
         auto numSIMDElements = SIMDRegister<NumericType>::SIMDNumElements;
@@ -398,37 +428,9 @@ private:
         }
     }
 
- //==============================================================================
- template <typename T = SampleType>
- ScalarVoid<T> smoothedValueTests()
- {
- block.fill ((SampleType) 1.0);
- SmoothedValue<SampleType> sv { (SampleType) 1.0 };
- sv.reset (1, 4);
- sv.setTargetValue ((SampleType) 0.0);
-
- block.multiplyBy (sv);
- expect (block.getSample (0, 2) < (SampleType) 1.0);
- expect (block.getSample (1, 2) < (SampleType) 1.0);
- expect (block.getSample (0, 2) > (SampleType) 0.0);
- expect (block.getSample (1, 2) > (SampleType) 0.0);
- expectEquals (block.getSample (0, 5), (SampleType) 0.0);
- expectEquals (block.getSample (1, 5), (SampleType) 0.0);
-
- sv.setCurrentAndTargetValue (-1.0f);
- sv.setTargetValue (0.0f);
- otherBlock.fill (-1.0f);
- block.replaceWithProductOf (otherBlock, sv);
- expect (block.getSample (0, 2) < (SampleType) 1.0);
- expect (block.getSample (1, 2) < (SampleType) 1.0);
- expect (block.getSample (0, 2) > (SampleType) 0.0);
- expect (block.getSample (1, 2) > (SampleType) 0.0);
- expectEquals (block.getSample (0, 5), (SampleType) 0.0);
- expectEquals (block.getSample (1, 5), (SampleType) 0.0);
- }
-
- template <typename T = SampleType>
+ template<typename T = SampleType>
     SIMDVoid<T> smoothedValueTests() {}
+ #endif
 
     //==============================================================================
     void resetBlocks()
@@ -492,8 +494,11 @@ private:
 
 static AudioBlockUnitTests<float> audioBlockFloatUnitTests;
 static AudioBlockUnitTests<double> audioBlockDoubleUnitTests;
+
+#if JUCE_USE_SIMD
 static AudioBlockUnitTests<SIMDRegister<float>> audioBlockSIMDFloatUnitTests;
 static AudioBlockUnitTests<SIMDRegister<double>> audioBlockSIMDDoubleUnitTests;
+#endif
 
 } // namespace dsp
 } // namespace juce

```
