diff --git a/DDCore/include/DD4hep/Alignments.h b/DDCore/include/DD4hep/Alignments.h
index 218ce7370d8cb6359d0cf9ac0baf41cbd44243ff..7a0668411a4406214066299526e7845562a6e632 100644
--- a/DDCore/include/DD4hep/Alignments.h
+++ b/DDCore/include/DD4hep/Alignments.h
@@ -103,7 +103,7 @@ namespace DD4hep {
       /// Constructor to be used when reading the already parsed object
       template <typename Q> Alignment(const Handle<Q>& e) : Handle<Object>(e)  {}
       /// Object constructor for pure alignment objects
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__clang__)
       Alignment(const std::string& name) ;
 #else
       template <typename Q=Interna::AlignmentNamedObject> Alignment(const std::string& name);
@@ -166,7 +166,7 @@ namespace DD4hep {
       /// Constructor to be used when reading the already parsed object
       template <typename Q> AlignmentCondition(const Handle<Q>& e) : Handle<Object>(e) {}
       /// Object constructor for pure alignment objects
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__clang__)
       AlignmentCondition(const std::string& name) ;
 #else
       template <typename Q=Object> AlignmentCondition(const std::string& name);
diff --git a/DDCore/include/DD4hep/Dictionary.h b/DDCore/include/DD4hep/Dictionary.h
index 82258f7f448aa26d628f01c1a407cfba74fb0675..956246a8523850ebc92acdee7b2346ef2465311d 100644
--- a/DDCore/include/DD4hep/Dictionary.h
+++ b/DDCore/include/DD4hep/Dictionary.h
@@ -24,6 +24,7 @@
 #pragma GCC diagnostic ignored "-Wdeprecated"
 #pragma GCC diagnostic ignored "-Wunused"
 #endif
+
 // Framework include files
 #include "XML/Evaluator.h"
 #include "DD4hep/DetAlign.h"
diff --git a/DDCore/src/Alignments.cpp b/DDCore/src/Alignments.cpp
index 6a05bd0706ca17a75a5bc382791d443a4bdc65b5..21722e7c3d14b6d7a8924bbaf9fb9ec79fd18b34 100644
--- a/DDCore/src/Alignments.cpp
+++ b/DDCore/src/Alignments.cpp
@@ -22,35 +22,32 @@
 using namespace std;
 using namespace DD4hep::Alignments;
 
-
 /// Namespace for the AIDA detector description toolkit
 namespace DD4hep {
   
   /// Namespace for the alignment part of the AIDA detector description toolkit
   namespace Alignments {
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__clang__)
     /// Initializing constructor to create a new object (Specialized for AlignmentNamedObject)
-    Alignment::Alignment(const string& nam) {
-      assign(new Interna::AlignmentNamedObject(nam, "alignment"), nam, "alignment");
-    }
+    Alignment::Alignment(const string& nam)
+    { assign(new Interna::AlignmentNamedObject(nam, "alignment"), nam, "alignment");    }
+
     /// Initializing constructor to create a new object (Specialized for AlignmentConditionObject)
-    AlignmentCondition::AlignmentCondition(const string& nam) {
-      assign(new AlignmentCondition::Object(nam, "alignment"), nam, "alignment");
-    }
+    AlignmentCondition::AlignmentCondition(const string& nam)
+    { assign(new AlignmentCondition::Object(nam, "alignment"), nam, "alignment");       }
 #else
+    /// Initializing constructor to create a new object (Specialized for AlignmentData)
+    template <> Alignment::Alignment<AlignmentData>(const string& nam)
+    { assign(new AlignmentData(), nam, "alignment");                                    }
+
     /// Initializing constructor to create a new object (Specialized for AlignmentNamedObject)
-    template <> Alignment::Alignment<AlignmentData>(const string& nam) {
-      assign(new Alignment::Object(), nam, "alignment");
-    }
-    /// Initializing constructor to create a new object (Specialized for AlignmentNamedObject)
-    template <> Alignment::Alignment<Interna::AlignmentNamedObject>(const string& nam) {
-      assign(new Interna::AlignmentNamedObject(nam, "alignment"), nam, "alignment");
-    }
+    template <> Alignment::Alignment<Interna::AlignmentNamedObject>(const string& nam)
+    { assign(new Interna::AlignmentNamedObject(nam, "alignment"), nam, "alignment");    }
+
     /// Initializing constructor to create a new object (Specialized for AlignmentConditionObject)
-    template <> AlignmentCondition::AlignmentCondition<Interna::AlignmentConditionObject>(const string& nam) {
-      assign(new Object(nam, "alignment"), nam, "alignment");
-    }
+    template <> AlignmentCondition::AlignmentCondition<Interna::AlignmentConditionObject>(const string& nam)
+    { assign(new Object(nam, "alignment"), nam, "alignment");                           }
 #endif
   } /* End namespace Aligments                    */
 }   /* End namespace DD4hep                       */
