I'm still new to CMake/CPack tools. This is a short example of my problem with CPack - the real project is much-much bigger. My CMakeLists.txt
file is below:
cmake_minimum_required(VERSION 3.9)
project(tm0001)
set(CMAKE_CXX_STANDARD 11)
add_executable(${PROJECT_NAME} tm0001.cpp)
set(CPACK_PACKAGE_CONTACT "HEKTO")
set(CPACK_PACKAGE_VERSION_MAJOR 1)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH 0)
set(CPACK_GENERATOR "DEB")
include(CPack)
It's not important what is in the tm0001.cpp
file - it may be just a simple Hello World
program. I'm trying to generate a deb-file for this project but getting an error:
hekto@ubuntu:~/tm0001/build$ make package
Scanning dependencies of target tm0001
[ 50%] Building CXX object CMakeFiles/tm0001.dir/tm0001.cpp.o
[100%] Linking CXX executable tm0001
[100%] Built target tm0001
Run CPack packaging tool...
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: tm0001
CPack: - Install project: tm0001
CPack: Create package
CPack Error: Error creating debian package:
#top level directory: /home/hekto/tm0001/build/_CPack_Packages/Linux/DEB
#file: tm0001-1.0.0-Linux.deb
#error:archive_write_header: Numeric user ID too large
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: tm0001
make: *** [package] Error 1
What's the meaning of this Numeric user ID too large
message? Where is it from? How to get rid of it?
(CMake/CPack version is 3.11.3)
This is a now-fixed bug in CMake 3.10 and 3.11. It has been fixed in 3.12. Either use CMake 3.9 or earlier, or CMake 3.12 or later.