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.
Created attachment 519306 [details] emerge --info
# 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}"
Created attachment 519308 [details] build.log
Created attachment 519310 [details] environment file
The ebuild passes -Ddoxygen=$(usex doc) which breaks FindDoxygen.cmake. schroot should use a different option instead.
taken over the package, assigning to myself.