Ok, so from https://issues.slicer.org/view.php?id=2006 I thought that libiconv would not be needed and deactivated. In CMake, I can see that DCMTK_WITH_ICONV is disabled.
Still, I tried to port deactivate libiconv, confirming that I want to do that despite ~40 packages depend on it, but then CMake was one of these…
There’s also a libiconv in /usr (macOS-provided, I assume), which gets picked up first when I enable DCMTK_WITH_ICONV. Building with DCMTK_WITH_ICONV and either the /usr or the /opt/local (MacPorts) version did not work, either. (Leading to the exact same linker error.)
So, back to square one: Why am I getting these missing symbols when DCMTK_WITH_ICONV is disabled, as it should be, in the first place?
and Qt is version 4.8.7_5 (although that shouldn’t make a difference for dcmtk, AFAICS). I also tried a fresh build with CMAKE_OSX_DEPLOYMENT_TARGET=10.11, FWIW. CMake is 3.10.1.
On @che85’s machine with Sierra, but HomeBrew instead of MacPorts, we managed to compile the same code.
As you can see, the dcmtk build & source directories immediately follow the culprit, so why is that one in front?
Got it! DCMTK_WITH_ICU was enabled! Now I can build. Still, I wonder why this flag leads to the include path being prepended instead of appended after the superbuild-paths. Maybe someone subscribed to dcmtk lists or involved in dcmtk and its CMake system would like to fix this?