I’m currently trying to build the latest release with DCMTK+ICU.
Compilation fails due to the following error:
[…]/ITK_4-13/Modules/ThirdParty/DCMTK/ITKDCMTK_ExtProject/ofstd/libsrc/ofchrenc.cc:58:10: fatal error: ‘unicode/ucnv.h’ file not found
Since it seemed like an unicode related error, I tried to build without ICU, but same problem. This may be a pure DCMTK error, but I haven’t found any related topic in the OFFIS forum.
Did I miss some prerequisite step ?
In ITK 4.13, ITK’s DCMTK build was extended to include ICU support. There may me some corner issues for certain operating system’s / build systems / compilers.
Could you please let us know what OS / build system / compiler is used in this case to reproduce the issue?
Here are the details:
MacOS 10.13.2
Xcode 9.2 ( with Apple LLVM / Clang 9.0 )
Cmake 3.10.1
I will also try a Windows build to see if I can reproduce.
-> EDIT: the configuration with the same Cmake on Windows 10 with VisualStudio17 has built seamlessly.
I don’t have any linux to try
Some additional informations: the windows build fails to link during compilation.
A simple example that just try to instanciate a DCMTKSeriesFileNames lead to following errors:
A patch has been merged in ITK and should solve the MacOS build issue you had. Do you have a small project you could share to test your link error on Windows?
The patch has solved the linking error on Windows . Thank you !
On debug config there is just a bunch of warnings:
2>icuucd.lib(putil.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(putil.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(umath.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(umath.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(utypes.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utypes.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uinvchar.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uinvchar.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(umutex.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(umutex.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucln_cmn.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucln_cmn.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uobject.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uobject.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(cmemory.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(cmemory.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(charstr.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(charstr.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(udata.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(udata.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucmndata.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucmndata.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(udatamem.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(udatamem.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(umapfile.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(umapfile.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(udataswp.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(udataswp.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucol_swp.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucol_swp.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(utrace.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utrace.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uhash.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uhash.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uenum.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uenum.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ustrenum.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustrenum.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uvector.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uvector.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_bld.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_bld.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_cnv.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_cnv.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_io.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_io.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_cb.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_cb.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_err.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_err.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnvlat1.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvlat1.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_u7.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u7.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_u8.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u8.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_u16.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u16.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_u32.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_u32.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnvscsu.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvscsu.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnvbocu.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvbocu.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_ext.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_ext.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnvmbcs.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvmbcs.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv2022.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv2022.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnvhz.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvhz.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_lmb.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_lmb.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnvisci.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnvisci.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ucnv_ct.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ucnv_ct.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(resource.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(resource.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uresbund.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uresbund.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uresdata.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uresdata.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(locmap.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(locmap.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uloc.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uloc.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(locid.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(locid.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(stringpiece.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(stringpiece.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(appendable.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(appendable.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ustr_cnv.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustr_cnv.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(unistr.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(unistr.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(utf_impl.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utf_impl.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ustring.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustring.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(cstring.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(cstring.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ustrfmt.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustrfmt.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(ustrtrns.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(ustrtrns.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(utrie2.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(utrie2.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uarrsort.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uarrsort.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(wintz.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(wintz.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uloc_tag.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uloc_tag.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
2>icuucd.lib(uloc_keytype.ao) : warning LNK4099: PDB 'vc140.pdb' was not found with 'icuucd.lib(uloc_keytype.ao)' or at 'C:\Code\speedtest\builds\Debug\vc140.pdb'; linking object as if no debug info
These seem to be more a ICU problem. I haven’t tried to build without.
The bad news are on MacOS side : the master still fail during build with the very same error.
Just as a side question rather than opening a new topic, I’ve noticed that there are inconsistent behaviors between the GDCM/DCMTK SeriesFileNames:
the GetSeriesUIDs method of the former return a list of uniques UIDs found whereas the DCMTK one return all UIDs. Is it expected to stay as it is due to underlying differences ?
Thanks for testing. The warnings could be solved easily I think if I was packaging the pdb file in the ICU package that I create. I am still unsure that this patch is THE solution. I want to understand what is actually happening before I merge it, so it might take a couple of days before master works on Windows again.
I am surprised about the MacOS issue as another ITK developer had an issue with MacOS a couple days ago, and his issue seemed to be solved with one of the recent patches. I’ll take a look at it again.
As for the differences between DCTMK and GDCM, I don’t know, but maybe @blowekamp or @matt.mccormick will have an idea.
As far as I’m concerned, the current workaround is sufficient to fiddle with my project.
Note that building ITK with a “system” DCMTK still works in the master, so users still can use it.
It is just the fact that you guys make configuration setup way easier with the ITK bundling .
So many thanks !
Good to know, as the documentation isn’t really clear on that. Thanks Matt!
@tim-evain The current work around is incomplete and would need more work to be integrated in ITK:
The precompiled ICU packages would need to be re-created to include the missing DLL (icudt.dll).
The missing DLL needs to be installed in the correct location in ITK build tree.
The missing DLL needs to be installed in the correct location in the ITK install tree.
My question for you is: Do you need ICU?
I could also disable the compilation of ICU on Windows inside ITK. The user could then either build DCMTK without ICU (like it is already done in some projects using ITK, e.g. 3D Slicer), or provide their own version of ICU and manage it themselves.
@tim-evain: The new version of the patch disables ICU both on Windows and MacOS. This should solve your problems on both platforms. Please let me know if you are able to test it and if it resolves your issues. The patch is available here.
I merged the patch in ITK. Thanks for the report and the testing. The integration of DCMTK is likely going to change a bit in the coming months. I have some ideas to try to simplify the current implementation:
Remove ICU from ITK and let the user deal with special compilations of DCMTK on their own.
Integrate the source code of DCMTK in ITK using some very recent CMake modules.
I’ll try to update this topic when these changes happen. They are not at the top of my to-do list.