Skip to content

Commit

Permalink
Allow building with latest fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored and lkrcal committed Nov 14, 2023
1 parent f18e101 commit d132a0f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ project(DataDistribution-3rdparties NONE)
include(ExternalProject)
ExternalProject_Add(spdlog
GIT_REPOSITORY "https://github.com/gabime/spdlog.git"
GIT_TAG "v1.9.2"
GIT_TAG "v1.12.0"

GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
Expand Down
2 changes: 1 addition & 1 deletion src/StfBuilder/StfBuilderDevice.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void StfBuilderDevice::InitTask()
ChangeStateOrThrow(fair::mq::Transition::ErrorFound);
return;
} else {
IDDLOG("READOUT INTERFACE: Configured RDHv{}", ReadoutDataUtils::sRdhVersion);
IDDLOG("READOUT INTERFACE: Configured RDHv{}", (int)ReadoutDataUtils::sRdhVersion);
RDHReader::Initialize(unsigned(ReadoutDataUtils::sRdhVersion));
}

Expand Down
2 changes: 1 addition & 1 deletion src/StfBuilder/StfBuilderDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class StfBuilderDevice : public DataDistDevice
}

if (!(lNextStage >= eStfFileSinkIn && lNextStage <= eStfNullIn)) {
EDDLOG("Stage error! next_stage={}", lNextStage);
EDDLOG("Stage error! next_stage={}", (int)lNextStage);
}

assert(lNextStage >= eStfFileSinkIn && lNextStage <= eStfNullIn);
Expand Down
8 changes: 4 additions & 4 deletions src/common/MemoryUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,15 @@ class RegionAllocatorResource

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

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

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

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

if (mFreeRanges.empty()) {
if (mFree != 0) {
EDDLOG_GRL(1000, "DataRegionResource {} try_reclaim({}): FREE MAP is empty! free={}", mSegmentName, pSize, mFree);
EDDLOG_GRL(1000, "DataRegionResource {} try_reclaim({}): FREE MAP is empty! free={}", mSegmentName, pSize, mFree.load());
}
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/common/ReadoutDataModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ReadoutDataUtils::getDataOrigin(const RDHReader &R)
return lOrig;
} else {
EDDLOG_ONCE("Data origin in RDH is invalid: {}. Please configure the correct SYSTEM_ID in the hardware."
" Using the configuration value {}.", R.getSystemID(), sSpecifiedDataOrigin.as<std::string>());
" Using the configuration value {}.", R.getSystemID(), sSpecifiedDataOrigin.template as<std::string>());
}
}

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

return lSubSpec;
Expand Down
2 changes: 1 addition & 1 deletion src/common/SubTimeFrameDataModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void SubTimeFrame::mergeStf(std::unique_ptr<SubTimeFrame> pStf, const std::strin
// make sure header values match
if (mHeader.mOrigin != pStf->header().mOrigin) {
EDDLOG_RL(5000, "Merging STFs error: STF origins do not match origin={} new_origin={} new_stfs_id={}",
mHeader.mOrigin, pStf->header().mOrigin, mStfSenderId);
(int)mHeader.mOrigin, (int)pStf->header().mOrigin, mStfSenderId);
}

if (mHeader.mFirstOrbit != pStf->header().mFirstOrbit) {
Expand Down
2 changes: 2 additions & 0 deletions src/common/base/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ constexpr auto operator+(const T p) noexcept -> std::enable_if_t<std::is_enum<T>
// create threads using a object method
template <class F, class ... Args>
std::thread create_thread_member(const char* name, F&& f, Args&&... args) {
#if defined(__linux__)
char *lName = strdup(name);
#endif
return std::thread([=]{
#if defined(__linux__)
pthread_setname_np(pthread_self(), lName);
Expand Down
8 changes: 4 additions & 4 deletions src/common/rpc/TfSchedulerRpcClient.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool TfSchedulerRpcClient::HeartBeat(const BasicInfo &pInfo) {
return false;
}

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

return false;
Expand Down Expand Up @@ -87,7 +87,7 @@ bool TfSchedulerRpcClient::NumStfSendersInPartitionRequest(std::uint32_t &pNumSt
continue; // retry
}

EDDLOG_GRL(1000, "gRPC request error. code={} message={}", lStatus.error_code(), lStatus.error_message());
EDDLOG_GRL(1000, "gRPC request error. code={} message={}", (int)lStatus.error_code(), lStatus.error_message());
break;
}

Expand Down Expand Up @@ -266,7 +266,7 @@ bool TfSchedulerRpcClient::TfBuilderUpdate(TfBuilderUpdateMessage &pMsg) {
return true;
}

DDDLOG_GRL(1000, "gRPC: TfBuilderUpdate error. code={} message={}", lStatus.error_code(), lStatus.error_message());
DDDLOG_GRL(1000, "gRPC: TfBuilderUpdate error. code={} message={}", (int)lStatus.error_code(), lStatus.error_message());
return false;
}

Expand All @@ -288,7 +288,7 @@ bool TfSchedulerRpcClient::StfSenderStfUpdate(StfSenderStfInfo &pMsg, SchedulerS
return true;
}

EDDLOG_GRL(2000, "gRPC: StfSenderStfUpdate error. code={} message={}", lStatus.error_code(), lStatus.error_message());
EDDLOG_GRL(2000, "gRPC: StfSenderStfUpdate error. code={} message={}", (int)lStatus.error_code(), lStatus.error_message());
return false;
}

Expand Down

0 comments on commit d132a0f

Please sign in to comment.