Results 1 to 10 of 10

Thread: Attemping to use Qt 4.6 breaks make command

  1. #1
    Join Date
    Jul 2009
    Posts
    8
    Thanks
    2

    Default Attemping to use Qt 4.6 breaks make command

    The other day I decided to try installing Qt 4.6.0 from the SDK binary download. I already had an existing install of MinGW, located in C:\MinGW, so I chose not to install the bundled copy of MinGW. Other than that, I chose the default configuration for the rest of the Qt 4.6 installation, and it completed without any problems. I then updated my Qt-related path variables, which previously pointed to my existing Qt 4.5.0 installation directory in C:\Qt\2009.01, to point to the new Qt 4.6.0 installation in C:\Qt\2009.05. I did not change my MinGW environment variable, which remains set to C:\MinGW\bin.

    The problem is that when I now try to use the make command in any context, I get an error saying that it can't be found. If I revert my Qt environment variables to point back to the 4.5 installation in C:\Qt\2009.01, make works again. What is the problem here?

    Thanks.
    Qt 4.5 2009.01 | Qwt 5.2.0 | MinGW 5.1.4 | Windows XP SP3

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Attemping to use Qt 4.6 breaks make command

    See the contents of your PATH variable. It probably doesn't contain the directory with make.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2009
    Posts
    8
    Thanks
    2

    Default Re: Attemping to use Qt 4.6 breaks make command

    OK this is my current PATH:

    Qt Code:
    1. PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Qt\2009.05\bin;C:\Qt\2009.05\qt\bin;C:\MinGW\bin;C:\Program Files\Mercurial
    To copy to clipboard, switch view to plain text mode 

    What is missing?
    Qt 4.5 2009.01 | Qwt 5.2.0 | MinGW 5.1.4 | Windows XP SP3

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Attemping to use Qt 4.6 breaks make command

    How should I know? Where is "make" in your system?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Dec 2009
    Posts
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Attemping to use Qt 4.6 breaks make command

    Are you sure you actually have make? Have you used make in your mingw environment previously? The MinGW distributed with Qt has mingw32-make.exe, since it's strictly not a fully functional make (i.e doesn't support parallelized builds etc). I'm pretty sure (although I'm on a mac right now and can't check) that make is part of MSYS, not MinGW.

    I've gotten used to typing mingw32-make to remind myself that I'm working in an inferior while in Windows. ;-)

  6. #6
    Join Date
    Jul 2009
    Posts
    8
    Thanks
    2

    Default Re: Attemping to use Qt 4.6 breaks make command

    OK I think I figured out what is happening. When I use the 4.5 installation, "make" is actually a batch file, C:\Qt\2009.01\qt\bin\make.bat, which internally calls mingw32-make, which is located in C:\MinGW\bin. For some reason, the 4.6 installation does not have this same batch file in C:\Qt\2009.05\qt\bin. Did something change between 4.5 and 4.6 as far as the preferred way to execute makefiles?
    Qt 4.5 2009.01 | Qwt 5.2.0 | MinGW 5.1.4 | Windows XP SP3

  7. #7
    Join Date
    Dec 2009
    Posts
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Attemping to use Qt 4.6 breaks make command

    2009.01 was the last version with make.bat. I remember creating a bat file myself for 2009.02, but had problems getting Eclipse to execute it (apparently it would only spawn real executables) so I ended up copying mingw32-make.exe to make.exe. Learning later about the background of mingw32-make and its lack of features, I have since dropped making this customization.

    Just accepting this fact and dealing with mingw32-make will also make any build scripts you make run on default Windows Qt installations without problems, so I think that's the appropriate action.

    -Tore
    Last edited by toreo; 4th December 2009 at 18:25. Reason: Clarified bat file was for 2009.02.

  8. #8
    Join Date
    Jul 2009
    Posts
    8
    Thanks
    2

    Default Re: Attemping to use Qt 4.6 breaks make command

    Thanks toreo for shedding some light on this.

    Quote Originally Posted by toreo View Post
    2009.01 was the last version with make.bat.
    I see, so do we now have to type "mingw32-make" every time to compile? Any ideas why the bat file was removed?

    Quote Originally Posted by toreo View Post
    Learning later about the background of mingw32-make and its lack of features, I have since dropped making this customization.
    Where can I read about these issues? Is it ever advisable to use anything other than mingw32-make?

    Thanks.
    Qt 4.5 2009.01 | Qwt 5.2.0 | MinGW 5.1.4 | Windows XP SP3

  9. #9
    Join Date
    Dec 2009
    Posts
    7
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Attemping to use Qt 4.6 breaks make command

    Quote Originally Posted by ajoffe View Post
    I see, so do we now have to type "mingw32-make" every time to compile? Any ideas why the bat file was removed?


    Where can I read about these issues? Is it ever advisable to use anything other than mingw32-make?
    I don't know why the bat file was removed (haven't seen any official comment by Nokia on it), but I can guess that it was to avoid confusion with the POSIX make that comes with MSYS. The POSIX make tool will expect POSIX style paths and requires either MSYS (i.e /c/src/myproj) or Cygwin (i.e /cygdrive/c/src/myproj) as opposed to Windows drive letters and backslashes. Attempting to combine the two path styles normally result in massive headaches and broken builds.

    mingw32-make has fewer dependencies than a POSIX make and can be run from cmd.exe. So it's a quicker, simpler solution that supports Windows paths and is supported by default from Nokia's distribution. To have qmake generate makefiles with POSIX paths you have to rebuild qmake as well. You will find more information about this by googling for "qt msys" for instance. Depending on your choice of IDE it may or may not be possible to get it to build using MSYS. That would give you a more powerful shell to work in, and your make tool would support parallel builds, but it will take some work to get there. YMMV.

    There's a brief and vague mention on the difference between mingw32-make and make in the MinGW FAQ, other than that I guess the source code and googling are your best options for learning more.

    -Tore

  10. The following user says thank you to toreo for this useful post:

    ajoffe (4th December 2009)

  11. #10
    Join Date
    Jul 2009
    Posts
    8
    Thanks
    2

    Default Re: Attemping to use Qt 4.6 breaks make command

    Thanks for explaining, that makes sense. I don't use MSYS but I can see why the old make.bat would be problematic in that context.
    Qt 4.5 2009.01 | Qwt 5.2.0 | MinGW 5.1.4 | Windows XP SP3

Similar Threads

  1. make: command not found, Error: 127
    By ct in forum General Programming
    Replies: 3
    Last Post: 21st April 2015, 08:19
  2. Replies: 8
    Last Post: 27th October 2009, 09:07
  3. Cant find make command: mingw32-make.exe
    By Nadia in forum Installation and Deployment
    Replies: 1
    Last Post: 26th August 2009, 09:09
  4. 'make' is not recognized as an internal or external command
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 9th June 2007, 15:55
  5. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

Tags for this Thread

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.