View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013700CMakeCPackpublic2012-11-18 07:252015-10-13 15:52
ReporterKonstantin Cherenkov 
Assigned ToRaffi Enficiaud 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSUbuntuOS Version12.04
Product VersionCMake 2.8.7 
Target VersionFixed in VersionCMake 3.4 
Summary0013700: CPack fails from fakeroot
DescriptionCPackDeb fails if deb files are created from fakeroot

CPack: Create package
CPack Error: Problem running tar command: /usr/bin/fakeroot "/usr/bin/cmake" -E tar cfz data.tar.gz ./usr
Please check [...]/build/_CPack_Packages/Linux/DEB/Deb.log for errors
CPack Error: Problem compressing the directory

Deb.log contains this message:
fakeroot: nested operation not yet supported
Steps To Reproducefakeroot
mkdir build
cd build
cmake ..
cpack
TagsNo tags attached.
Attached Files

 Relationships
related to 0010325closedEric NOULARD DEB packaging Set files ownership 

  Notes
(0031601)
Eric NOULARD (developer)
2012-11-18 07:52
edited on: 2012-11-18 07:54

Hi Konstantin,

Could you confirm the CMake version you use is 2.6.x ?
Since CMake 2.8.6 CPack is calling fakeroot automagically so may
be this leads to
"fakeroot: nested operation not yet supported"
because CPack is calling fakeroot while you already did.

Note that from my understanding calling cmake from within a fakeroot
may not be a good idea. See the documentation from fakeroot:

"GNU configure (and other such programs)
    fakeroot, in effect, is changing the way the system behaves. Programs that probe the system like GNU configure may get confused by this (or if they don't, they may stress fakeroot so much that fakeroot itself becomes confused). So, it's advisable not to run "configure" from within fakeroot. As configure should be called in the "debian/rules build" target, running "dpkg-buildpackage -rfakeroot" correctly takes care of this."

So CPackDeb may already be doing a better jobs because it only calls
fakeroot for installing and packaging and not "globally".

That said I may modify the "automatic fakeroot" call in order to avoid
calling it again if we already are fakerooting.

Checking for the definition of FAKEROOTKEY env var should be enough
what do you think?

(0031602)
Konstantin Cherenkov (reporter)
2012-11-18 10:22
edited on: 2012-11-18 10:29

Hi Eric,

You are right, it seems like we are calling fakeroot twice. I am trying to automatically build package on Launchpad with cmake/cpack, so they are doing this through fakeroot by default.
I think that checking if we are already fakeroot to avoid calling it again is the best solution.
If I am not mistaken, cmake version is 2.8.7.

Thank you for your quick response.

Also could you give me advice if it is possible to workaround this issue on Launchpad?
build log is here https://launchpadlibrarian.net/123334744/buildlog_ubuntu-precise-i386.simple-gmail-notifier_0.1.3_FAILEDTOBUILD.txt.gz [^]

(0031603)
Eric NOULARD (developer)
2012-11-18 11:11

Obviously you are not the only one to be stricken by this
https://bugs.launchpad.net/bzr-builder/+bug/709146 [^]

I'm not aware of any workaround for that, but I'm not launchpad user.

I'll try a fix in CPackDeb.
(0039451)
Raffi Enficiaud (developer)
2015-09-20 10:21

Now using the libarchive functionality for creating archives (instead of creating archives from cmake command line under fakeroot)

See commit:

http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=3b099fd [^]
(0039597)
Raffi Enficiaud (developer)
2015-10-13 15:52

cmake 3.4.0 rc1 includes the appropriate changes.
Commit 7044e8ee

https://cmake.org/gitweb?p=cmake.git;a=commit;h=7044e8ee [^]

 Issue History
Date Modified Username Field Change
2012-11-18 07:25 Konstantin Cherenkov New Issue
2012-11-18 07:41 Eric NOULARD Assigned To => Eric NOULARD
2012-11-18 07:41 Eric NOULARD Status new => assigned
2012-11-18 07:44 Eric NOULARD Relationship added related to 0010325
2012-11-18 07:52 Eric NOULARD Note Added: 0031601
2012-11-18 07:54 Eric NOULARD Note Edited: 0031601
2012-11-18 10:22 Konstantin Cherenkov Note Added: 0031602
2012-11-18 10:24 Konstantin Cherenkov Note Edited: 0031602
2012-11-18 10:29 Konstantin Cherenkov Note Edited: 0031602
2012-11-18 11:11 Eric NOULARD Note Added: 0031603
2012-11-18 11:11 Eric NOULARD Product Version CMake-2-6 => CMake 2.8.7
2015-09-13 15:58 Raffi Enficiaud Assigned To Eric NOULARD => Raffi Enficiaud
2015-09-20 10:21 Raffi Enficiaud Note Added: 0039451
2015-10-13 15:52 Raffi Enficiaud Note Added: 0039597
2015-10-13 15:52 Raffi Enficiaud Status assigned => closed
2015-10-13 15:52 Raffi Enficiaud Resolution open => fixed
2015-10-13 15:52 Raffi Enficiaud Fixed in Version => CMake 3.4


Copyright © 2000 - 2018 MantisBT Team