Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt on OS X with just command line tools?
Forum Updated to NodeBB v4.3 + New Features

Qt on OS X with just command line tools?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
21 Posts 7 Posters 21.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sn34ks
    wrote on last edited by
    #9

    SGaist - I just wanted to say Thank you - I've spent the past 24 hours trying to figure out this issue and xcodebuild -license totally solved it. Much Appreciated!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #10

      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 :)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        paulqi
        wrote on last edited by
        #11

        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 instance

        Could you please give some comments?

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #12

          Hi and welcome to devnet,

          Did you install Xcode ? If so, which version ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • P Offline
            P Offline
            paulqi
            wrote on last edited by
            #13

            I didn't install Xcode.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #14

              That's the first thing to do when developing on OS X

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • PhrogzP Offline
                PhrogzP Offline
                Phrogz
                wrote on last edited by
                #15

                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.

                1 Reply Last reply
                1
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #16

                  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

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  MartiiM 2 Replies Last reply
                  0
                  • SGaistS SGaist

                    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

                    MartiiM Offline
                    MartiiM Offline
                    Martii
                    wrote on last edited by Martii
                    #17

                    @SGaist

                    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.

                    @Phrogz

                    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.

                    @SGaist

                    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. :)

                    1 Reply Last reply
                    0
                    • SGaistS SGaist

                      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

                      MartiiM Offline
                      MartiiM Offline
                      Martii
                      wrote on last edited by
                      #18

                      @SGaist

                      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.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #19

                        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)

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        MartiiM 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          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)

                          MartiiM Offline
                          MartiiM Offline
                          Martii
                          wrote on last edited by Martii
                          #20

                          @SGaist

                          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.

                          1 Reply Last reply
                          0
                          • MartiiM Offline
                            MartiiM Offline
                            Martii
                            wrote on last edited by
                            #21

                            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 then qmake actually works without the nagging license.

                            Change it, if necessary, with:

                            $ sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer
                            
                            1 Reply Last reply
                            1

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved