Qt on OS X with just command line tools?
-
Try xcodebuild -license
-
Hi and welcome to devnet,
You're welcome ! You can even up-vote the answer, that way other people facing the same issue you had will be able to find it more easily :)
-
Hi @SGaist
I tried xcodebuild -license, but it still complains:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instanceCould you please give some comments?
-
Hi and welcome to devnet,
Did you install Xcode ? If so, which version ?
-
That's the first thing to do when developing on OS X
-
I, too, would like to be able to compile OS X desktop apps without downloading and installing 4.7GB of Xcode.
Further, Qt Creator online installer claims that Xcode 5.0 is required, but developer.apple.com points to download via the App Store, which only offers the latest version (7.3) for download.
-
Where did you saw that requirement ? IIRC That's the minimum version, you can go ahead and get the Xcode matching your version of OS X.
One thing you can try is to install the command line tools. See this page
Where did you saw that requirement ?
It's right on the install of Qt 5.6. I installed Xcode first since I figured that it was needed to interface with OS X itself. That was a lengthy download too.
Further, Qt Creator online installer claims that Xcode 5.0 is required, but developer.apple.com points to download via the App Store, which only offers the latest version (7.3) for download.
7.3.1 (7D1014) to be exact today.
One thing you can try is to install the command line tools.
Trying... and the link for it is currently here rather than digging into a document that has too much information on it beyond the scope of Qt 5.6 and OS X 10.11 El Capitan with Xcode 7.3.1.
Thanks and I'll probably be back if I can't resolve this exact same issue with Qt and OS X. I am a developer, however under Linux mostly and haven't worked on a Mac in a loooooooooong time... but I've been around for several decades. Hopefully can get
qmake
visible in the path too... Qt 5.6 install wasn't very agreeable in setting that for me. One step at a time. :) -
Where did you saw that requirement ? IIRC That's the minimum version, you can go ahead and get the Xcode matching your version of OS X.
One thing you can try is to install the command line tools. See this page
That didn't seem to work either. The Command Line Tools (OS X 10.11) for Xcode 7.3.1 is installed now.
$ /usr/bin/xcodebuild -license xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance $
I'll also have to dig for adding to the environment path as
qmake
still isn't anywhere to be found automatically. -
There's nothing much to dig: you have to update your PATH environment variable and add the folder where qmake is if you really want it. However I'd recommend using the full path when calling qmake so you ensure you are always using the version you actually want to use.
Note that the Qt Installer will not do that for you because it's goal is not to modify your system but allow you to have several Qt versions available for development at the same time (e.g. Desktop Qt, Android Qt and iOS Qt)
-
There's nothing much to dig: you have to update your PATH environment variable and add the folder where qmake is if you really want it. However I'd recommend using the full path when calling qmake so you ensure you are always using the version you actually want to use.
Note that the Qt Installer will not do that for you because it's goal is not to modify your system but allow you to have several Qt versions available for development at the same time (e.g. Desktop Qt, Android Qt and iOS Qt)
you have to update your PATH environment variable and add the folder where qmake is if you really want it.
Sort of correct... have to make the PATH first as Macintosh is a blank slate when it comes to bash.
There's nothing much to dig
Quite a bit to "dig". Getting a pleasant terminal on the Mac was a high priority from the very, very, very, very, ∞ bland black on white text.
Anyhow... back on topic... any news when this might be fixed with the licensing issue or shall I try to debug installation order?
I wasn't paying strict attention when Qt was being installed but I believe it asked to have Command Line Tools installed during the setup... so if I obliterate Qt altogether and redo it it might actually pick this up.
However I'd recommend using the full path when calling qmake so you ensure you are always using the version you actually want to use.
Unlikely that I will continue to develop on the Mac other than this one application just for a quick test. Linux will always be my primary systems and the Mac is just a novelty for others sake. So one default, preferably stable, path will be just fine to the target Qt version that will be mainly used. Having someone type in the full path is not exactly the most sound advice... but thanks for the try.
-
Had to go hunting elsewhere for the solution since it's definitely not present here. :)
Detect current version PATH for Xcode with this:
$ xcode-select --print-path /Applications/Xcode.app/Contents/Developer
... which means where the Apple App Store downloaded it to was in the wrong place... so copy (or move) Xcode to
/Applications
and thenqmake
actually works without the nagging license.Change it, if necessary, with:
$ sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer