Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Custom Error Parsing Problem
Forum Updated to NodeBB v4.3 + New Features

Custom Error Parsing Problem

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
7 Posts 2 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qtenvy
    wrote on last edited by
    #1

    Qt Creator 4.5.1
    Based on Qt 5.9.4 (GCC 7.3.1 20180130 (Red Hat 7.3.1-2), 64 bit)
    Fedora 27 PC

    I am trying to implement custom error parsing for a GreenHills compiler in qtcreator. I have added the custom compilers and configured their custom error parsing successfully thus far (or at least I thought). I am actually getting warning/errors in my issues pane. However, when I click on the warnings/errors in the issue pane, qtcreator cannot find the file. The path is correct, but it is relative to the project directory, and it looks as if qtcreator is attempting an absolute path (which it does indicate in the console output).

    Could not find absolute location of file  "\"[relative_path_to_my_source_file\", line 135"
    

    Any ideas on how to resolve this?

    aha_1980A 1 Reply Last reply
    0
    • Q qtenvy

      Qt Creator 4.5.1
      Based on Qt 5.9.4 (GCC 7.3.1 20180130 (Red Hat 7.3.1-2), 64 bit)
      Fedora 27 PC

      I am trying to implement custom error parsing for a GreenHills compiler in qtcreator. I have added the custom compilers and configured their custom error parsing successfully thus far (or at least I thought). I am actually getting warning/errors in my issues pane. However, when I click on the warnings/errors in the issue pane, qtcreator cannot find the file. The path is correct, but it is relative to the project directory, and it looks as if qtcreator is attempting an absolute path (which it does indicate in the console output).

      Could not find absolute location of file  "\"[relative_path_to_my_source_file\", line 135"
      

      Any ideas on how to resolve this?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi @qtenvy,

      how did you configure the error parser (please show the dialog)?

      note that the dialog has a testing area to verify the parser.

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qtenvy
        wrote on last edited by
        #3

        Tools->Options->Build & Run, Select Compilers tab. Selected "Compilers" tab, clicked on "Add", dropped down to "Custom", and selected "C". At the bottom of that dialogue is an entry for an Error Parser. I selected "Custom" and clicked on "Custom Parser Settings..." Custom parser settings are as follows.

        0_1520280129635_ep_dialog.png

        And yes, I did utilize the parser testing area to get it right. Before I implemented these error parser changes, I could not get warnings/errors to show up in my issues pane. With these changes, they do show up. Qtcreator wants to use an absolute file path for whatever reason.

        aha_1980A 1 Reply Last reply
        0
        • Q qtenvy

          Tools->Options->Build & Run, Select Compilers tab. Selected "Compilers" tab, clicked on "Add", dropped down to "Custom", and selected "C". At the bottom of that dialogue is an entry for an Error Parser. I selected "Custom" and clicked on "Custom Parser Settings..." Custom parser settings are as follows.

          0_1520280129635_ep_dialog.png

          And yes, I did utilize the parser testing area to get it right. Before I implemented these error parser changes, I could not get warnings/errors to show up in my issues pane. With these changes, they do show up. Qtcreator wants to use an absolute file path for whatever reason.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @qtenvy said in Custom Error Parsing Problem:

          And yes, I did utilize the parser testing area to get it right.

          Ok, just wanted to ask before guessing a lot :)

          Before I implemented these error parser changes, I could not get warnings/errors to show up in my issues pane. With these changes, they do show up.

          Good, looks like halfway through.

          Qtcreator wants to use an absolute file path for whatever reason.

          It does work with relative paths (I've implemented the custom parser, after all), but you have to see if the build directory is different from the source directory? Which build directory is set in Projects -> Build Settings -> General?

          I know that e.g. for the QMake projects Creator tracks the "entering directory" outputs; that is afaik not available for the custom toolchain. So all your relative paths have to be relative to the build directory.

          Regards.

          Qt has to stay free or it will die.

          1 Reply Last reply
          1
          • Q Offline
            Q Offline
            qtenvy
            wrote on last edited by
            #5

            Thanks for helping out BTW.

            Yes, the build directory is set, and the relative path output to the issues pane is perfectly relative to that build directory. Again, it is as if QtCreator completely ignores the build directory for custom error parsers.

            I invoke qtcreator from a command terminal. When I build (with an error present), I get the following output in that terminal window.

            Could not find absolute location of file  "\"a/path/to/my/source/file/why_is_qt_creator_broke.c\""
            
            aha_1980A 1 Reply Last reply
            0
            • Q qtenvy

              Thanks for helping out BTW.

              Yes, the build directory is set, and the relative path output to the issues pane is perfectly relative to that build directory. Again, it is as if QtCreator completely ignores the build directory for custom error parsers.

              I invoke qtcreator from a command terminal. When I build (with an error present), I get the following output in that terminal window.

              Could not find absolute location of file  "\"a/path/to/my/source/file/why_is_qt_creator_broke.c\""
              
              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @qtenvy

              Please create a report at https://bugreports.qt.io/projects/QTCREATORBUG and provide as much information as possible (e.g. the compile output and the issues pane, also your terminal window output).

              It is possible that this function broke recently - we'll have to investigate what happened.

              Thanks.

              Qt has to stay free or it will die.

              aha_1980A 1 Reply Last reply
              1
              • aha_1980A aha_1980

                @qtenvy

                Please create a report at https://bugreports.qt.io/projects/QTCREATORBUG and provide as much information as possible (e.g. the compile output and the issues pane, also your terminal window output).

                It is possible that this function broke recently - we'll have to investigate what happened.

                Thanks.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                This lead to QTCREATORBUG-20605, please use that for further tracking.

                Therefore closing this topic.

                Qt has to stay free or it will die.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved