eranif / codelite

A multi purpose IDE specialized in C/C++/Rust/Python/PHP and Node.js. Written in C++
https://codelite.org
GNU General Public License v2.0
2.12k stars 455 forks source link

Build output not being correctly parsed for custom Makefile project. #1387

Closed hsnabn closed 7 years ago

hsnabn commented 8 years ago

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 commented 8 years ago

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.

eranif commented 8 years ago

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

hsnabn commented 8 years ago

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

hsnabn commented 8 years ago

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

eranif commented 8 years ago

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)

hsnabn commented 8 years ago

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?).

eranif commented 8 years ago

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

hsnabn commented 8 years ago

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 commented 8 years ago

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?

eranif commented 8 years ago

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 commented 8 years ago

Ping...

hsnabn commented 8 years ago

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 commented 7 years ago

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.)