From 7775ed1aa75e9d0176f08c7d9b40e7dea45706b2 Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Fri, 14 Jan 2022 11:15:32 +0100
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 a LOG statement. The runtime error can be overcome when doing a
static cast of the variables.
---
 reco/L1/L1Algo/L1Parameters.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/reco/L1/L1Algo/L1Parameters.h b/reco/L1/L1Algo/L1Parameters.h
index 493add49a1..718d3bea16 100644
--- a/reco/L1/L1Algo/L1Parameters.h
+++ b/reco/L1/L1Algo/L1Parameters.h
@@ -58,12 +58,12 @@ public:
     LOG(INFO) << "== L1Algo parameters ==============================================================";
     LOG(INFO) << "";
     LOG(INFO) << "  COMPILE TIME CONSTANTS";
-    LOG(INFO) << "    Bits to code one station:          " << kStationBits;
-    LOG(INFO) << "    Bits to code one thread:           " << kThreadBits;
-    LOG(INFO) << "    Bits to code one triplet:          " << kTripletBits;
-    LOG(INFO) << "    Max number of stations:            " << kMaxNstations;
-    LOG(INFO) << "    Max number of threads:             " << kMaxNthreads;
-    LOG(INFO) << "    Max number of triplets:            " << kMaxNtriplets;
+    LOG(INFO) << "    Bits to code one station:          " << static_cast<unsigned int>(kStationBits);
+    LOG(INFO) << "    Bits to code one thread:           " << static_cast<unsigned int>(kThreadBits);
+    LOG(INFO) << "    Bits to code one triplet:          " << static_cast<unsigned int>(kTripletBits);
+    LOG(INFO) << "    Max number of stations:            " << static_cast<unsigned int>(kMaxNstations);
+    LOG(INFO) << "    Max number of threads:             " << static_cast<unsigned int>(kMaxNthreads);
+    LOG(INFO) << "    Max number of triplets:            " << static_cast<unsigned int>(kMaxNtriplets);
     LOG(INFO) << "";
     LOG(INFO) << "  RUNTIME CONSTANTS (CUTS)";
     LOG(INFO) << "    Max number of doublets per singlet: " << fMaxDoubletsPerSinglet;
-- 
GitLab