Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306207 - cmake-utils.eclass: enable verbose mode by default
Summary: cmake-utils.eclass: enable verbose mode by default
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Tomáš Chvátal (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-21 16:12 UTC by Fabian Groffen
Modified: 2011-10-25 11:31 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2010-02-21 16:12:42 UTC
Since upsteams seem to favour cmake-based builds recently, I've run into multiple issues that are hard to debug, since cmake does not show what it is doing at all.

Therefore I suggest to enable verbose mode by default, because:
- it looks like what other packages usually do
- it doesn't hide useful details necessary for debugging/solving a problem
- it allows Portage's internal checks to warn about potential problems, or even die on definite problems on 64-bits arches
Comment 1 Franz Trischberger 2010-02-21 16:35:21 UTC
You can enable cmake verbose output vie VERBOSE-variable.

$ VERBOSE=1 paludis -i $(pkg_using_cmake)

I think it will work for portage, too.
(checked with strigi-0.7.1 - works too)

Probably cmake-utils could print an einfo on error, that enabling VERBOSE could give additional information.

BTW: Errors and warnings are perfectly visible with cmake, there nothing is suppressed.
And enabling verbose output by default would make finding the error a long trip ;)
Comment 2 Fabian Groffen gentoo-dev 2010-02-21 16:38:59 UTC
Franz, this bug is not at all about Paludis, Pkgcore or Portage.  Judging by your other comments, you clearly didn't understand much of the actual problem.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-02-21 16:40:07 UTC
Like said, the warnings and errors are visible always, so I'd rather keep the
output as it is. "CMAKE_VERBOSE=1 emerge foo" to get everything visible.
Comment 4 Fabian Groffen gentoo-dev 2010-02-21 16:42:02 UTC
drac: not really, e.g. you don't see how something was compiled linked.
Comment 5 Franz Trischberger 2010-02-21 17:01:05 UTC
> Franz, this bug is not at all about Paludis, Pkgcore or Portage.  Judging by
> your other comments, you clearly didn't understand much of the actual problem.

I know this is not about package-manager, it is about setting verbose output by default in the cmake-utils.eclass. But it is not neccessary, as you get the same with VERBOSE var.

VERBOSE=1 emerge strigi

will output everything you want. Like this:

###
>>> Starting src_compile                                                                           
>>> Working in BUILD_DIR: "/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build"         
make -j2                                                                                           
/usr/bin/cmake -H/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999 -B/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build --check-build-system CMakeFiles/Makefile.cmake 0                                                                                                                                                   
/usr/bin/cmake -E cmake_progress_start /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/CMakeFiles /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/CMakeFiles/progress.marks                                                                                                                                     
make -f CMakeFiles/Makefile2 all                                                                                                                                       
make[1]: Entering directory `/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build'                                                                           
make -f blib/CMakeFiles/QtBespin.dir/build.make blib/CMakeFiles/QtBespin.dir/depend                                                                                    
make -f config/CMakeFiles/bespin.dir/build.make config/CMakeFiles/bespin.dir/depend                                                                                    
make[2]: Entering directory `/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build'                                                                           
cd /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999 /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999/blib /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/blib /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/blib/CMakeFiles/QtBespin.dir/DependInfo.cmake --color=                
make[2]: Entering directory `/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build'                                                                           
/usr/bin/cmake -E cmake_progress_report /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/CMakeFiles 71                                                   
[  1%] Dependee "/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/blib/CMakeFiles/QtBespin.dir/DependInfo.cmake" is newer than depender "/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/blib/CMakeFiles/QtBespin.dir/depend.internal".                                                                          
Dependee "/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/blib/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/blib/CMakeFiles/QtBespin.dir/depend.internal".                                                                               
Scanning dependencies of target QtBespin                                                                                                                               
Generating ui_uiDemo.h                                                                                                                                                 
cd /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/config && /usr/bin/uic -o /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/config/ui_uiDemo.h /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999/config/uiDemo.ui                                                                                       
/usr/bin/cmake -E cmake_progress_report /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/CMakeFiles 67


AND SO ON
###

It shows every single command with its parameters executed.
Comment 6 Maciej Mrozowski gentoo-dev 2010-02-21 17:27:57 UTC
Except the fact, that your example doesn't provide any detail...

Like Samuli said, CMAKE_VERBOSE=1 is the way to go. It can be set in env as well as in make.conf for those who need it, I'd prefer CMake to be silent by default.
Comment 7 Franz Trischberger 2010-02-21 17:35:51 UTC
(In reply to comment #6)
> Except the fact, that your example doesn't provide any detail...

Scanning dependencies of target QtBespin                                        
Generating ui_uiDemo.h                                                          
cd /var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/config &&
/usr/bin/uic -o
/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/config/ui_uiDemo.h
/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999/config/uiDemo.ui       
/usr/bin/cmake -E cmake_progress_report
/var/tmp/paludis/x11-themes-bespin-9999/work/bespin-9999_build/CMakeFiles 67

versus

Scanning dependencies of target QtBespin                                        
Generating ui_uiDemo.h

is a lot more info. This is while generating the ui, when compiling it also tells me the whole g++-commands.
I think both, CMAKE_VERBOSE and VERBOSE are equal. Years back, when i needed the verbose output on demand, i was told to go with VERBOSE, that's why i only know that ;)
Comment 8 Maciej Mrozowski gentoo-dev 2010-02-21 17:46:00 UTC
No, CMAKE_VERBOSE shows compiler/linker invocations, that's what Fabian is interested in, not in some irrelevant directory navigation make messages.
Comment 9 Franz Trischberger 2010-02-21 18:04:27 UTC
(In reply to comment #8)
> No, CMAKE_VERBOSE shows compiler/linker invocations
as does VERBOSE.
VERBOSE=1 emerge strigi
and
CMAKE_VERBOSE=1 emerge strigi
produce the exact same output. You may try it.

On the Kitware Wiki i also found only this:
http://www.itk.org/Wiki/CMake_FAQ#Is_there_an_option_to_produce_more_.27verbose.27_compiling.3F
Comment 10 Fabian Groffen gentoo-dev 2010-02-21 18:06:19 UTC
I'm indeed mainly interested in the compiler/linker invocations to be reported
by users when a failure occurs so I can see if what's happening is as expected.
(e.g. -llib is missing)

Comment 11 Maciej Mrozowski gentoo-dev 2010-07-06 01:55:11 UTC
Now , in summary page (just after configure phase) CMake shows compiler and linker flags that are being used. Is it sufficient? I'd think of it as a compromise between full verbosity and providing moderately useful info.

example:
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -march=native -O2 -pipe -ftree-vectorize 
C++             -march=native -O2 -pipe -ftree-vectorize  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-check-new -fno-common -fvisibility=hidden -fvisibility-inlines-hidden
Linker flags:
Executable      -Wl,--as-needed
Module          -Wl,--as-needed
Shared          -Wl,--as-needed
Comment 12 Theo Chatzimichos (RETIRED) archtester gentoo-dev Security 2010-12-31 01:10:48 UTC
Fabian, can we close this? Imho reavertm's solution should be sufficient
Comment 13 Fabian Groffen gentoo-dev 2011-01-02 15:58:00 UTC
Not for me, but the consensus on the gentoo-dev ML was that most people prefer to see fancy percentage bars over the actual compilation commands.  I will accept the behaviour of the eclass as is.