codelite icon indicating copy to clipboard operation
codelite copied to clipboard

Build output not being correctly parsed for custom Makefile project.

Open hsnabn opened this issue 10 years ago • 13 comments

Hi, I'm having some trouble getting CodeLite to correctly parse the errors in my custom Makefile project. I'm using TDM-GCC compiler version 5.1.0, and the stock compiler/build output parse settings. Here's some sample output:

MESSAGE: Entering directory `C:\Projects\Game Development\Thorium\build-codelite'
C:\WINDOWS\system32\cmd.exe /C ""C:\Program Files (x86)\Compilers\TDM-GCC-64\bin\mingw32-make.exe" -j 8""
----------Building project:[ Thorium - Debug ]----------
Scanning dependencies of target Thorium
[ 10%] Building CXX object CMakeFiles/Thorium.dir/src/Camera/TPCamController.cpp.obj
C:\Projects\Game Development\Thorium\src\Camera\TPCamController.cpp: In member function 'virtual void TPCamController::PostUpdate(float)':
C:\Projects\Game Development\Thorium\src\Camera\TPCamController.cpp:47:26: error: 'pivotPos' was not declared in this scope
     Vector3 placePoint = pivotPos + (rot * TP_CAMERA_FOCUS_POINT);
                          ^
C:\Projects\Game Development\Thorium\src\Camera\TPCamController.cpp:56:62: error: 'rayDistance' was not declared in this scope
     _physWorld->RaycastSingle(result, Ray(pivotPos, rayDir), rayDistance, 2);
                                                              ^
mingw32-make[2]: *** [CMakeFiles/Thorium.dir/src/Camera/TPCamController.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles/Thorium.dir/all] Error 2
mingw32-make: *** [all] Error 2
CMakeFiles\Thorium.dir\build.make:162: recipe for target 'CMakeFiles/Thorium.dir/src/Camera/TPCamController.cpp.obj' failed
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/Thorium.dir/all' failed
Makefile:126: recipe for target 'all' failed
====1 errors, 0 warnings====

In this, CodeLite only allows me to "click" on the line mingw32-make: *** [all] Error 2, which does nothing. It doesn't highlight any of the errors, nor allows me to click on them to take me to where they occur.

I think this might be an issue with the regex pattern or something. I'm not sure, though. I don't know anything about regexes.

I'm using CodeLite 9.2.0 on Windows 64-bit.

Any help is appreciated.

hsnabn avatar Aug 22 '16 10:08 hsnabn

I've got some basic error detection up and running with this regex taken from Code::Blocks and modified a bit to capture the column index:

([][{}() \t#%$~[:alnum:]&_:+\/\.-]+):([0-9]+):([0-9]+):[ \t](.*) with File Index 1, Line Number 2, and Column Index 3.

However only this probably won't catch everything.

hsnabn avatar Aug 22 '16 11:08 hsnabn

in the project settings -> general page, make sure you have selected the correct complier ( GCC )

eranif avatar Aug 22 '16 16:08 eranif

Yep, the compiler selected is MinGW ( TDM-GCC-64 ), which is the correct compiler.

hsnabn avatar Aug 22 '16 16:08 hsnabn

Hmm, I think I managed to fix this by removing the ^ at the beginning of every error-capture regex in the default regexes.

hsnabn avatar Aug 26 '16 09:08 hsnabn

I wonder if using cmake wrappers causes this issue. Using the default build system just works (without the need to alter the default regex patterns)

eranif avatar Aug 26 '16 10:08 eranif

Maybe that could be the cause, yes. However my project uses CMake, so it is not a possibility to switch to the default build system (is it?).

hsnabn avatar Aug 26 '16 10:08 hsnabn

Can you provide a minimal workspace zipped that reproduces this problem?

eranif avatar Aug 30 '16 11:08 eranif

Hmm, I'll try to make one that emulates my specific setup. I use a symlink (via mklink) to create a link for the CMakeLists.txt into another directory, so I can keep all my project files in a separate directory while having the code separate. You might have to do that...

hsnabn avatar Aug 30 '16 14:08 hsnabn

Uhh, it seems it's actually pretty hard to replicate the correct configuration. This might take a while.

EDIT: Perhaps you could try making a CMake build system-based project yourself and see if it happens then?

hsnabn avatar Aug 30 '16 14:08 hsnabn

I have a custom build using CMake (CodeLite itself is built using CMake on Linux and OSX) and it does not happen for me...

eranif avatar Sep 02 '16 15:09 eranif

Ping...

eranif avatar Sep 13 '16 16:09 eranif

Sorry, I haven't been able to find the time to make a minimal project. I can't make any promises as to when I'll be able...

hsnabn avatar Sep 17 '16 10:09 hsnabn

Closed it because I can't upload a minimal project in the near future, and it would be kinda unfair to leave it hanging.

(Tell me if I should leave it open, though, if you want.)

hsnabn avatar Oct 31 '16 07:10 hsnabn