Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. xcrun: error: no utility name specified
Forum Updated to NodeBB v4.3 + New Features

xcrun: error: no utility name specified

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 5 Posters 2.9k Views 1 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.
  • btseB Offline
    btseB Offline
    btse
    wrote on last edited by btse
    #1

    I'm porting my code to Qt 5.11 and I now get this message when I build my project:

    cd momagse/ && ( test -e Makefile || /usr/local/Cellar/qt/5.11.2/bin/qmake -o Makefile /Users/brad/labcode/qt56_port/momagse/momagse.pro -config release ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile

    OUTPUT:

    xcrun: error: no utility name specified
    Usage: xcrun [options] <tool name> ... arguments ...

    Find and execute the named command line tool from the active developer
    directory.

    The active developer directory can be set using xcode-select, or via the
    DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual
    pages for more information.

    Options:
    -h, --help show this help message and exit
    --version show the xcrun version
    -v, --verbose show verbose logging output
    --sdk <sdk name> find the tool for the given SDK name
    --toolchain <name> find the tool for the given toolchain
    -l, --log show commands to be executed (with --run)
    -f, --find only find and print the tool path
    -r, --run find and execute the tool (the default behavior)
    -n, --no-cache do not use the lookup cache
    -k, --kill-cache invalidate all existing cache entries
    --show-sdk-path show selected SDK install path
    --show-sdk-version show selected SDK version
    --show-sdk-build-version show selected SDK build version
    --show-sdk-platform-path show selected SDK platform path
    --show-sdk-platform-version show selected SDK platform version

    It seems to still build fine, but I don't know why this is output. Does anyone know how to fix this?

    A bit more info:
    Mac OS X 10.11.6
    Xcode 8.1 8B62
    GNU Make 3.81

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

      Hi,

      Do you know the exact line of the Makefile that triggers that ?

      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
      • btseB Offline
        btseB Offline
        btse
        wrote on last edited by
        #3

        After some more debugging, I was able to fix this by updating my XCode version to 9.1, MacOS SDK 10.13 and also updating my OS from Yosemite to High Sierra.

        I don't know which of these fixed the problem, but I'm not getting that output anymore.

        1 Reply Last reply
        0
        • btseB Offline
          btseB Offline
          btse
          wrote on last edited by
          #4

          Scratch that, I didn't actually resolve this.

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

            Then, my question still is valid.

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

            btseB 2 Replies Last reply
            0
            • SGaistS SGaist

              Then, my question still is valid.

              btseB Offline
              btseB Offline
              btse
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • SGaistS SGaist

                Then, my question still is valid.

                btseB Offline
                btseB Offline
                btse
                wrote on last edited by btse
                #7

                @SGaist After some more digging, I've found some things:

                1. This only happens for apps and not libs
                2. I build my projects in debug_and_release mode, so it generates 3 Makefiles: Makefile, Makefile.Debug, Makefile.Release
                3. I noticed that this only occurs when I do "make" instead of explicitly stating the debug or release versions (make -f Makefule.Debug), so this led me to believe there was something unique about "Makefile".
                4. So I went and poked around a bit and noticed this line:
                include /usr/local/Cellar/qt/5.11.2/mkspecs/features/mac/sdk.mk
                

                I navigated to that file and found this line in that file:

                CURRENT_MAC_SDK_VERSION := $(shell /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version)
                

                I was able to reproduce the output in the original post with the following command:

                /usr/bin/xcrun --sdk -show-sdk-version
                

                If I do what it's supposed to do:

                /usr/bin/xcrun --sdk macosx -show-sdk-version
                

                Then it produces the expected output of:

                10.13
                

                So that would suggest $(EXPORT_QMAKE_MAC_SDK) was undefined, so I went back into the qmake generated Makefile and noticed this:

                MAKEFILE      = Makefile
                
                first: release
                install: release-install
                uninstall: release-uninstall
                include /usr/local/Cellar/qt/5.11.2/mkspecs/features/mac/sdk.mk
                QMAKE         = /usr/local/bin/qmake511
                DEL_FILE      = rm -f
                CHK_DIR_EXISTS= test -d
                MKDIR         = mkdir -p
                COPY          = cp -f
                COPY_FILE     = cp -f
                COPY_DIR      = cp -f -R
                INSTALL_FILE  = install -m 644 -p
                INSTALL_PROGRAM = install -m 755 -p
                INSTALL_DIR   = cp -f -R
                QINSTALL      = /usr/local/bin/qmake511 -install qinstall
                QINSTALL_PROGRAM = /usr/local/bin/qmake511 -install qinstall -exe
                DEL_FILE      = rm -f
                SYMLINK       = ln -f -s
                DEL_DIR       = rmdir
                MOVE          = mv -f
                TAR           = tar -cf
                COMPRESS      = gzip -9f
                DISTNAME      = momadataview1.0.0
                DISTDIR = /Users/brad/labcode/qt5/momadataview/build/release/obj/momadataview1.0.0
                SUBTARGETS    =  \
                		release \
                		debug
                
                
                ####### Custom Variables
                EXPORT_QMAKE_MAC_SDK = macosx
                EXPORT_QMAKE_MAC_SDK_VERSION = 10.13
                ...
                

                Notice how the "Include" line comes before the definition of "EXPORT_QMAKE_MAC_SDK" and "EXPORT_QMAKE_MAC_SDK_VERSION" at the bottom.

                So, it looks like this is why this is happening. To test my hypothesis, I went and moved the two variables above the include and reran "make". Lo and behold, this was my output:

                /Library/Developer/CommandLineTools/usr/bin/make -f Makefile.Release
                make[1]: Nothing to be done for `first'.
                

                I suppose this is a bug then? I'm surprised this was not caught during testing, it seems like a pretty normal work flow.

                It's possible there's something wrong with my Qt version or I'm doing something wrong in my project files.

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

                  Interesting results !

                  Can you reproduce that with a minimal .pro file ?

                  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
                  2
                  • btseB Offline
                    btseB Offline
                    btse
                    wrote on last edited by
                    #9

                    Yup, so I created a new QWidget project with Qt Creator.

                    I manually added "CONFIG += debug_and_release" to the .proj file and I was able to reproduce the initial problem.

                    Seems like "debug_and_release" mode really got screwed around in Qt5+. I actually have another bug ticket already open because "debug_and_release" auto generates "debug" and "release" dirs when I don't want it to (even with "debug_and_release_target" removed), which it never did in Qt4's qmake.

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

                      Can post the link to the ticket ?

                      Can you test with Qt 5.12's beta ?

                      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
                      1
                      • N Offline
                        N Offline
                        Nando
                        wrote on last edited by
                        #11

                        Hi,
                        any news about this?
                        I just upgrded to Qt 5.11.2 and McOS 10.14.1.
                        Now i get the same problem.

                        xcrun: error: no utility name specified
                        Usage: xcrun [options] <tool name> ... arguments ...
                        
                        Find and execute the named command line tool from the active developer
                        directory.
                        
                        The active developer directory can be set using `xcode-select`, or via the
                        DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual
                        pages for more information.
                        
                        Options:
                          -h, --help                  show this help message and exit
                          --version                   show the xcrun version
                          -v, --verbose               show verbose logging output
                          --sdk <sdk name>            find the tool for the given SDK name
                          --toolchain <name>          find the tool for the given toolchain
                          -l, --log                   show commands to be executed (with --run)
                          -f, --find                  only find and print the tool path
                          -r, --run                   find and execute the tool (the default behavior)
                          -n, --no-cache              do not use the lookup cache
                          -k, --kill-cache            invalidate all existing cache entries
                          --show-sdk-path             show selected SDK install path
                          --show-sdk-version          show selected SDK version
                          --show-sdk-build-version    show selected SDK build version
                          --show-sdk-platform-path    show selected SDK platform path
                          --show-sdk-platform-version show selected SDK platform version
                        
                        1 Reply Last reply
                        0
                        • btseB Offline
                          btseB Offline
                          btse
                          wrote on last edited by
                          #12

                          No, it's annoying but I've been ignoring it since it doesn't actually break anything.

                          Here's the bug ticket I just created about it: https://bugreports.qt.io/browse/QTBUG-72449

                          I have not tested to see if this was resolved with Qt 5.12. I'll try that sometime soon.

                          1 Reply Last reply
                          0
                          • btseB btse

                            Yup, so I created a new QWidget project with Qt Creator.

                            I manually added "CONFIG += debug_and_release" to the .proj file and I was able to reproduce the initial problem.

                            Seems like "debug_and_release" mode really got screwed around in Qt5+. I actually have another bug ticket already open because "debug_and_release" auto generates "debug" and "release" dirs when I don't want it to (even with "debug_and_release_target" removed), which it never did in Qt4's qmake.

                            F Offline
                            F Offline
                            fouad1995
                            wrote on last edited by
                            #13

                            @btse

                            @btse said in xcrun: error: no utility name specified:

                            Yup, so I created a new QWidget project with Qt Creator.

                            I manually added "CONFIG += debug_and_release" to the .proj file and I was able to reproduce the initial problem.
                            Videoder Tubemate Snaptube
                            Seems like "debug_and_release" mode really got screwed around in Qt5+. I actually have another bug ticket already open because "debug_and_release" auto generates "debug" and "release" dirs when I don't want it to (even with "debug_and_release_target" removed), which it never did in Qt4's qmake.

                            I created a new QWidget assignment with Qt author.

                            I manually delivered "CONFIG += debug_and_release" to the .proj file and i used to be capable of reproduce the preliminary trouble.

                            looks as if "debug_and_release" mode certainly got screwed around in Qt5+. I simply have every other trojan horse price tag already open because "debug_and_release" automobile generates "debug" and "release" dirs after I don't want it to (despite "debug_and_release_target" eliminated), which it in no way did in Qt4's qmake.

                            btseB 1 Reply Last reply
                            0
                            • F fouad1995

                              @btse

                              @btse said in xcrun: error: no utility name specified:

                              Yup, so I created a new QWidget project with Qt Creator.

                              I manually added "CONFIG += debug_and_release" to the .proj file and I was able to reproduce the initial problem.
                              Videoder Tubemate Snaptube
                              Seems like "debug_and_release" mode really got screwed around in Qt5+. I actually have another bug ticket already open because "debug_and_release" auto generates "debug" and "release" dirs when I don't want it to (even with "debug_and_release_target" removed), which it never did in Qt4's qmake.

                              I created a new QWidget assignment with Qt author.

                              I manually delivered "CONFIG += debug_and_release" to the .proj file and i used to be capable of reproduce the preliminary trouble.

                              looks as if "debug_and_release" mode certainly got screwed around in Qt5+. I simply have every other trojan horse price tag already open because "debug_and_release" automobile generates "debug" and "release" dirs after I don't want it to (despite "debug_and_release_target" eliminated), which it in no way did in Qt4's qmake.

                              btseB Offline
                              btseB Offline
                              btse
                              wrote on last edited by
                              #14

                              @fouad1995 Yup, I actually created a bug about this one also: https://bugreports.qt.io/browse/QTBUG-71437

                              Seems like it's too low priority for them to actually do anything about it. I haven't tried to see if this was somehow resolved in 5.12 yet, but I find it unlikely.

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                alexmorghan
                                Banned
                                wrote on last edited by
                                #15
                                This post is deleted!
                                1 Reply Last reply
                                0

                                • Login

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