diff --git a/DDCore/src/Evaluator/setStdMath.cpp b/DDCore/src/Evaluator/setStdMath.cpp
index f772d97d4acadb03bede8356f2d8368b591b01eb..e88a784c6d72b7a1a10c813439f8cb10742e96b2 100644
--- a/DDCore/src/Evaluator/setStdMath.cpp
+++ b/DDCore/src/Evaluator/setStdMath.cpp
@@ -16,7 +16,7 @@ static double eval_fmod (double a, double b) { return std::fmod(a,b);          }
 static double eval_min  (double a, double b) { return (a < b) ?  a : b;        }
 static double eval_max  (double a, double b) { return (a > b) ?  a : b;        }
 static double eval_sqrt (double a)           { return std::sqrt(a);            }
-static double eval_cbrt (double a)           { return ::cbrt(a);            }
+static double eval_cbrt (double a)           { return ::cbrt(a);               }
 static double eval_pow  (double a, double b) { return std::pow(a,b);           }
 static double eval_sin  (double a)           { return std::sin(a);             }
 static double eval_cos  (double a)           { return std::cos(a);             }
@@ -29,27 +29,27 @@ static double eval_sinh (double a)           { return std::sinh(a);            }
 static double eval_cosh (double a)           { return std::cosh(a);            }
 static double eval_tanh (double a)           { return std::tanh(a);            }
 static double eval_exp  (double a)           { return std::exp(a);             }
-static double eval_exp2 (double a)           { return ::exp2(a);            }
+static double eval_exp2 (double a)           { return ::exp2(a);               }
 //static double eval_exp10(double a)           { return ::exp10(a);              }
 static double eval_exp10(double a)           { return ::pow(10.,a) ;           }
-static double eval_expm1(double a)           { return ::expm1(a);           }
+static double eval_expm1(double a)           { return ::expm1(a);              }
 static double eval_log  (double a)           { return std::log(a);             }
-static double eval_logb (double a)           { return ::logb(a);            }
+static double eval_logb (double a)           { return ::logb(a);               }
 static double eval_log10(double a)           { return std::log10(a);           }
-static double eval_log1p(double a)           { return ::log1p(a);           }
-static double eval_hypot(double a, double b) { return ::hypot(a,b);         }
-static double eval_erf  (double a)           { return ::erf(a);             }
-static double eval_erfc (double a)           { return ::erfc(a);            }
-static double eval_gamma(double a)           { return ::gamma(a);              }
+static double eval_log1p(double a)           { return ::log1p(a);              }
+static double eval_hypot(double a, double b) { return ::hypot(a,b);            }
+static double eval_erf  (double a)           { return ::erf(a);                }
+static double eval_erfc (double a)           { return ::erfc(a);               }
+static double eval_gamma(double a)           { return ::tgamma(a);             }
 static double eval_double(double a)          { return a;                       }
 static double eval_int  (double a)           { return (double)int(a);          }
 static double eval_nint (double a)           { return std::floor(a);           }
 static double eval_floor(double a)           { return std::floor(a);           }
-static double eval_round(double a)           { return ::round(a);           }
+static double eval_round(double a)           { return ::round(a);              }
 static double eval_ceil (double a)           { return std::ceil(a);            }
 static double eval_isnan(double a)           { return std::isnan(a);           }
 static double eval_isinf(double a)           { return std::isinf(a);           }
-static double eval_nearbyint(double a)       { return ::nearbyint(a);       }
+static double eval_nearbyint(double a)       { return ::nearbyint(a);          }
 
 namespace XmlTools {
 
diff --git a/DDCore/src/Printout.cpp b/DDCore/src/Printout.cpp
index 59ce77b5d0d5f1bc97efedc533a4988cefe918f0..9b29dd48d454a2dafb1ceb1fab3771acb3d3a7ec 100644
--- a/DDCore/src/Printout.cpp
+++ b/DDCore/src/Printout.cpp
@@ -18,6 +18,10 @@
 #include <cstring>
 #include <cstdarg>
 #include <stdexcept>
+// Disable some diagnostics for ROOT dictionaries
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wvarargs"
+#endif
 
 using namespace std;
 
diff --git a/DDSegmentation/src/MegatileLayerGridXY.cpp b/DDSegmentation/src/MegatileLayerGridXY.cpp
index cbe1cebb0a2111c0d65b1ce1526915c553c1f4af..ad4854d07f09656e5c92fa4f2db4193d291c237c 100644
--- a/DDSegmentation/src/MegatileLayerGridXY.cpp
+++ b/DDSegmentation/src/MegatileLayerGridXY.cpp
@@ -9,8 +9,8 @@
 #include "DDSegmentation/MegatileLayerGridXY.h"
 
 #undef NDEBUG
+#include <cmath>
 #include <cassert>
-
 #include <algorithm>
 
 namespace DD4hep {
@@ -73,7 +73,7 @@ namespace DD4hep {
       cellPosition.X = cellIndexX * (_currentSegInfo.megaTileSizeX / _currentSegInfo.nCellsX ) + _currentSegInfo.megaTileOffsetX;
       cellPosition.Y = cellIndexY * (_currentSegInfo.megaTileSizeY / _currentSegInfo.nCellsY ) + _currentSegInfo.megaTileOffsetY;
 
-      if ( std::fabs( cellPosition.X )>10000e0 || std::fabs( cellPosition.Y )>10000e0 ) {
+      if ( fabs( cellPosition.X )>10000e0 || fabs( cellPosition.Y )>10000e0 ) {
         std::cout << "crazy cell position: " << cellPosition.X << " " << cellPosition.Y << std::endl;
         std::cout << "layer, wafer, cellx,y indices: " << layerIndex << " " << waferIndex
                   << " " << cellIndexX << " " << cellIndexY << std::endl;
diff --git a/cmake/run_test.sh b/cmake/run_test.sh
index a4e69f81b6ce9e66a87c16bf4f268393c3f96e35..fa8772271119a3c27fff9691ed35544dc11e72ed 100755
--- a/cmake/run_test.sh
+++ b/cmake/run_test.sh
@@ -9,10 +9,7 @@
 
 # ---- initialize DD4hep for this shell
 . @CMAKE_INSTALL_PREFIX@/bin/thisdd4hep.sh
-if [ @USE_DYLD@ ];
-then
-    export DYLD_LIBRARY_PATH=${DD4HEP_LIBRARY_PATH}:${DYLD_LIBRARY_PATH};
-fi;
+
 #----- parse command line - first argument is the 
 #      test to run
 command=$1
@@ -24,4 +21,4 @@ for i in "$@" ; do
     fi
 done
 echo "---running test :  '" ${command} ${theargs} "'"
-exec ${command} ${theargs}
+${command} ${theargs}