Results 1 to 4 of 4

Thread: QMake fail with whitespace in DESTDIR

  1. #1
    Join Date
    May 2011
    Posts
    46
    Thanks
    5

    Default QMake fail with whitespace in DESTDIR

    I have the following code code specify various output dir and the dest dir

    Qt Code:
    1. BUILD_ROOT = $${PWD}/build/$$TARGET-$$TEMPLATE
    2. DIST_ROOT = $${PWD}/dist
    3.  
    4. CONFIG(debug, debug|release) {
    5. BUILD_ROOT = $${BUILD_ROOT}/debug
    6. DIST_ROOT = $${DIST_ROOT}/debug
    7. } else {
    8. BUILD_ROOT = $${BUILD_ROOT}/release
    9. DIST_ROOT = $${DIST_ROOT}/release
    10. }
    11.  
    12. DESTDIR = $${DIST_ROOT}
    13. OBJECTS_DIR = $${BUILD_ROOT}/obj
    14. MOC_DIR = $${BUILD_ROOT}/moc
    15. RCC_DIR = $${BUILD_ROOT}/rcc
    16. UI_DIR = $${BUILD_ROOT}/ui
    To copy to clipboard, switch view to plain text mode 

    However when the PWD is expanded to a path that contains spaces, the final makefile will fail when build.

    This is the compile output:
    Qt Code:
    1. Running build steps for project logging...
    2. Configuration unchanged, skipping qmake step.
    3. Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
    4. c:\qtsdk\desktop\qt\4.7.4\mingw\bin\qmake.exe -spec c:\QtSDK\Desktop\Qt\4.7.4\mingw\mkspecs\win32-g++ CONFIG+=release -o Makefile logging.pro
    5. C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Release
    6. mingw32-make[1]: Entering directory `C:/Documents and Settings/Grayfox/Desktop/root/projects/logging/trunk/src/logging'
    7. g++ -Wl,-s -mthreads -shared -Wl,--out-implib,c:\Documents and Settings\Grayfox\Desktop\root\projects\logging\trunk\dist\release\liblogging.a -o ..\..\dist\release\logging.dll ../../build/logging-lib/release/obj/Logging.o -L"c:\QtSDK\Desktop\Qt\4.7.4\mingw\lib"
    8. mingw32-make[1]: Leaving directory `C:/Documents and Settings/Grayfox/Desktop/root/projects/logging/trunk/src/logging'
    9. g++: and: No such file or directory
    10. g++: Settings\Grayfox\Desktop\root\projects\logging\trunk\dist\release\liblogging.a: No such file or directory
    11. mingw32-make[1]: *** [..\..\dist\release\logging.dll] Error 1
    12. mingw32-make: *** [release] Error 2
    13. The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    14. Error while building project logging (target: Desktop)
    15. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 

    Notice the line:
    g++ -Wl,-s -mthreads -shared -Wl,--out-implib,c:\Documents and Settings\Grayfox\Desktop\root\projects\logging\tru nk\dist\release\liblogging.a -o

    The path is not quoted, which cause this error:
    g++: Settings\Grayfox\Desktop\root\projects\logging\tru nk\dist\release\liblogging.a: No such file or directory

    Normally, if I do not explicitly set a DESTDIR, the path above would have quotes around them.

    Is this a known issue?

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QMake fail with whitespace in DESTDIR

    why you need to use $${PWD}?
    I'm prety sure that it will work if you remove "$${PWD}/" - so you will have relative paths instead of absolute paths.
    Adding quotes should fix the problem too.

  3. #3
    Join Date
    May 2011
    Posts
    46
    Thanks
    5

    Default Re: QMake fail with whitespace in DESTDIR

    Quote Originally Posted by MarekR22 View Post
    why you need to use $${PWD}?
    I'm prety sure that it will work if you remove "$${PWD}/" - so you will have relative paths instead of absolute paths.
    Adding quotes should fix the problem too.
    Firstly, adding quotes doesn't fix the problem.

    The reason I use PWD is that the qmake code is actually sitting in a global pri file located in a root directory, that will be included by all sub-projects, so that everything will be build to the root directory's sub-folders

  4. #4
    Join Date
    Dec 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QMake fail with whitespace in DESTDIR

    Could it be $$quote($${PWD}/dist)
    If not this might be helpful http://doc.qt.nokia.com/latest/qmake...tml#whitespace

Similar Threads

  1. QtCreator, MacOS X and DESTDIR
    By kkk777kkk in forum Qt Tools
    Replies: 2
    Last Post: 2nd August 2011, 08:41
  2. Destdir
    By tiho_bg in forum General Programming
    Replies: 2
    Last Post: 29th March 2011, 17:02
  3. Replies: 0
    Last Post: 15th March 2010, 13:16
  4. qmake DESTDIR permissions behavior (Unix)
    By wdezell in forum Qt Tools
    Replies: 3
    Last Post: 9th March 2009, 14:59
  5. XCode and Plugins - DESTDIR
    By themolecule in forum Qt Programming
    Replies: 4
    Last Post: 9th October 2007, 19:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.