INSTALL query (itk,cmake)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

INSTALL query (itk,cmake)

Robert.Atwood
Hi,
I finally attempted to enable INSTALL support in my CMakeLists file for a project that uses ITK.
 
However when I install by this method the program loses the location of the ITK libraries.
 
__________________
 which itk_flop
/dls/i12/software/64/bin/itk_flop

 
 itk_flop
itk_flop: error while loading shared libraries: libITKCommon.so.3.15: cannot open shared object file: No such file or directory
_____________________
 
 
 
Simply copying the built project files into the installation destination does not lose the location.
 
________________
cp itk_flop /dls/i12/software/64/bin/
 
 which itk_flop
/dls/i12/software/64/bin/itk_flop
 itk_flop
Little program to use itk reading and writing
to convert file formats
including reading a series of files and writing an orthogonal series
 
Series Usage: itk_flop inbasename.xxx first last outbasename.yyy
______________________
 
What should be done? I'd like other users to be able to issue  'make install' and have it work for them.

 

I used these lines in my CMakeLists.txt file, as suggested by http://www.itk.org/Wiki/CMake:Install_Commands
 
 
 
 
SET(CMAKE_INSTALL_PREFIX "/dls/i12/software/64" CACHE PATH "Local installation
prefix" FORCE )
...
 
 INSTALL(TARGETS scanpar itk_flop itk_series_readwrite itk_parallel_project itk_readwrite_series
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib)
 
 
In ccmake I've selected the followign, which is indeed the location of InsightToolkit
 
 ITK_DIR                          /dls/i12/software/64/lib/InsightToolkit
 
Thanks,
Robert
 
 
 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: INSTALL query (itk,cmake)

Robert.Atwood
Hi,

I think I found some information on my own, about this.
 
 
Which explains the behaviour I observed (but didn't expect)
 
However, what is the recommended way for installing one's own itk-based programs and the itk-libraries for others on the system to use?
It seems I should either:
 
1 Have any itk users insert a LD_LIBRARY_PATH pointing to ...lib/InsightToolKit
 
2 Use full RPATH (vulnerable to assorted  filesystem layout change problems )
 
3 install ITK libraries in /usr/local/... (but that's not good for the cluster, /usr/local is not central but local to each node here)
 
Any suggestions?
 
I am veering towards option 1 combined with 'modules'  http://modules.sourceforge.net/ 
 
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Atwood, Robert (DLSLtd,RAL,DIA)
Sent: 08 September 2009 16:25
To: [hidden email]
Subject: [CMake] INSTALL query (itk,cmake)

Hi,
I finally attempted to enable INSTALL support in my CMakeLists file for a project that uses ITK.
 
However when I install by this method the program loses the location of the ITK libraries.
 
__________________
 which itk_flop
/dls/i12/software/64/bin/itk_flop

 
 itk_flop
itk_flop: error while loading shared libraries: libITKCommon.so.3.15: cannot open shared object file: No such file or directory
_____________________
 
 
 
Simply copying the built project files into the installation destination does not lose the location.
 
________________
cp itk_flop /dls/i12/software/64/bin/
 
 which itk_flop
/dls/i12/software/64/bin/itk_flop
 itk_flop
Little program to use itk reading and writing
to convert file formats
including reading a series of files and writing an orthogonal series
 
Series Usage: itk_flop inbasename.xxx first last outbasename.yyy
______________________
 
What should be done? I'd like other users to be able to issue  'make install' and have it work for them.

 

I used these lines in my CMakeLists.txt file, as suggested by http://www.itk.org/Wiki/CMake:Install_Commands
 
 
 
 
SET(CMAKE_INSTALL_PREFIX "/dls/i12/software/64" CACHE PATH "Local installation
prefix" FORCE )
...
 
 INSTALL(TARGETS scanpar itk_flop itk_series_readwrite itk_parallel_project itk_readwrite_series
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib)
 
 
In ccmake I've selected the followign, which is indeed the location of InsightToolkit
 
 ITK_DIR                          /dls/i12/software/64/lib/InsightToolkit
 
Thanks,
Robert
 
 
 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 



This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake