[Insight-developers] Slicer4 and ITKv4 packaging

Bill Lorensen bill.lorensen at gmail.com
Fri Feb 24 20:23:53 EST 2012


I've have seen the same issues that you see. I have tried specifying
-DITK_INSTALL_LIB_DIR:PATH=${Slicer_INSTALL_LIB_DIR}
and it does not seem to change anything.

What puzzles me is that a make package for ITKv4 (outside of slicer)
produces a valid package.

Bill

On Fri, Feb 24, 2012 at 6:14 PM, Jean-Christophe Fillion-Robin
<jchris.fillionr at kitware.com> wrote:
> Hi Bill,
>
> Thanks for working on the ITKv4 integration. I will try to provide
> additional details and guidance below.
>
> Slicer packaging system install its  dependent project using cmake by
> specifying explicitly which components should be installed in the Slicer
> install tree.
>
> I just run a "make package" in a Slicer-ITKv4  build tree, and I notice that
> only the following libraries are installed:
>
> libITKDICOMParser-4.1.so
> libITKEXPAT-4.1.so
> libITKgiftiio-4.1.so
> libitkjpeg-4.1.so
> libITKMetaIO-4.1.so
> libitkNetlibSlatec-4.1.so
> libITKniftiio-4.1.so
> libITKNrrdIO-4.1.so
> libitkopenjpeg-4.1.so
> libitkpng-4.1.so
> libitktiff-4.1.so
> libitkv3p_lsqr-4.1.so
> libitkv3p_netlib-4.1.so
> libitkvcl-4.1.so
> libitkvnl-4.1.so
> libitkvnl_algo-4.1.so
> libitkzlib-4.1.so
> libITKznz-4.1.so
>
>
> 1) There libraries are located in ./lib folder whereas they are expected in
> "./lib/Slicer-4.0". Looking at ITKv3 external project. The option
>
> -DITK_INSTALL_LIB_DIR:PATH=${Slicer_INSTALL_LIB_DIR}
>
> is passed.
>
> See
> https://github.com/Slicer/Slicer/blob/master/SuperBuild/External_ITKv3.cmake#L52
>
> It means the same thing should probably be done for ITKv4 external project.
>
> Looking at the CMakeLists.txt, there is indeed a variables named
> ITK_INSTALL_LIBRARY_DIR, ITK_INSTALL_ARCHIVE_DIR, ...
> See
> http://itk.org/gitweb?p=ITK.git;a=blob;f=CMakeLists.txt;h=d9ac50f81439c17f490d1cd8fb00f07afc861015;hb=HEAD#l50
>
> In the case of ITKv4, we should probably set the following:
>
> -DITK_INSTALL_INSTALL_LIBRARY_DIR:PATH=${Slicer_INSTALL_LIB_DIR}
>
> -DITK_INSTALL_INSTALL_ARCHIVE_DIR:PATH=${Slicer_INSTALL_LIB_DIR}
>
> => This is something that should be documented in the migration guide if
> ITKv4.
> The variable  ITK_INSTALL_LIB_DIR isn't valid anymore.
>
>
>
>
> 2) The question regarding the components.
>
> Within ITKv4 source code, the "itk_module_target_install" macro seems to
> responsible of installing the target.
>
> Seems no Component is specified in the install rule. It means it's not
> possible to do a component based installation :( . It means that when ITKv4
> is packaged by an other project all the headers, doc, etc ... will be
> installed even if not needed. This something we would like to avoid in
> Slicer.
>
> See
> http://itk.org/gitweb?p=ITK.git;a=blob;f=CMake/ITKModuleMacros.cmake;h=b9458d73e2f2df2bf85220da7ad09d2934d78be5;hb=HEAD#l194
>
>
> Within ITKv3, a component was specified.
>
> IF(NOT ITK_INSTALL_NO_LIBRARIES)
>    INSTALL(TARGETS ITKCommon itkvnl_inst
>       RUNTIME DESTINATION ${ITK_INSTALL_BIN_DIR_CM24} COMPONENT
> RuntimeLibraries
>      LIBRARY DESTINATION ${ITK_INSTALL_LIB_DIR_CM24} COMPONENT
> RuntimeLibraries
>       ARCHIVE DESTINATION ${ITK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
>  ENDIF(NOT ITK_INSTALL_NO_LIBRARIES)
>
>
> See
> http://itk.org/gitweb?p=ITK.git;a=blob;f=Code/Common/CMakeLists.txt;h=55749ea90e6d8d253d882b5a9cf7524cd92bcf7c;hb=389c62087f77cf116cf53039f4d667a544c824bc#l168
>
> The workaround the component issue would be to add the following line in
> https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockInstallCMakeProjects.cmake#L9
>
> // --------------
> set(component ALL)
> if(${ITK_VERSION_MAJOR} STREQUAL "3")
>   set(component RuntimeLibraries)
> endif()
> set(CPACK_INSTALL_CMAKE_PROJECTS
> "${CPACK_INSTALL_CMAKE_PROJECTS};${ITK_DIR};ITK;${component};/")
> // --------------
>
>
> After applying this two fixes, let me know how it goes.
> Thanks
> Jc
>
>
> Ps: Documentation about CPACK_INSTALL_CMAKE_PROJECTS is here:
> http://www.cmake.org/Wiki/CMake:CPackConfiguration
>
>
>
> On Fri, Feb 24, 2012 at 4:56 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Jc,
>>
>> Please consider me a newbie regarding packaging. And, I have not
>> read/analyzed your e-mail. ITKv4, make package, creates a valid and
>> usable package. Why is that not sufficient for Slicer4?
>>
>> Bill
>>
>> On Fri, Feb 24, 2012 at 4:42 PM, Jean-Christophe Fillion-Robin
>> <jchris.fillionr at kitware.com> wrote:
>> > Hi Bill,
>> >
>> > Are you packaging on linux or mac ?
>> >
>> > //-----------------------------------
>> > Linux / Windows:
>> >
>> > Within Slicer, ITK is told to installed itself in the file
>> > SlicerBlockInstallCMakeProject
>> > s.cmake
>> >
>> > See
>> >
>> > https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockInstallCMakeProjects.cmake#L9
>> >
>> > You can see that the current system expects the ITK libraries to be
>> > associated with the RuntimeLibraries component.
>> >
>> > =>  Is it still the case with ITKv4 ?
>> >
>> > This file is itself included from here:
>> > https://github.com/Slicer/Slicer/blob/master/CMake/SlicerCPack.cmake#L32
>> >
>> >
>> > //-----------------------------------
>> > MacOSX:
>> >
>> > The fixup bundle mechanism expects the libraries to exist in
>> > ITK_LIBRARY_DIRS
>> > See
>> >
>> > https://github.com/Slicer/Slicer/blob/master/Utilities/LastConfigureStep/SlicerCompleteBundles.cmake.in#L201
>> >
>> > Is ITK_LIBRARY_DIRS properly set with ITKConfig.cmake ?
>> >
>> > Hth
>> > Jc
>> >
>> >
>> > On Fri, Feb 24, 2012 at 4:11 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> > wrote:
>> >>
>> >> Folks,
>> >>
>> >> I'm trying to package Slicer4 with ITKv4.
>> >>
>> >> 1) for ITKv4, make package produces a proper tarball that I can untar
>> >> and
>> >> use.
>> >> 2) for Sllicer4, make package does not contain the ITKv4 includes.
>> >> Also, the package contains ITKv4's ThirdParty libraries, but none of
>> >> the other ITK libraries.
>> >>
>> >> So, is there some special requirement in Slicer4 that must be present
>> >> to achieve a proper package?
>> >>
>> >> Bill
>> >> _______________________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Kitware offers ITK Training Courses, for more information visit:
>> >> http://kitware.com/products/protraining.html
>> >>
>> >> Please keep messages on-topic and check the ITK FAQ at:
>> >> http://www.itk.org/Wiki/ITK_FAQ
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://www.itk.org/mailman/listinfo/insight-developers
>> >
>> >
>> >
>> >
>> > --
>> > +1 919 869 8849
>> >
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com
>
>
>
>
> --
> +1 919 869 8849
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-developers mailing list