[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 132601] New: SunStudio C++ compiler not detected in Compiler
From:       Paul Fee <pfee () talk21 ! com>
Date:       2006-08-18 16:41:59
Message-ID: 20060818184157.132601.pfee () talk21 ! com
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=132601         
           Summary: SunStudio C++ compiler not detected in Compiler Output
                    view.
           Product: kdevelop
           Version: 3.3.4
          Platform: Ubuntu Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-bugs kdevelop org
        ReportedBy: pfee talk21 com


Version:           3.3.4 (using KDE KDE 3.5.4)
Installed from:    Ubuntu Packages
OS:                Linux

When building a project, compiler output is parsed in the OutputView.  In particular the lines \
corresponding to compiling, linking etc. are detected.

This works by means of regular expressions, the code is visible in:
parts/outputviews/makeactionfilter.cpp
MakeActionFilter::actionFormats()

Various well known compiler expressions are understood (e.g. cc, gcc, c++).  However Sun's \
SunStudio C++ compiler goes by the name CC, hence it is not detected.

Adding CC to the expressions allows output from the SunStudio compiler to be parsed correctly.

I've patched this method on my own system as follows.  A more generic fix would be to allow the \
user to enter the name of their compiler, however this simple change works for me.

==================

// returns an array of ActionFormat
MakeActionFilter::ActionFormat* MakeActionFilter::actionFormats()
{
    static ActionFormat formats[] = {
        ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* \
                )*-c (?:\\S* )*`[^`]*`(?:[^/\\s;]*/)*([^/\\s;]+)"),
        ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* \
                )*-c (?:\\S* )*-o (?:\\S* )(?:[^/;]*/)*([^/\\s;]+)"),
        ActionFormat( i18n("compiling"), 1, 2, "(gcc|CC|cc|distcc|c\\+\\+|g\\+\\+)\\S* (?:\\S* \
                )*-c (?:\\S* )*(?:[^/]*/)*([^/\\s;]*)"),
        ActionFormat( i18n("compiling"), "unknown", "^compiling (.*)", 1 ),

                //moc and uic
        ActionFormat( i18n("generating"), 1, 2, "/(moc|uic)\\b.*\\s-o\\s([^\\s;]+)"),

        ActionFormat( i18n("linking"), "libtool", \
"/bin/sh\\s.*libtool.*--mode=link\\s.*\\s-o\\s([^\\s;]+)", 1 ),  //can distcc link too ?
        ActionFormat( i18n("linking"), 1, 2, "(gcc|CC|cc|c\\+\\+|g\\+\\+)\\S* (?:\\S* )*-o \
([^\\s;]+)"),

        ActionFormat( i18n("creating"), "", "/(?:bin/sh\\s.*mkinstalldirs).*\\s([^\\s;]+)", 1 \
                ),
        ActionFormat( i18n("installing"), "", \
"/(?:usr/bin/install|bin/sh\\s.*mkinstalldirs|bin/sh\\s.*libtool.*--mode=install).*\\s([^\\s;]+)", \
                1 ),
        ActionFormat( i18n("generating"), "dcopidl", "dcopidl .* > ([^\\s;]+)", 1 ),
        ActionFormat( i18n("compiling"), "dcopidl2cpp", "dcopidl2cpp (?:\\S* )*([^\\s;]+)", 1 \
),

        ActionFormat( QString::null, QString::null, 0, 0 )
    };

    return formats;
}

======================

Can we have "CC" be added as shown above.  Or even better allow user input of their compiler \
name, that would be useful for users with strange compiler names.  For example someone cross \
compiling for an embedded system.

Thanks,
Paul


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic