From ee73359c0047f1237310d0470894be41075b02f2 Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Mon, 30 Aug 2021 09:54:10 +0200
Subject: [PATCH] Fix runtime error on macosx 10.13

With macosx 10.13 (Apple clang 10.0) there is a runtime problem when
loading libL1. The problem is due to the usage of a static constexpr
in the source file which can be overcome when doing a static cast
of the variable.
---
 reco/L1/L1Algo/L1Algo.cxx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/reco/L1/L1Algo/L1Algo.cxx b/reco/L1/L1Algo/L1Algo.cxx
index 323a5bff73..2aacf0a3cb 100644
--- a/reco/L1/L1Algo/L1Algo.cxx
+++ b/reco/L1/L1Algo/L1Algo.cxx
@@ -17,8 +17,9 @@ L1Algo::L1Algo(unsigned int nThreads)
 
 void L1Algo::SetNThreads(unsigned int n)
 {
-  if (n > fkMaxNthreads) {
-    LOG(FATAL) << "L1Algo: n threads " << n << " is greater than the maximum " << fkMaxNthreads << std::endl;
+  if (n > static_cast<unsigned int>(fkMaxNthreads)) {
+    LOG(fatal) << "L1Algo: n threads " << n << " is greater than the maximum "
+               << static_cast<unsigned int>(fkMaxNthreads) << std::endl;
   }
   fNThreads = n;
 
-- 
GitLab