Debian CPACK generator crashes when packing component from raw files with debuginfo
Crash looks like:
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid
Aborted (core dumped)
Structure of the project is one module library, added as
add_library(foo MODULE foo.cpp )
, and one plain text file.
install ( TARGETS foo LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT module )
install ( FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT dev )
set ( CPACK_COMPONENTS_ALL module dev )
set ( CPACK_GENERATOR "DEB" )
set ( CPACK_DEB_COMPONENT_INSTALL ON )
set ( CPACK_DEBIAN_DEBUGINFO_PACKAGE ON )
Key is CPACK_DEBIAN_DEBUGINFO_PACKAGE
; packaging crashes because of it.
If I write instead set ( CPACK_DEBIAN_MODULE_DEBUGINFO_PACKAGE ON )
(i.e. ask for debuginfo only for MODULE component of the whole project), crash disappears.
So, it is easy to runaround, but main problem is that it is really hard to investigate the origin when such situation happens.