4.13 started adding a 'd' suffix to some built libraries?

Hi all,

I just tried building 4.13 and there seems to have been a change in the naming of some libraries, specifically, some now seem to have a ‘d’ suffix, perhaps meaning ‘debug’?

ex: libITKIONIFTId.a

In 4.12, this was named simply libITKIONIFTI.a.

On the other hand, libITKCommon.a doesn’t seem to have changed names.

Of note: I specify ITK_CUSTOM_LIBRARY_SUFFIX to be an empty string in my builds.

Was this a deliberate change? Did I mess up my build somehow?

Thanks,

Hi Sean,

Nothing comes to mind in ITK that would have changed this behavior.

Matt

I noticed the d suffix too. Could it be a change of defaults in a recent CMake?

The cmake variable dealing with debug suffixes I think is: CMAKE_DEBUG_POSTFIX.

Doing egrep -nr "CMAKE_DEBUG_POSTFIX" . in the ITK directory shows:

./Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt:545:    set(CMAKE_DEBUG_POSTFIX "${GDCM_DEBUG_POSTFIX}")
./Modules/ThirdParty/GDCM/src/gdcm/CMake/InstallMacros.cmake:79:      # the value of CMAKE_DEBUG_POSTFIX

But it is more likely due to some change in cmake defaults as @dzenanz suggested.

We just tried with CMake 3.6.2 (pretty old), and still get the ‘d’ suffix with it.

Sean

Well, I dunno when/why this all started, but I did a fresh build with git master and set CMAKE_DEBUG_POSTFIX to an empty string and now those ‘d’ suffixes are blessedly gone. I did notice some other suspect names though:

libITKgiftiio-4.0.a
libITKniftiio-4.0.a
libITKznz-4.0.a

these are the only ones named with “4.0”, not “5.0”. Is that deliberate?

Sean

No, these should have 5.0.

@seanm: I think this CMAKE_DEBUG_POSTFIX was added when GoogleTest was updated (See here). I’ll see if I can remove that to solve that issue and if so I’ll create a patch.

@matt.mccormick I was indeed able to reproduce @seanm statement. On Windows, with Visual Studio 2017, I have the same library names than Sean reported (3 *-4.0a files).

EDIT: On Linux, with clang, I do have the same naming issues.

2 Likes

Here is a patch to address the first problem reported in this thread (suffix):
http://review.source.kitware.com/#/c/23018/

1 Like

The patch for the suffix was merged in ITK. Please let me know if you still have any issue.

1 Like

Great work!

@seanm:The 4.0 suffix was solved here.

1 Like

Unfortunately my Visual Studio 2017 Debug build on yesterday’s master (a4b385679b8b10c5a7e1428385987877832ac261, Hans Johnson, 2018-02-04, Merge topic ‘PreferConstExprNumericLiterals’) has produced lib files that have a ‘d’ suffix, in \lib\Debug:

