[MDEV-25959] cpack doesn't work with Ninja Created: 2021-06-18  Updated: 2021-06-21  Resolved: 2021-06-18

Status: Closed
Project: MariaDB Server
Component/s: Packaging
Affects Version/s: 10.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Anel Husakovic Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

CentOS7


Attachments: Text File cpackconfig.cmake.txt     Text File stdout_stderr_cpack.txt    
Issue Links:
Relates
relates to MDEV-16758 opensuse 15.0 builds fail with cpack ... Closed
relates to MDEV-22276 No debuginfo RPMs for RHEL6? Closed

 Description   

I tested on 10.5. Maybe it is reproducible even earlier.

$env|grep CMAKE
CMAKE_GENERATOR=Ninja
CMAKE_BUILD_PARALLEL_LEVEL=8
 
$ cmake -DRPM=centos7 ../../src/10.5
$ cpack -G RPM .

In CPackGenerator -> set(CPACK_CMAKE_GENERATOR "Ninja") .
Note when we unset CMAKE_GENERATOR it uses MakeFiles and has different error, that is already known MDEV-16758 and MDEV-22276 comment
Attachments or errors provided.



 Comments   
Comment by Sergei Golubchik [ 2021-06-18 ]

cpack -G RPM . was never tested, ninja or not, and we don't use it. It's not supposed to work. Use make package instead (or ninja package).

Comment by Daniel Black [ 2021-06-21 ]

From:

https://cmake.org/cmake/help/v3.20/guide/user-interaction/index.html#selecting-a-target
https://cmake.org/cmake/help/latest/module/CPack.html#targets-package-and-package-source

$ cmake --build . --target package

From https://cmake.org/cmake/help/v3.20/guide/tutorial/index.html#building-an-installer-step-7
"next step is to build the project in the usual manner and then run the cpack executable".

cpack isn't a builder, just a packager.

Generated at Thu Feb 08 09:41:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.