https://bugs.kde.org/show_bug.cgi?id=369025

            Bug ID: 369025
           Summary: Relative paths in error output not recognized
                    correctly when building in subdirectories
           Product: kdevelop
           Version: 5.0.0
          Platform: Archlinux Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: BuildSystem: Custom BuildSystems
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: frank-fisc...@shadow-soft.de

Created attachment 101173
  --> https://bugs.kde.org/attachment.cgi?id=101173&action=edit
example project

I have a project with a custom qmake based build (I can't use qmake build but
need the custom build system for some reason not important here). The build is
done in a separate build directory and has a subproject (see attached example).

The project layout is as follows:

/home/fifr/test/test_project/test_project.pro
/home/fifr/test/test_project/sub_project/sub_project.pro
/home/fifr/test/test_project/sub_project/hello.c

The build directory is

/home/fifr/test/test_project_build

The only custom build option is "compile" with calling "qmake ../test_project".

If there is some bug in hello.c, the compile output looks as follows

/home/fifr/test/test_project_build> make 
cd sub_project/ && ( test -e Makefile || /usr/lib/qt/bin/qmake
/home/fifr/test/test_project/sub_project/sub_project.pro -o Makefile ) &&
/usr/bin/make -f Makefile 
make[1]: Verzeichnis „/home/fifr/test/test_project_build/sub_project“ wird
betreten
gcc -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector-strong -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB
-DQT_CORE_LIB -I../../test_project/sub_project -I. -isystem /usr/include/qt
-isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I.
-I/usr/lib/qt/mkspecs/linux-g++ -o hello.o
../../test_project/sub_project/hello.c
../../test_project/sub_project/hello.c: In Funktion »main«:
../../test_project/sub_project/hello.c:4:5: Fehler: »i« nicht deklariert (erste
Benutzung in dieser Funktion)
     i=0;
     ^
../../test_project/sub_project/hello.c:4:5: Anmerkung: jeder nicht deklarierte
Bezeichner wird nur einmal für jede Funktion, in der er vorkommt, gemeldet

The problemt is that clicking on the error message
"../../test_project/sub_project/hello.c:4:5: ..." opens the file
"/home/fifr/test_project/sub_project/hello.c" (note the missing "test/" in the
path). It seems as if the path to file "hello.c" is taken relative to the build
directory "test_project_build" instead to its subdirectory
"test_project_build/sub_project", which would be correct (but this is only a
rough guess).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to