[CMake] issue with CPack: RPM package was not generated!

Craig Scott craig.scott at crascit.com
Tue Jul 31 08:30:31 EDT 2018


On Tue, Jul 31, 2018 at 9:56 PM, Miroslav Kubiczek <
miroslav.kubiczek at gmail.com> wrote:

> Hi All,
>
> I'm running cmake 3.10.1 and have this issue:
>
> $ make package
> [ 50%] Built target Rest
> [100%] Built target UT_RestLibrary
> Run CPack packaging tool...
> CPack: Create package using RPM
> CPack: Install projects
> CPack: - Run preinstall target for: XXXCommonCppLibrary
> CPack: - Install project: XXXCommonCppLibrary
> CPack: Create package
> CPackRPM: Will use USER specified spec file: /data/git/common-cpp-libs/
> build/XXX-common-cpp-libs.spec
> CMake Error at /usr/local/cmake-3.10.1-Linux-x86_64/share/cmake-3.10/Modules/CPackRPM.cmake:2703
> (message):
>   RPM package was not generated!
>   /data/git/common-cpp-libs/build/_CPack_Packages/Linux/RPM
> Call Stack (most recent call first):
>   /usr/local/cmake-3.10.1-Linux-x86_64/share/cmake-3.10/Modules/CPackRPM.cmake:2774
> (cpack_rpm_generate_package)
>
>
> CPack Error: Error while execution CPackRPM.cmake
> CPack Error: Problem compressing the directory
> CPack Error: Error when generating package: XXX-common-cpp-libs
> make: *** [package] Error 1
>
> The rpm file is generated by those strange errors printed, make exits with
> an error code and jenkins build fails.
> Does anyone know how to fix this?
>
>
A few things to check:


   - Have you given any install() commands in your project? The message
   above seems to be suggesting nothing was installed.
   - Are you overriding the .spec file rather than using the one
   CMake/CPack creates for you? If so, can you indicate why and maybe check
   its contents. Less likely this is the main issue, but worth covering anyway.



-- 
Craig Scott
Melbourne, Australia
https://crascit.com

New book released: Professional CMake: A Practical Guide
<https://crascit.com/professional-cmake/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180731/7a5ef3dc/attachment-0001.html>


More information about the CMake mailing list