Opened 13 years ago

Closed 13 years ago

#244 closed defect (fixed)

qmake generates incorrect QMAKESPECDIR

Reported by: Dmitry A. Kuminov Owned by:
Priority: major Milestone: Qt 4.7
Component: General Version: 4.6.3
Severity: high Keywords:
Cc:

Description

Given that the binary Qt build is in "D:\Coding\qt4\qt4-build-rel" and the application source tree is in "D:\Coding\qt4.tests", running "qmake D:\Coding\qt4.tests" in the directory "D:\Coding\qt\qt4.tests-bin-os2" correctly gives us this:

QMAKESPECDIR = "..\..\..\CODING\QT\QT4-BUILD-REL\mkspecs\os2-g++"

If the application build tree is in "D:\Coding\qt\ports\1", then we get this:

QMAKESPECDIR = "..\..\..\qt4.tests\CODING\QT\QT4-BUILD-REL\mkspecs\os2-g++"

which is completely incorrect.

This makes it impossible to have Qt in an arbitrary path.

Change History (3)

comment:1 Changed 13 years ago by Dmitry A. Kuminov

Found it. Turned out that QDir::cleanPath() is bogus. One of the bugs is that for paths like "D:/../myfile" it will return "myfile" instead "D:/myfile". I fixed it in r1042 and it will now return "D:/../myfile" which looks like another bug (at least GNU LIBC would remove all ".." entries, and so would the native DosQueryPathInfo?(FIL_QUERYFULLNAME) do) but much less harmless and I'm not going to fix that now because I don't know what impact it may have on existing programs (this bug is present on all platforms).

I also fixed our own bug in qmake (r1043) which triggered the above cleanPath() bug. Since this qmake code is OS/2-specific, no surprise that it wasn't triggered on other platforms.

And finally, in r1044 I fixed shortening relative paths by qmake which didn't work if the cases of the file and directory names were different. Given the above example,

QMAKESPECDIR = "..\..\..\CODING\QT\QT4-BUILD-REL\mkspecs\os2-g++"

now finally became

QMAKESPECDIR = "..\QT4-BUILD-REL\mkspecs\os2-g++"

and in the second case:

QMAKESPECDIR = "..\..\QT4-BUILD-REL\mkspecs\os2-g++"

What a relief.

That should also fix the problem Elbert has with shadow builds on his machine.

comment:2 Changed 13 years ago by Tellie

Hi Dmik,

Yes this fix the warning and wrong copy i had whith the shadow build :P

comment:3 Changed 13 years ago by Dmitry A. Kuminov

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.