2018-02-05  03:01 PM           285,514 ITKBiasCorrection-5.0d.lib
2018-02-05  03:01 PM        41,711,882 ITKCommon-5.0d.lib
2018-02-05  03:00 PM         8,386,826 ITKDICOMParser-5.0d.lib
2018-02-05  03:00 PM           503,912 itkdouble-conversion-5.0d.lib
2018-02-05  03:00 PM           542,650 ITKEXPAT-5.0d.lib
2018-02-05  03:01 PM        22,871,462 ITKFEM-5.0d.lib
2018-02-05  03:00 PM         3,346,206 itkgdcmcharls-5.0d.lib
2018-02-05  03:00 PM         4,891,626 itkgdcmCommon-5.0d.lib
2018-02-05  03:00 PM         7,151,844 itkgdcmDICT-5.0d.lib
2018-02-05  03:00 PM        32,915,534 itkgdcmDSED-5.0d.lib
2018-02-05  03:00 PM         5,255,744 itkgdcmIOD-5.0d.lib
2018-02-05  03:00 PM           805,500 itkgdcmjpeg12-5.0d.lib
2018-02-05  03:00 PM           806,154 itkgdcmjpeg16-5.0d.lib
2018-02-05  03:00 PM           803,948 itkgdcmjpeg8-5.0d.lib
2018-02-05  03:01 PM        47,099,858 itkgdcmMEXD-5.0d.lib
2018-02-05  03:01 PM        81,704,690 itkgdcmMSFF-5.0d.lib
2018-02-05  03:00 PM         1,113,746 itkgdcmopenjp2-5.0d.lib
2018-02-05  03:00 PM         1,089,132 itkgdcmsocketxx-5.0d.lib
2018-02-05  03:00 PM           367,888 ITKgiftiio-5.0d.lib
2018-02-05  03:00 PM         8,988,874 itkgtest-5.0d.lib
2018-02-05  03:00 PM            74,822 itkgtest_main-5.0d.lib
2018-02-05  03:01 PM         1,293,548 ITKIOBioRad-5.0d.lib
2018-02-05  03:01 PM         1,476,804 ITKIOBMP-5.0d.lib
2018-02-05  03:01 PM         3,937,742 ITKIOBruker-5.0d.lib
2018-02-05  03:01 PM           691,622 ITKIOCSV-5.0d.lib
2018-02-05  03:01 PM         4,280,446 ITKIOGDCM-5.0d.lib
2018-02-05  03:01 PM         3,649,940 ITKIOGE-5.0d.lib
2018-02-05  03:01 PM         1,342,590 ITKIOGIPL-5.0d.lib
2018-02-05  03:01 PM         4,578,902 ITKIOHDF5-5.0d.lib
2018-02-05  03:01 PM         5,995,604 ITKIOImageBase-5.0d.lib
2018-02-05  03:01 PM         1,715,648 ITKIOIPL-5.0d.lib
2018-02-05  03:01 PM         1,160,958 ITKIOJPEG-5.0d.lib
2018-02-05  03:01 PM         1,033,194 ITKIOLSM-5.0d.lib
2018-02-05  03:01 PM        17,112,768 ITKIOMesh-5.0d.lib
2018-02-05  03:01 PM         2,482,782 ITKIOMeta-5.0d.lib
2018-02-05  03:01 PM         1,691,798 ITKIOMINC-5.0d.lib
2018-02-05  03:01 PM         1,912,876 ITKIOMRC-5.0d.lib
2018-02-05  03:01 PM         1,644,982 ITKIONIFTI-5.0d.lib
2018-02-05  03:01 PM         1,820,106 ITKIONRRD-5.0d.lib
2018-02-05  03:01 PM         1,245,912 ITKIOPNG-5.0d.lib
2018-02-05  03:01 PM         1,206,090 ITKIOSiemens-5.0d.lib
2018-02-05  03:01 PM         3,796,126 ITKIOSpatialObjects-5.0d.lib
2018-02-05  03:01 PM         1,376,702 ITKIOStimulate-5.0d.lib
2018-02-05  03:01 PM         2,277,664 ITKIOTIFF-5.0d.lib
2018-02-05  03:01 PM        10,960,178 ITKIOTransformBase-5.0d.lib
2018-02-05  03:01 PM         2,289,424 ITKIOTransformHDF5-5.0d.lib
2018-02-05  03:01 PM         2,525,592 ITKIOTransformInsightLegacy-5.0d.lib
2018-02-05  03:01 PM         1,604,404 ITKIOTransformMatlab-5.0d.lib
2018-02-05  03:01 PM         1,543,234 ITKIOVTK-5.0d.lib
2018-02-05  03:01 PM         5,155,456 ITKIOXML-5.0d.lib
2018-02-05  03:00 PM           947,402 itkjpeg-5.0d.lib
2018-02-05  03:01 PM         1,834,440 ITKKLMRegionGrowing-5.0d.lib
2018-02-05  03:01 PM            54,924 ITKLabelMap-5.0d.lib
2018-02-05  03:00 PM            42,054 itklbfgs-5.0d.lib
2018-02-05  03:01 PM           579,710 ITKMesh-5.0d.lib
2018-02-05  03:00 PM        15,497,790 ITKMetaIO-5.0d.lib
2018-02-05  03:00 PM         1,638,494 itkminc2-5.0d.lib
2018-02-05  03:00 PM           444,368 itknetlib-5.0d.lib
2018-02-05  03:00 PM           116,126 itkNetlibSlatec-5.0d.lib
2018-02-05  03:00 PM           358,424 ITKniftiio-5.0d.lib
2018-02-05  03:00 PM         1,015,230 ITKNrrdIO-5.0d.lib
2018-02-05  03:01 PM        14,827,420 ITKOptimizers-5.0d.lib
2018-02-05  03:01 PM         3,919,608 ITKOptimizersv4-5.0d.lib
2018-02-05  03:01 PM         1,443,768 ITKPath-5.0d.lib
2018-02-05  03:00 PM         1,005,924 itkpng-5.0d.lib
2018-02-05  03:01 PM           557,784 ITKPolynomials-5.0d.lib
2018-02-05  03:01 PM            94,834 ITKQuadEdgeMesh-5.0d.lib
2018-02-05  03:01 PM         7,865,246 ITKSpatialObjects-5.0d.lib
2018-02-05  03:01 PM         4,030,500 ITKStatistics-5.0d.lib
2018-02-05  03:00 PM         9,686,996 itksys-5.0d.lib
2018-02-05  03:00 PM         1,012,242 itktestlib-5.0d.lib
2018-02-05  03:00 PM         1,426,994 itktiff-5.0d.lib
2018-02-05  03:01 PM           317,944 ITKTransform-5.0d.lib
2018-02-05  03:01 PM        66,411,776 ITKTransformFactory-5.0d.lib
2018-02-05  03:00 PM         4,041,208 itkv3p_netlib-5.0d.lib
2018-02-05  03:00 PM            51,996 itkvcl-5.0d.lib
2018-02-05  03:01 PM         1,612,270 ITKVideoCore-5.0d.lib
2018-02-05  03:01 PM         2,587,570 ITKVideoIO-5.0d.lib
2018-02-05  03:00 PM        77,324,634 itkvnl-5.0d.lib
2018-02-05  03:00 PM         5,590,502 ITKVNLInstantiation-5.0d.lib
2018-02-05  03:00 PM        10,672,600 itkvnl_algo-5.0d.lib
2018-02-05  03:01 PM           489,434 ITKVTK-5.0d.lib
2018-02-05  03:01 PM           485,738 ITKWatersheds-5.0d.lib
2018-02-05  03:00 PM           219,862 itkzlib-5.0d.lib
2018-02-05  03:00 PM            17,680 ITKznz-5.0d.lib
			  85 File(s)    600,744,396 bytes

Is it intended like that?

Was your build a clean build? Do you have a CMake variable CMAKE_DEBUG_POSTFIX set to d? Can you try to delete this CMake variable and reconfigure, and see if you still get this behavior? Normally it should now be initialized to an empty string and therefore you should not have this d suffix anymore.

1 Like

Thanks, @fbudin CMake Delete Cache + Rebuild All solved the problem for me (as your suggestion to just delete then CMAKE_DEBUG_POSTFIX CMake variable would do, I guess). There are still two lib files left that end with a “d” (actually “_D”), in my lib\Debug directory:

libitkhdf5_cpp_D.lib
libitkhdf5_D.lib

But honestly, that’s no problem to me, as I don’t link to them anyway :grinning:

2 Likes