[Insight-developers] Slicer4 and ITKv4 packaging

Bill Lorensen bill.lorensen at gmail.com
Sat Feb 25 19:08:19 EST 2012


Great news.

1) linux packaging of Slicer4/ITKv4 works
2) mac packaging of Slicer4/ITKv4 works

I need to check in changes to Slicer4, but I will wait until the
dashboard madness subsides.

After that, I'll be looking for someone to verify the packaging for windows.

Thanks to Jc for all of his help,

Bill

On Sat, Feb 25, 2012 at 11:04 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Hans,
>
> The Slicer dashboard looks pretty bad today. I'll wait until it clears
> up before checking my changes.
>
> I'm verifying the Mac package now.
>
> Bill
>
> On Sat, Feb 25, 2012 at 10:22 AM, Johnson, Hans J
> <hans-johnson at uiowa.edu> wrote:
>> Bill,
>>
>> THANK YOU, THANK YOU, THANK YOU!
>>
>> I am extremely appreciative of your efforts in getting this issue
>> resolved.  Please let me know when you feel the ITKv4 packaging is working
>> and committed for Slicer so that I can start on the todo list that has
>> been waiting on this.
>>
>> Thanks,
>> Hans
>>
>> On 2/25/12 7:25 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>>
>>>Yes, I made both changes and the linux package works great. I ran the
>>>tests and several fail but I think that most are failing on ITKv3
>>>(although tray's Slicer dashboard has problems).
>>>
>>>Now I'm trying the Mac packaging.
>>>
>>>On Sat, Feb 25, 2012 at 12:54 AM, Jean-Christophe Fillion-Robin
>>><jchris.fillionr at kitware.com> wrote:
>>>> Excellent
>>>>
>>>> Just to make sure there are no confusion, both changes are required.
>>>>This is
>>>> particularly important for the Mac packaging.  Do you think you could
>>>>give a
>>>> try ?
>>>>
>>>> Note also that installing all components of ITKv4 is a workaround. I
>>>>just
>>>> created an entry in Jira https://issues.itk.org/jira/browse/ITK-2893
>>>>
>>>> Thanks
>>>> Jc
>>>>
>>>>
>>>> On Fri, Feb 24, 2012 at 11:39 PM, Bill Lorensen
>>>><bill.lorensen at gmail.com>
>>>> wrote:
>>>>>
>>>>> Jc,
>>>>>
>>>>> Thanks. I had tried 1) before without success. After doing 2)
>>>>> everything installs fine and runs fine.
>>>>>
>>>>> Thanks again. I'll check in the changes over the weekend.
>>>>>
>>>>> Bill
>>>>>
>>>>> On Fri, Feb 24, 2012 at 10:18 PM, Jean-Christophe Fillion-Robin
>>>>> <jchris.fillionr at kitware.com> wrote:
>>>>> > Bill,
>>>>> >
>>>>> > Please consider the solution I discussed in my previous email and
>>>>>things
>>>>> > should work better :)
>>>>> >
>>>>> > To summarise:
>>>>> >
>>>>> > 1) In External_ITKv4.cmake
>>>>> >
>>>>> >
>>>>> > -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)  Around line 9 of  CMake/SlicerBlockInstallCMakeProjects.cmake,
>>>>>add
>>>>> > the
>>>>> > following:
>>>>> >
>>>>> >
>>>>> > 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};/")
>>>>> >
>>>>> > Hth
>>>>> > Jc
>>>>> >
>>>>> >
>>>>> > On Fri, Feb 24, 2012 at 8:23 PM, Bill Lorensen
>>>>><bill.lorensen at gmail.com>
>>>>> > wrote:
>>>>> >>
>>>>> >> 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.c
>>>>>make#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=d9ac50f81439c1
>>>>>7f490d1cd8fb00f07afc861015;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=b
>>>>>9458d73e2f2df2bf85220da7ad09d2934d78be5;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=55
>>>>>749ea90e6d8d253d882b5a9cf7524cd92bcf7c;hb=389c62087f77cf116cf53039f4d667
>>>>>a544c824bc#l168
>>>>> >> >
>>>>> >> > The workaround the component issue would be to add the following
>>>>>line
>>>>> >> > in
>>>>> >> >
>>>>> >> >
>>>>> >> >
>>>>>https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockInstallCMa
>>>>>keProjects.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/SlicerBlockInstallCMa
>>>>>keProjects.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
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > +1 919 869 8849
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Unpaid intern in BillsBasement at noware dot com
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> +1 919 869 8849
>>>>
>>>
>>>
>>>
>>>--
>>>Unpaid intern in BillsBasement at noware dot com
>>>_______________________________________________
>>>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
>>
>>
>>
>> ________________________________
>> Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
>> ________________________________
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-developers mailing list