[CMake] Question about error creating CPack RPM installer

Allen Gooch allen.gooch at gmail.com
Tue Mar 24 17:11:26 EDT 2009


I'm trying to create an RPM installer for my project using CPack. My
environment is cmake-2.7 prerelease built from CVS on 2009-03-05 on a Fedora
Core 10 32-bit x86 host.  At the bottom of my top-level CMakeLists.txt file
I have the following:

# build an installer
include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/license.txt)
set (CPACK_PACKAGE_VERSION_MAJOR 1)
set (CPACK_PACKAGE_VERSION_MINOR 0)
set (CPACK_GENERATOR RPM)
include (CPack)

I'm configuring for an out-of-src-tree build.  After configuring/generating
I cd to my build dir and do a "make -k" and "make -k install".

[agooch at bwaagooch2 cmake-build]$ make -k
[agooch at bwaagooch2 cmake-build]$ make -k install

I then do a "cpack -C CPackConfig.cmake" and receive the following error:

[agooch at bwaagooch2 cmake-build]$ cpack -C CPackConfig.cmake
CPack: Create package using RPM
CPack: Install projects
CPack: - Run preinstall target for: Server
CPack: - Install project: Server
CPack: Compress package
CPack: Finalize package
CPack Error: Problem copying the package:
/home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-build/_CPack_Packages/Linux/RPM/Server-1.0.1-Linux.rpm
to
/home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-build/Server-1.0.1-Linux.rpm
CPack Error: Error when generating package: Server
[agooch at bwaagooch2 cmake-build]$

The rpm source file attempting to be copied is indeed not present at the
path specified.  Instead the following path is found:

[agooch at bwaagooch2 cmake-build]$ pwd
/home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-build
[agooch at bwaagooch2 cmake-build]$ ls -al
_CPack_Packages/Linux/RPM/Server-1.0.1-Linux/home/agooch/sandboxes/sb1/mmo1/branch/_linuxport2/cmake-install/bin/
total 5700
drwxrwxr-x 2 agooch agooch    4096 2009-03-24 15:53 .
drwxrwxr-x 3 agooch agooch    4096 2009-03-24 15:53 ..
-rwxr-xr-x 1 agooch agooch   96892 2009-03-24 15:52 bootstrap
-rwxr-xr-x 1 agooch agooch   64898 2009-03-24 15:52 control
-rwxr-xr-x 1 agooch agooch   19188 2009-03-24 15:52 genericapp
-rwxr-xr-x 1 agooch agooch  458444 2009-03-24 15:52 globaldirectory
-rwxr-xr-x 1 agooch agooch  953802 2009-03-24 15:52 libbiomonservice.so
-rwxr-xr-x 1 agooch agooch   73021 2009-03-24 15:52 libcontrolplugin.so
-rwxr-xr-x 1 agooch agooch 3496116 2009-03-24 15:52 libomega.so
-rwxr-xr-x 1 agooch agooch   55279 2009-03-24 15:52 libxmlcontrolplugin.so
-rwxr-xr-x 1 agooch agooch  566650 2009-03-24 15:52 monitor
[agooch at bwaagooch2 cmake-build]$

It seems that the absolute path to my install dir is being appended to the
"_CPack_Packages/Linux/RPM/Server-1.0.1-Linux" path components, and the
expected directory for the copy source does not exist.  Anyone have any
ideas on why this absolute/relative path name wackiness is happening and how
to correctly generate the RPM?

Many thanks in advance,

Allen Gooch
BioWare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090324/6e32fbf0/attachment.htm>


More information about the CMake mailing list