On 05/22/2012 12:54 PM, Clarkson, Matt wrote:
> Hi there,
>
> as you know my project builds MITK a bit like the
> MITK-Project-Template.... so it's a bit different to the MITK out of the
> box.
> I just ran into a problem, so I don't know if I messed something up, or
> if there is an MITK config issue on Mac.
>
> I updated my code, with a latest version of MITK while working on my
> Linux machine, and everything was building nicely, then I switched to my
> MacBook Pro, 10.6, gcc 4.2.1.
>
> So, I build DCMTK version using dcmtk-3.6.1_20120222.tar.gz as done here:
> https://github.com/MattClarkson/MITK/blob/master/CMakeExternals/DCMTK.cmake#L29
>
> Then I build CTK and I assume that if MITK builds CTK using
> MITK_USE_DCMTK=ON, then I must build CTK and set -DDCMTK_DIR as done here:
> https://github.com/MattClarkson/MITK/blob/master/CMakeExternals/CTK.cmake#L32
>

Hi Matt,

this should work.

> However, I got the following build problem on Mac only:
> [ 80%] Building CXX object
> Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/qrc_ctkDICOMCore.cxx.o
> Linking CXX shared library ../../../bin/libCTKDICOMCore.dylib
> Undefined symbols:
> "_iconvctl", referenced from:
> OFCharacterEncoding::convertString(void*, char const*, unsigned long,
> OFString&, bool)in libofstd.a(ofchrenc.cc.o)
> OFCharacterEncoding::convertString(void*, char const*, unsigned long,
> OFString&, bool)in libofstd.a(ofchrenc.cc.o)

using libiconv is a new DCMTK feature. Unfortunately it's difficult to 
integrate in the MITK or CTK build system, so the best choice is to set
DCMTK_WITH_ICONV:BOOL=OFF when building DCMTK.

I think the other errors you describe are somehow the result of an 
incompatible version mix. If not I can check this again.

Best
Marco


> "_iconv_close", referenced from:
> OFCharacterEncoding::closeDescriptor(void*&) in libofstd.a(ofchrenc.cc.o)
> "_locale_charset", referenced from:
> OFCharacterEncoding::updateLocaleEncoding() in libofstd.a(ofchrenc.cc.o)
> OFCharacterEncoding::updateLocaleEncoding() in libofstd.a(ofchrenc.cc.o)
> "_iconv", referenced from:
> OFCharacterEncoding::convertString(void*, char const*, unsigned long,
> OFString&, bool)in libofstd.a(ofchrenc.cc.o)
> OFCharacterEncoding::convertString(void*, char const*, unsigned long,
> OFString&, bool)in libofstd.a(ofchrenc.cc.o)
> "_iconv_open", referenced from:
> OFCharacterEncoding::openDescriptor(void*&, OFString const&, OFString
> const&)in libofstd.a(ofchrenc.cc.o)
> "__libiconv_version", referenced from:
> OFCharacterEncoding::getLibraryVersionString() in libofstd.a(ofchrenc.cc.o)
> OFCharacterEncoding::getLibraryVersionString() in libofstd.a(ofchrenc.cc.o)
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[8]: *** [bin/libCTKDICOMCore.0.1.0.dylib] Error 1
>
> This led me to believe I must have the wrong version of DCMTK.
>
> Then I looked, and found that CTK is built using a specific version of
> DCMTK as seen here:
> https://github.com/MattClarkson/MITK/blob/master/CMakeExternals/CTK.cmake#L68
>
> So, I changed my build to provide -DDCMTK_URL in a similar fashion, and
> re-built. CTK now builds its own DCMTK using CTK_DCMTK_085525e6.tar.gz.
>
> However, I then got the following problem:
>
> [ 79%] Building CXX object
> Libs/DICOM/Core/CMakeFiles/CTKDICOMCore.dir/ctkDICOMQuery.cpp.o
> /Users/mattclarkson/build/NifTK-SuperBuild/CTK-src/Libs/DICOM/Core/ctkDICOMQuery.cpp:67:
> error: ‘QRResponse’ has not been declared
> /Users/mattclarkson/build/NifTK-SuperBuild/CTK-build/CMakeExternals/Install/include/dcmtk/dcmnet/scu.h:486:
> warning: ‘virtual OFCondition
> DcmSCU::handleFINDResponse(T_ASC_PresentationContextID, FINDResponse*,
> bool&)’ was hidden
>
> But then I thought, that I don't really need the DICOM widgets right
> now. I have always wondered why they default to on here:
> https://github.com/MattClarkson/MITK/blob/master/CMakeExternals/CTK.cmake#L64
>
> So, I manually configured the CTK CTK_LIB_DICOM/Widgets=OFF and
> CTK_LIB_DICOM/Core=OFF and rebuilt CTK.
> However, MITK then would not configure
>
> CMake Error at
> /Users/mattclarkson/build/NifTK-SuperBuild/CTK-src/CMake/ctkMacroValidateBuildOptions.cmake:194
> (message):
> org_blueberry_ui_qt_help depends on unknown external targets: CTKWidgets
> Call Stack (most recent call first):
> /Users/mattclarkson/build/NifTK-SuperBuild/CTK-src/CMake/ctkMacroSetupPlugins.cmake:165
> (ctkMacroValidateBuildOptions)
> BlueBerry/CMakeLists.txt:227 (ctkMacroSetupPlugins)
>
> Which is strange, as I had never changed the configuration of this
> library, but sure enough it had defaulted to off.
>
> So,I turned it back on again manually re-built CTK (i.e. with
> CTK_LIB_DICOM/Widgets=OFF and CTK_LIB_DICOM/Core=ON and
> CTK_LIB_Widgets=ON) and then MITK builds.
> So, on Mac, (it's still building), but I believe that I can have a
> successful build with
>
> -DCTK_LIB_DICOM/Widgets:BOOL=OFF
> -DCTK_LIB_DICOM/Core:BOOL=OFF
> -DCTK_LIB_WIDGETS:BOOL=ON
>
> and the above mentioned versions of DCMTK, but not otherwise.
>
> So, does the CTK.cmake within MITK need updating, or did I just make a
> mess of things?
>
> Thanks
>
> Matt
>
>
>
>
>


-- 
----------------------------------------------------------------------
Dipl.-Inform. Med. Marco Nolden
Deutsches Krebsforschungszentrum       (German Cancer Research Center)
Div. Medical & Biological Informatics          Tel: (+49) 6221-42 2325
Im Neuenheimer Feld 280                        Fax: (+49) 6221-42 2345
D-69120 Heidelberg                             eMail: [email protected]

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to