Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 647494

Summary: dev-util/schroot[doc] - cd /home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build/doc && ./sbuild.dox ... /bin/sh: ./sbuild.dox: Permission denied
Product: Gentoo Linux Reporter: Robert Wolf <r.wolf.gentoo>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: CONFIRMED ---    
Severity: normal CC: kensington
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log
environment file

Description Robert Wolf 2018-02-13 12:24:37 UTC
Dear sirs,

I wanted to recompile schroot on my x86 Gentoo with "doc" USE flags, but the cmake has generated incorrect code for the doc compilation using doxygen and therefore the doc generation has failed with:

--------------------------------------------------
cd /home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build/doc && /usr/bin/cmake -E remove_directory schroot
cd /home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build/doc && /usr/bin/cmake -E remove_directory sbuild
cd /home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build/doc && ./schroot.dox
cd /home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build/doc && ./sbuild.dox
/bin/sh: ./sbuild.dox: Permission denied
/bin/sh: ./schroot.dox: Permission denied
make[3]: *** [doc/CMakeFiles/doc.dir/build.make:71: doc/schroot.log] Error 126
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [doc/CMakeFiles/doc.dir/build.make:63: doc/sbuild.log] Error 126
make[3]: Leaving directory '/home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build'
make[2]: *** [CMakeFiles/Makefile2:643: doc/CMakeFiles/doc.dir/all] Error 2
make[2]: Leaving directory '/home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build'
make[1]: *** [CMakeFiles/Makefile2:650: doc/CMakeFiles/doc.dir/rule] Error 2
make[1]: Leaving directory '/home/GENTOO/work/portage/dev-util/schroot-1.6.10-r3/work/schroot-1.6.10_build'
make: *** [Makefile:305: doc] Error 2
--------------------------------------------------

The compilation tries to run sbuild.dox and schroot.dox as shell code, but these files are doxygen scripts.

I have found warning about missing doxygen binary during cmake configuration phase:
--------------------------------------------------
CMake Warning (dev) at /usr/share/cmake/Modules/FindDoxygen.cmake:550 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "doxygen" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  CMakeLists.txt:268 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at /usr/share/cmake/Modules/FindDoxygen.cmake:559 (message):
  doxygen is not a valid Doxygen component
Call Stack (most recent call first):
  CMakeLists.txt:268 (include)

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at /usr/share/cmake/Modules/FindDoxygen.cmake:559 (message):
  doxygen is not a valid Doxygen component
Call Stack (most recent call first):
  CMakeLists.txt:269 (find_package)

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
--------------------------------------------------

I have found that there is probably some problem in the file /usr/share/cmake/Modules/FindDoxygen.cmake:550
--------------------------------------------------
if(_comp STREQUAL "doxygen")
    _Doxygen_find_doxygen()
elseif(_comp STREQUAL "dia")
    _Doxygen_find_dia()
elseif(_comp STREQUAL "dot")
    _Doxygen_find_dot()
elseif(_comp STREQUAL "mscgen")
    _Doxygen_find_mscgen()
else()
    message(WARNING "${_comp} is not a valid Doxygen component")
    set(Doxygen_${_comp}_FOUND FALSE)
    continue()
endif()
--------------------------------------------------

If I change the use of '_comp' to '"${_comp}"' then schroot can find doxygen and docs generation works fine:
--------------------------------------------------
if("${_comp}" STREQUAL "doxygen")
    _Doxygen_find_doxygen()
elseif("${_comp}" STREQUAL "dia")
    _Doxygen_find_dia()
elseif("${_comp}" STREQUAL "dot")
    _Doxygen_find_dot()
elseif("${_comp}" STREQUAL "mscgen")
    _Doxygen_find_mscgen()
else()
    message(WARNING "${_comp} is not a valid Doxygen component")
    set(Doxygen_${_comp}_FOUND FALSE)
    continue()
endif()
--------------------------------------------------


Full output of emerge, build log, environment file and emerge --info outputs are attached.

Is this bug in cmake or do I have some incorrect USE flags or something?

Thank you.

Regards.

Robert Wolf.
Comment 1 Robert Wolf 2018-02-13 12:25:08 UTC
Created attachment 519306 [details]
emerge --info
Comment 2 Robert Wolf 2018-02-13 12:25:28 UTC
# emerge -pqv '=dev-util/schroot-1.6.10-r3::gentoo'
[ebuild   R   ] dev-util/schroot-1.6.10-r3  USE="dchroot doc nls pam -btrfs -debug -lvm {-test}"
Comment 3 Robert Wolf 2018-02-13 12:26:05 UTC
Created attachment 519308 [details]
build.log
Comment 4 Robert Wolf 2018-02-13 12:26:55 UTC
Created attachment 519310 [details]
environment file
Comment 5 Michael Palimaka (kensington) gentoo-dev 2019-04-01 12:38:14 UTC
The ebuild passes -Ddoxygen=$(usex doc) which breaks FindDoxygen.cmake. schroot should use a different option instead.
Comment 6 Georgy Yakovlev archtester gentoo-dev 2019-08-19 00:45:00 UTC
taken over the package, assigning to myself.