Bug 329690 - Built Tool View: Link to source file is not correct if make ran with the -C option
Summary: Built Tool View: Link to source file is not correct if make ran with the -C o...
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: Custom Makefiles (show other bugs)
Version: 5.3.0
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-07 13:38 UTC by ichramm
Modified: 2022-12-23 11:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Sample project (609 bytes, application/x-compressed-tar)
2014-01-07 13:40 UTC, ichramm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ichramm 2014-01-07 13:38:22 UTC
Consider the following directory structure

projectRoot/
projectRoot/projectName.kdev4

projectRoot/build/
projectRoot/build/linux/
projectRoot/build/Makefile

projectRoot/src
projectRoot/src/source1.cpp
projectRoot/src/source2.cpp


With Kdevelop <= 4.5 I could configure a Custom Makefile Project to build using the -C option by setting 'Additional make options' in the Projects's Configuration.

   Additional make options: "-C build/linux"

Everything worked find, make ran, and clicking in every error or warning shown in the 'Built Tool View' linked me to the file and line of interest.

   ../../src/source.cpp:111 .....

But starting with Kdevelop 4.6 this doesn't work anymore, the file path is resolved from project's root instead of the directory where the Makefile is located.




Reproducible: Always

Steps to Reproduce:
1. Create a project having the Makefile in a directory different than the project.
2. Compile and generate some error
3. Click on the Build Tool View
Actual Results:  
The link points to unexistent (or at least incorrect) file.

Expected Results:  
The link should point to the correct file

I'm attaching a sample project that will throw some compilation errors.

The workaround in this case is to add the sub-directory containing the Makefile to the buildset, getting ride of the -C option.

But this worked before, maybe just digging into commit history could lead us to a solution?
Comment 1 ichramm 2014-01-07 13:40:40 UTC
Created attachment 84498 [details]
Sample project

Sample project as promised.

Makefile is in the /linux directory
Source file is in the /src directory
Comment 2 Andrew Crouthamel 2018-11-11 04:27:49 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 ichramm 2018-11-19 00:19:59 UTC
Bug persists in 5.3.0.
Comment 4 Justin Zobel 2022-12-23 00:28:23 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 5 ichramm 2022-12-23 11:22:45 UTC
(In reply to Justin Zobel from comment #4)
> Thank you for reporting this issue in KDE software. As it has been a while
> since this issue was reported, can we please ask you to see if you can
> reproduce the issue with a recent software version?
> 
> If you can reproduce the issue, please change the status to "REPORTED" when
> replying. Thank you!

Still occurring in KDevelop 5.10 (KDE Neon 5.26)