Skip to content

Commit d132a0f

Browse files
ktflkrcal
authored andcommitted
Allow building with latest fmt
1 parent f18e101 commit d132a0f

File tree

8 files changed

+16
-14
lines changed

8 files changed

+16
-14
lines changed

cmake/CMakeLists.txt.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ project(DataDistribution-3rdparties NONE)
2020
include(ExternalProject)
2121
ExternalProject_Add(spdlog
2222
GIT_REPOSITORY "https://github.com/gabime/spdlog.git"
23-
GIT_TAG "v1.9.2"
23+
GIT_TAG "v1.12.0"
2424

2525
GIT_SHALLOW TRUE
2626
GIT_PROGRESS TRUE

src/StfBuilder/StfBuilderDevice.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ void StfBuilderDevice::InitTask()
225225
ChangeStateOrThrow(fair::mq::Transition::ErrorFound);
226226
return;
227227
} else {
228-
IDDLOG("READOUT INTERFACE: Configured RDHv{}", ReadoutDataUtils::sRdhVersion);
228+
IDDLOG("READOUT INTERFACE: Configured RDHv{}", (int)ReadoutDataUtils::sRdhVersion);
229229
RDHReader::Initialize(unsigned(ReadoutDataUtils::sRdhVersion));
230230
}
231231

src/StfBuilder/StfBuilderDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ class StfBuilderDevice : public DataDistDevice
213213
}
214214

215215
if (!(lNextStage >= eStfFileSinkIn && lNextStage <= eStfNullIn)) {
216-
EDDLOG("Stage error! next_stage={}", lNextStage);
216+
EDDLOG("Stage error! next_stage={}", (int)lNextStage);
217217
}
218218

219219
assert(lNextStage >= eStfFileSinkIn && lNextStage <= eStfNullIn);

src/common/MemoryUtils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,15 +506,15 @@ class RegionAllocatorResource
506506

507507
if (mCanFail && !lRet) {
508508
WDDLOG_GRL(10000, "RegionAllocatorResource: Allocation failed. region={} alloc={} region_size={} free={}",
509-
mSegmentName, pSize, mRegion->GetSize(), mFree);
509+
mSegmentName, pSize, mRegion->GetSize(), mFree.load());
510510
WDDLOG_GRL(10000, "Memory region '{}' is too small, or there is a large backpressure.", mSegmentName);
511511
return nullptr;
512512
}
513513

514514
while (true) {
515515
using namespace std::chrono_literals;
516516
WDDLOG_RL(1000, "RegionAllocatorResource: waiting to allocate a message. region={} alloc={} region_size={} free={}",
517-
mSegmentName, pSize, mRegion->GetSize(), mFree);
517+
mSegmentName, pSize, mRegion->GetSize(), mFree.load());
518518
WDDLOG_RL(1000, "Memory region '{}' is too small, or there is a large backpressure.", mSegmentName);
519519
if (lGen != mGeneration.load()) {
520520
break; // retry alloc
@@ -533,7 +533,7 @@ class RegionAllocatorResource
533533
mFree -= pSizeUp;
534534
assert (mFree >= 0);
535535

536-
DDDLOG_GRL(5000, "DataRegionResource {} memory free={} allocated={}", mSegmentName, mFree, (mSegmentSize - mFree));
536+
DDDLOG_GRL(5000, "DataRegionResource {} memory free={} allocated={}", mSegmentName, mFree.load(), (mSegmentSize - mFree.load()));
537537

538538
// If the allocated message was aligned up, set a first byte after the buffer to 0
539539
if (pSizeUp > pSize) {
@@ -584,7 +584,7 @@ class RegionAllocatorResource
584584

585585
if (mFreeRanges.empty()) {
586586
if (mFree != 0) {
587-
EDDLOG_GRL(1000, "DataRegionResource {} try_reclaim({}): FREE MAP is empty! free={}", mSegmentName, pSize, mFree);
587+
EDDLOG_GRL(1000, "DataRegionResource {} try_reclaim({}): FREE MAP is empty! free={}", mSegmentName, pSize, mFree.load());
588588
}
589589
return false;
590590
}

src/common/ReadoutDataModel.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ReadoutDataUtils::getDataOrigin(const RDHReader &R)
4747
return lOrig;
4848
} else {
4949
EDDLOG_ONCE("Data origin in RDH is invalid: {}. Please configure the correct SYSTEM_ID in the hardware."
50-
" Using the configuration value {}.", R.getSystemID(), sSpecifiedDataOrigin.as<std::string>());
50+
" Using the configuration value {}.", R.getSystemID(), sSpecifiedDataOrigin.template as<std::string>());
5151
}
5252
}
5353

