MantisBT - CMake
View Issue Details
0014677CMakeCPackpublic2014-01-01 14:192015-11-02 09:13
Clinton Stimpson 
Clinton Stimpson 
normalminoralways
closedfixed 
Linux
CMake 3.0 
CMake 3.3CMake 3.3 
0014677: cpack gives archive_read_disk_entry_from_file: Can't lstat <file>
CPack archive generator gives an error when using these two settings together.

set(CPACK_ARCHIVE_COMPONENT_INSTALL 1)
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/My-1.0")

The result is that I cannot create a .tar.gz package.
Use this CMakeLists.txt file:


file(WRITE file.txt.in "hi")
configure_file(file.txt.in ${CMAKE_CURRENT_BINARY_DIR}/file-runtime.txt)
configure_file(file.txt.in ${CMAKE_CURRENT_BINARY_DIR}/file-devel.txt)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/file-runtime.txt
        DESTINATION bin COMPONENT Runtime)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/file-devel.txt
        DESTINATION lib COMPONENT Development)

set(CPACK_COMPONENTS_ALL Development)
set(CPACK_ARCHIVE_COMPONENT_INSTALL 1)
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/My-1.0")
include(CPack)
With -V, cpack gives:

CPack: Create package
CPack Verbose: Package files to: _CPack_Packages/Linux/TGZ/Project-0.1.1-Linux.tar.gz
CPack Verbose: Component <Development> does not belong to any group, package it separately.
CPack Verbose: - packaging component: Development
CPack Error: ERROR while packaging files: archive_read_disk_entry_from_file: Can't lstat lib/file-devel.txt


It also doesn't make sense that I get the message "Component <Development> does not belong to any group, package it separately", when I'm already packaging it separatly by setting CPACK_COMPONENTS_ALL.
No tags attached.
Issue History
2014-01-01 14:19Clinton StimpsonNew Issue
2015-03-30 09:27Brad KingNote Added: 0038360
2015-03-30 09:27Brad KingAssigned To => Clinton Stimpson
2015-03-30 09:27Brad KingStatusnew => resolved
2015-03-30 09:27Brad KingResolutionopen => fixed
2015-03-30 09:27Brad KingFixed in Version => CMake 3.3
2015-03-30 09:27Brad KingTarget Version => CMake 3.3
2015-11-02 09:13Robert MaynardNote Added: 0039753
2015-11-02 09:13Robert MaynardStatusresolved => closed

Notes
(0038360)
Brad King   
2015-03-30 09:27   
cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e3f84fc5 [^]
(0039753)
Robert Maynard   
2015-11-02 09:13   
Closing resolved issues that have not been updated in more than 4 months.