MantisBT - CMake
View Issue Details
0014391CMakeCPackpublic2013-09-06 11:342014-10-06 10:32
Tobe Deprez 
Nils Gladitz 
normalmajoralways
closedno change required 
POSIXUbuntu Linux13.04
CMake 2.8.11.2 
 
0014391: CPack crashes when creating a debian package
When I run CPack to create a debian package, I get the following error:
CPack Error: Problem running tar command: /usr/bin/fakeroot "/usr/bin/cmake" -E tar cfz data.tar.gz ./usr
Please check /bestanden/tobe/Dropbox/Projects/netlogin/build/_CPack_Packages/Linux/DEB/Deb.log for errors
CPack Error: Problem compressing the directory

The file _CPack_Packages/Linux/DEB/Deb.log contains the following:
# Run command: /usr/bin/fakeroot "/usr/bin/cmake" -E tar cfz data.tar.gz ./usr
# Working directory: /bestanden/tobe/Dropbox/Projects/netlogin/build/_CPack_Packages/Linux/DEB/netlogin-0.1.1-Linux
# Output:
getopt: ongeldige optie -- 'E'
fakeroot, create a fake root environment.
   usage: fakeroot [-l|--lib fakerootlib] [-f|--faked fakedbin]
                   [-i file] [-s file] [-u|--unknown-is-real]
           [-b|--fd-base fd] [-h|--help] [-v|--version]
                   [--] [command]

It seems fakeroot gets confused by the -E option. The probem is solved by adding '--' before the fakeroot command in the file Source/CPack/cmCPackDebGenerator.cxx (I've added a diff between the origal and my changed file .
-Create a project which can create a debian package
-run 'cmake .'
-run 'make'
-run 'make package'
No tags attached.
? diff (840) 2013-09-06 11:34
https://public.kitware.com/Bug/file/4872/diff
Issue History
2013-09-06 11:34Tobe DeprezNew Issue
2013-09-06 11:34Tobe DeprezFile Added: diff
2014-02-18 14:24labsinNote Added: 0035141
2014-03-09 13:35labsinNote Added: 0035350
2014-03-09 13:44Nils GladitzNote Added: 0035351
2014-03-09 13:44Nils GladitzStatusnew => resolved
2014-03-09 13:44Nils GladitzResolutionopen => no change required
2014-03-09 13:44Nils GladitzAssigned To => Nils Gladitz
2014-10-06 10:32Robert MaynardNote Added: 0036935
2014-10-06 10:32Robert MaynardStatusresolved => closed

Notes
(0035141)
labsin   
2014-02-18 14:24   
Having this issue to. Any fix for this apart from rebuilding cmake?
(0035350)
labsin   
2014-03-09 13:35   
Flaw not in CMake but in the translation of getopt used by fakeroot.
https://bugs.launchpad.net/ubuntu/+source/fakeroot/+bug/1290069 [^]
(0035351)
Nils Gladitz   
2014-03-09 13:44   
The option handling in fakeroot breaks with some locales.
(0036935)
Robert Maynard   
2014-10-06 10:32   
Closing resolved issues that have not been updated in more than 4 months.