Export to GitHub

wrapitk - issue #6

cpack issues: a package can only get created with admin privilage


Posted on Jan 13, 2009 by Massive Bird

cpack tries to copy cmake and python modules to the os used for developing during cpack runtime. These module files must be only installed on the target os system.


Run CPack packaging tool... CPack: Create package using DEB CPack: Install projects CPack: - Run preinstall target for: WrapITK CPack: - Install project: WrapITK CMake Error at install_wrapitk_compatibility.cmake:2 (FILE): file INSTALL cannot copy file "/media/USB-WD-1/dev-ubuntu/itk/WrapITK-bin/InstallOnly/FindWrapITK.cmake" to "/usr/share/cmake-2.6/Modules/FindWrapITK.cmake". Call Stack (most recent call first): cmake_install.cmake:72 (INCLUDE)

CMake Error at install_wrapitk_compatibility.cmake:3 (FILE): file INSTALL cannot copy file

"/media/USB-WD-1/dev-ubuntu/itk/WrapITK-bin/Languages/Python/InstallOnly/WrapITK.pth" to "/usr/lib/python2.5/site-packages/WrapITK.pth". Call Stack (most recent call first): cmake_install.cmake:72 (INCLUDE)

CPack Error: Error when generating package: WrapITK make: * [package] Error 1

Comment #1

Posted on Jan 13, 2009 by Massive Bird

WrapITK.pth points to /usr/local/lib/... which is probably associated with the prefix for 'make install'. The default for cpack is /usr/lib/... .

Comment #2

Posted on Jan 13, 2009 by Helpful Hippo

that's a problem caused by a python files used to give to python the path of the module. You can use INSTALL_WRAP_ITK_COMPATIBILITY=OFF to avoid the installation of that file, and thus make cpack happy.

Comment #3

Posted on Jan 14, 2009 by Massive Bird

The generated package does not include /lib/python2.5/site-packages/WrapITK.pth.

Comment #4

Posted on Jan 14, 2009 by Massive Bird

If you add the generic cmpack example to an external project, eg pybuffer, something similar happens. Add this to pybuffer/cmakelists.txt:


INCLUDE(InstallRequiredSystemLibraries) SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "My funky project") SET(CPACK_PACKAGE_VENDOR "Me, myself, and I")

SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")

SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")

SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "3") SET(CPACK_PACKAGE_VERSION_PATCH "2") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")

INCLUDE(CPack)

..and you'll get this:


$ make package [ 16%] Built target BufferConversionIdx [ 41%] Built target BufferConversionSwig [100%] Built target BufferConversionPython Run CPack packaging tool... CPack: Create package using DEB CPack: Install projects CPack: - Run preinstall target for: PyBuffer CPack: - Install project: PyBuffer CMake Error at cmake_install.cmake:36 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:40 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs/python. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:44 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/lib. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:48 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:52 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:56 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:60 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:64 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:68 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Python/Configuration. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:72 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Python. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:76 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs/python. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:80 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/lib. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:90 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/lib. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:102 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Python/itkExtras. Maybe need administrative privileges.

CPack Error: Error when generating package: PyBuffer make: * [package] Error 1 aliell@Nava:/media/USB-WD-1/dev-ubuntu/itk/WrapITK-ext-bin/PyBuffer$ make package [ 16%] Built target BufferConversionIdx [ 41%] Built target BufferConversionSwig [100%] Built target BufferConversionPython Run CPack packaging tool... CPack: Create package using DEB CPack: Install projects CPack: - Run preinstall target for: PyBuffer CPack: - Install project: PyBuffer CMake Error at cmake_install.cmake:36 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:40 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs/python. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:44 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/lib. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:48 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:52 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:56 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:60 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:64 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:68 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Python/Configuration. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:72 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Python. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:76 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Configuration/Typedefs/python. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:80 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/lib. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:90 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/lib. Maybe need administrative privileges.

CMake Error at cmake_install.cmake:102 (FILE): file cannot create directory: /usr/local/lib/InsightToolkit/WrapITK/Python/itkExtras. Maybe need administrative privileges.

CPack Error: Error when generating package: PyBuffer make: * [package] Error 1

Comment #5

Posted on Jan 15, 2009 by Massive Bird

Issue 8 has been merged into this issue.

Comment #6

Posted on Jan 15, 2009 by Massive Bird

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Critical