Bug 61794 - QMake Mangager scrambles dependencies in pro-files (Sources from 29.07.2003)
Summary: QMake Mangager scrambles dependencies in pro-files (Sources from 29.07.2003)
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: QMake (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-29 10:03 UTC by Tom Lueders
Modified: 2003-07-31 21:50 UTC (History)
0 users

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


Attachments
test.tgz (3.34 KB, application/x-tgz)
2003-07-31 17:13 UTC, Tom Lueders
Details
fix wrong destdir handling in qmake manager (1.38 KB, patch)
2003-07-31 20:51 UTC, Andreas Koepfle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Lueders 2003-07-29 10:03:09 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux) 
OS:          Linux

Checking any boxes in the "Link convenience libraries inside project"-listview in the "Libraries"-tab of any subproject
in gideons (Sources from 29.07.2003) QMake Manager ends in an non working pro-file.

Result:

LIBS += ../mylib1../lib/libmylib1.a \
        ../mylib2../lib/libmylib1.a
TARGETDEPS += ../mylib1../lib/libmylib1.a \
        		../mylib2../lib/libmylib1.a

This result is'nt working because the compiler tells me:
* gmake: *** No rule to make target `../mylib1../lib/libmylib1.a', needed by `../bin/myapp'. 
* gmake: *** No rule to make target `../mylib2../lib/libmylib2.a', needed by `../bin/myapp'.

Correct (hand made) lines are:
LIBS += -lmylib1 \
	     -lmylib2
TARGETDEPS += ../mylib1 \
			    ../mylib2

Please fix this.
Thanks.
Comment 1 Alexander Dymo 2003-07-30 17:56:57 UTC
This bug should have been fixed in gideon from 29.07. But nevertheless, please 
update to current cvs. I've commited yet another small fix. If you still have 
problems, make sure you have the correct version of kdevtrollproject library 
installed. 
Current cvs version will generate: 
LIBS += ../mylib1/mylib1.a \  
 ../mylib2/mylib2.a 
TARGETDEPS += ../mylib1/mylib1.a \  
 ../mylib2/mylib2.a 
Those are correct lines if you link with the static library. 
 
Comment 2 Alexander Dymo 2003-07-30 18:02:41 UTC
Oops, correct lines are 
LIBS += ../mylib2/libmylib2.a \ 
        ../mylib1/libmylib1.a 
TARGETDEPS += ../mylib2/libmylib2.a \ 
              ../mylib1/libmylib1.a 
 
This implies that the directory structure is 
/src 
/mylib1 
/mylib2 
And we are considering src.pro and mylib1 and mylib2 are static libs. 
 
Comment 3 Tom Lueders 2003-07-30 18:52:21 UTC
Subject: Re:  QMake Mangager scrambles dependencies in pro-files
 (Sources from 29.07.2003)

On Wednesday 30 July 2003 18:02, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=61794
>
>
>
>
> ------- Additional Comments From cloudtemple@mksat.net  2003-07-30 18:02
> ------- Oops, correct lines are
> LIBS += ../mylib2/libmylib2.a \
>         ../mylib1/libmylib1.a
> TARGETDEPS += ../mylib2/libmylib2.a \
>               ../mylib1/libmylib1.a
>
> This implies that the directory structure is
> /src
> /mylib1
> /mylib2
> And we are considering src.pro and mylib1 and mylib2 are static libs.


Correct.
But theese generated lines are invalid:
LIBS += ../mylib1../lib/libmylib1.a \
        ../mylib2../lib/libmylib1.a
TARGETDEPS += ../mylib1../lib/libmylib1.a \
                        ../mylib2../lib/libmylib1.a
Comment 4 Alexander Dymo 2003-07-30 21:44:32 UTC
Could you please send me your pro files or list the directory structure. 
I can't reproduce your wrong lines. Moreover, I can see changes in trollproject 
that fix your bugs. 
I've created a test project and got 
 LIBS += ../mylib2/libmylib2.a \  
 ../mylib1/libmylib1.a  
Same with dependencies. 
Everything seems to be correct. And your gideon is recent enough to be correct. 
Maybe problems with your installation. 
Your trollproject should have "Dependencies" tab in project configuration dialog 
and cvs version disables "Add subproject" menu for application and library targets. 
Comment 5 Andreas Koepfle 2003-07-31 03:39:22 UTC
Hi. I'm porting some qmake managed applications to work with kdevelop's qmake manager and 
I've experienced exactly the same problem here. 
I've looked into this issue while trying to get gideon to work with our project's *.pro files and I 
fixed it today in my gideon tree at work.  
I can send you a patch tomorrow (+ some *.pro files so you can reproduce the problem and 
check the patch)  
Comment 6 Alexander Dymo 2003-07-31 14:58:57 UTC
Yes, please do it. 
Comment 7 Tom Lueders 2003-07-31 17:13:36 UTC
Subject: Re:  QMake Mangager scrambles dependencies in pro-files
 (Sources from 29.07.2003)

On Wednesday 30 July 2003 21:44, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=61794
>
>
>
>
> ------- Additional Comments From cloudtemple@mksat.net  2003-07-30 21:44
> ------- Could you please send me your pro files or list the directory
> structure. I can't reproduce your wrong lines. Moreover, I can see changes
> in trollproject that fix your bugs.
> I've created a test project and got
>  LIBS += ../mylib2/libmylib2.a \
>  ../mylib1/libmylib1.a
> Same with dependencies.
> Everything seems to be correct. And your gideon is recent enough to be
> correct. Maybe problems with your installation.
> Your trollproject should have "Dependencies" tab in project configuration
> dialog and cvs version disables "Add subproject" menu for application and
> library targets.



Created an attachment (id=2117)
test.tgz
Comment 8 Andreas Koepfle 2003-07-31 20:51:03 UTC
Created attachment 2125 [details]
fix wrong destdir handling in qmake manager

The patch fixes this bug. QMake manager misses a "/" if the destdir variable in
the subproject is set. You can check this by applying the patch and running
gideon on the test.tgz provided by the original poster.
The problem for this bug report is in getLibAddObject() function, however I
also fixed similar looking lines in getSharedLibAddObject() &
getApplicationObject().
I hope the patch is in correct format - I created it with the cvs diff function
in gideon.

There are also some more issues with qmake manager's handling of deeper
directory structures. I'm just looking into this and will provide some more
patches when everything works fine (probably tomorrow or at the weekend)
Comment 9 Alexander Dymo 2003-07-31 21:50:15 UTC
Ah, the target path was specified for a library! 
Thanks for the patch, Andreas, this fixes the problem. 
Applied to cvs. 
Comment 10 Tom Lueders 2003-08-01 09:40:48 UTC
Subject: Re:  QMake Mangager scrambles dependencies in pro-files
 (Sources from 29.07.2003)

On Thursday 31 July 2003 21:50, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=61794
>
>
>
>
> ------- Additional Comments From cloudtemple@mksat.net  2003-07-31 21:50
> ------- Ah, the target path was specified for a library!
> Thanks for the patch, Andreas, this fixes the problem.
> Applied to cvs.

Thanks for your help.
Comment 11 Tom Lueders 2003-08-01 09:40:54 UTC
Subject: Re:  QMake Mangager scrambles dependencies in pro-files
 (Sources from 29.07.2003)

On Thursday 31 July 2003 20:51, you wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=61794
>
>
>
>
> ------- Additional Comments From koepfle@ti.uni-mannheim.de  2003-07-31
> 20:51 ------- Created an attachment (id=2125)
>  --> (http://bugs.kde.org/attachment.cgi?id=2125&action=view)
> fix wrong destdir handling in qmake manager
>
> The patch fixes this bug. QMake manager misses a "/" if the destdir
> variable in the subproject is set. You can check this by applying the patch
> and running gideon on the test.tgz provided by the original poster.
> The problem for this bug report is in getLibAddObject() function, however I
> also fixed similar looking lines in getSharedLibAddObject() &
> getApplicationObject().
> I hope the patch is in correct format - I created it with the cvs diff
> function in gideon.
>
> There are also some more issues with qmake manager's handling of deeper
> directory structures. I'm just looking into this and will provide some more
> patches when everything works fine (probably tomorrow or at the weekend)

Hallo Alexander,
thanks for your help. I will check later if it works.

Gideon is a great tool, I hope it will rule be released next time ...