@@ -66,7 +66,7 @@ ReadoutDataUtils::getSubSpecification(const RDHReader &R)
6666
} else if (ReadoutDataUtils::sRawDataSubspectype == eFeeId) {
6767
lSubSpec = R.getFeeID();
6868
} else {
69-
EDDLOG("Invalid SubSpecification method={}", ReadoutDataUtils::sRawDataSubspectype);
69+
EDDLOG("Invalid SubSpecification method={}", (int)ReadoutDataUtils::sRawDataSubspectype);
7070
}
7171

7272
return lSubSpec;

src/common/SubTimeFrameDataModel.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void SubTimeFrame::mergeStf(std::unique_ptr<SubTimeFrame> pStf, const std::strin
129129
// make sure header values match
130130
if (mHeader.mOrigin != pStf->header().mOrigin) {
131131
EDDLOG_RL(5000, "Merging STFs error: STF origins do not match origin={} new_origin={} new_stfs_id={}",
132-
mHeader.mOrigin, pStf->header().mOrigin, mStfSenderId);
132+
(int)mHeader.mOrigin, (int)pStf->header().mOrigin, mStfSenderId);
133133
}
134134

135135
if (mHeader.mFirstOrbit != pStf->header().mFirstOrbit) {

src/common/base/Utilities.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ constexpr auto operator+(const T p) noexcept -> std::enable_if_t<std::is_enum<T>
6161
// create threads using a object method
6262
template <class F, class ... Args>
6363
std::thread create_thread_member(const char* name, F&& f, Args&&... args) {
64+
#if defined(__linux__)
6465
char *lName = strdup(name);
66+
#endif
6567
return std::thread([=]{
6668
#if defined(__linux__)
6769
pthread_setname_np(pthread_self(), lName);

src/common/rpc/TfSchedulerRpcClient.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ bool TfSchedulerRpcClient::HeartBeat(const BasicInfo &pInfo) {
5454
return false;
5555
}
5656

57-
EDDLOG_GRL(1000, "HeartBeat: gRPC request error. code={} message={}", lStatus.error_code(), lStatus.error_message());
57+
EDDLOG_GRL(1000, "HeartBeat: gRPC request error. code={} message={}", (int)lStatus.error_code(), lStatus.error_message());
5858
}
5959

6060
return false;
@@ -87,7 +87,7 @@ bool TfSchedulerRpcClient::NumStfSendersInPartitionRequest(std::uint32_t &pNumSt
8787
continue; // retry
8888
}
8989

90-
EDDLOG_GRL(1000, "gRPC request error. code={} message={}", lStatus.error_code(), lStatus.error_message());
90+
EDDLOG_GRL(1000, "gRPC request error. code={} message={}", (int)lStatus.error_code(), lStatus.error_message());
9191
break;
9292
}
9393

@@ -266,7 +266,7 @@ bool TfSchedulerRpcClient::TfBuilderUpdate(TfBuilderUpdateMessage &pMsg) {
266266
return true;
267267
}
268268

269-
DDDLOG_GRL(1000, "gRPC: TfBuilderUpdate error. code={} message={}", lStatus.error_code(), lStatus.error_message());
269+
DDDLOG_GRL(1000, "gRPC: TfBuilderUpdate error. code={} message={}", (int)lStatus.error_code(), lStatus.error_message());
270270
return false;
271271
}
272272

@@ -288,7 +288,7 @@ bool TfSchedulerRpcClient::StfSenderStfUpdate(StfSenderStfInfo &pMsg, SchedulerS
288288
return true;
289289
}
290290

291-
EDDLOG_GRL(2000, "gRPC: StfSenderStfUpdate error. code={} message={}", lStatus.error_code(), lStatus.error_message());
291+
EDDLOG_GRL(2000, "gRPC: StfSenderStfUpdate error. code={} message={}", (int)lStatus.error_code(), lStatus.error_message());
292292
return false;
293293
}
294294

0 commit comments

Comments
 (0)