InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

COMP: Drop the DCMTK `offile.h` printf-format overlay once DCMTK/dcmtk#151 merges

Open
#6,748 0 comments 0 reactions 0 assignees View on GitHub
type:Infrastructure
Dominant language
C++
Stars
1.7k
Forks
748
Avg merge
1d 1h
Merged PRs (30d)
64

Description

ITK's DCMTK fork branch carries a local overlay commit adding printf format
attributes to `OFFile`'s printf wrappers. It was submitted upstream as
[DCMTK/dcmtk#151](https://github.com/DCMTK/dcmtk/pull/151), which is still open.
When it merges, the overlay should be dropped at the next DCMTK bump.

Current pin and overlay state

`Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake:46`:

```cmake
set(DCMTK_GIT_TAG "554b74475ba1734655c61988b94bc69daf6690c7") # for/itk-dcmtk-3.7.0-ccfd10b
```

DCMTK is fetched (not vendored) — `Modules/ThirdParty/DCMTK/CMakeLists.txt:144-145`
uses `GIT_REPOSITORY ${DCMTK_GIT_REPOSITORY}` / `GIT_TAG ${DCMTK_GIT_TAG}` — so
the overlay lives on the `InsightSoftwareConsortium/DCMTK` branch
`for/itk-dcmtk-3.7.0-ccfd10b`, of which `554b7447` is the tip.

The overlay is commit `84c8047db`: it adds
`__attribute__((format(printf, ...)))` to `OFFile::fprintf` / `OFFile::vfprintf`
in `ofstd/include/dcmtk/ofstd/offile.h`, silencing two clang
`-Wformat-nonliteral` warnings that otherwise appear in **every** translation
unit that includes `offile.h`.

Upstream status and retirement steps

`DCMTK/dcmtk#151` — *Add printf format attribute to OFFile printf wrappers* —
state **OPEN**, `mergedAt: null`, last updated 2026-07-14.

When it merges:

1. Rebase `for/itk-dcmtk-3.7.0-ccfd10b` onto the upstream commit containing the
merged change.
2. Drop `84c8047db` from the overlay.
3. Bump `DCMTK_GIT_TAG` in `Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake`.
4. Update the local-patch list in `Modules/ThirdParty/DCMTK/README.md`.

Should be folded into the next routine DCMTK version bump rather than done as a
standalone change.

Prior ITK history

ITK PR #6587 attempted to carry this and was **closed unmerged** — #6548
("COMP: Pin DCMTK with single-export namespace fix", merged 2026-07-14) had
already advanced the pin past the commit #6587 targeted. So no ITK PR or issue
currently records the retire-on-upstream-merge condition; hence this tracking
issue.

Same shape as #6694 (re-vendor MetaIO, blocked on Kitware/MetaIO#145).

Contributor guide

Open the contributing guide

Research direction

Wait for DCMTK/dcmtk#151 to merge, then inspect Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake, CMakeLists.txt, and README.md. Rebase the for/itk-dcmtk-3.7.0-ccfd10b branch, drop overlay commit 84c8047db, bump the DCMTK tag, and update the local-patch list. Verify the routine DCMTK update and relevant builds complete without the overlay.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.