Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [SOLVED] XCode 7 and Qt error

    General and Desktop
    7
    11
    21073
    Loading More Posts
    • 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.
    • freddy311082
      freddy311082 last edited by freddy311082

      Hi Guys... tonight I had upgrade my XCode to the new version (version 7), before that everything was perfect, now i got this error:

      clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk'
      clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk'
      In file included from ../../anclan_kernel/common/Common.cpp:1:
      In file included from ../../anclan_kernel/common/Common.h:4:
      In file included from ../../anclan_kernel/common/common_global.h:4:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qglobal.h:39:
      In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstddef:36:
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:23:10: fatal error: 'unistd.h' file not found
      #include <unistd.h>
      ^
      In file included from ../../anclan_kernel/common/common_definitions.cpp:1:
      In file included from ../../anclan_kernel/common/common_definitions.h:4:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/QStringBuilder:1:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qstringbuilder.h:44:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qstring.h:41:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qchar.h:37:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qglobal.h:39:
      In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstddef:36:
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:23:10: fatal error: 'unistd.h' file not found
      #include <unistd.h>
      ^
      In file included from ../../anclan_kernel/common/Utils.cpp:1:
      In file included from ../../anclan_kernel/common/Utils.h:4:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/QtGlobal:1:
      In file included from /Applications/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qglobal.h:39:
      In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstddef:36:
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:23:10: fatal error: 'unistd.h' file not found
      #include <unistd.h>
      ^
      1 error generated.
      make[1]: *** [Common.o] Error 1
      make[1]: *** Waiting for unfinished jobs....
      1 error generated.
      make[1]: *** [common_definitions.o] Error 1
      1 error generated.
      make[1]: *** [Utils.o] Error 1
      make: *** [sub-common-make_first-ordered] Error 2
      01:09:34: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project anclan_kernel (kit: Desktop Qt 5.5.0 clang 64bit)
      When executing step "Make"

      does anyone know about it ?? because I didn't have this error before upgrade

      regards

      L 1 Reply Last reply Reply Quote 0
      • L
        Leandro @freddy311082 last edited by Leandro

        @freddy311082 Friend, just add to the .PRO file in the Project dir:

        QMAKE_MAC_SDK = macosx10.11

        QT is trying to use the SDK Version 10.10, but Xcode 7 has the 10.11 version.
        Every time you get this error, do "ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/" in Terminal and change the QMAKE_MAC_SDK variable accordingly.

        freddy311082 H 2 Replies Last reply Reply Quote 2
        • K
          krekeltronics last edited by

          nicely done @Leandro, that does it. Cheers!

          1 Reply Last reply Reply Quote 0
          • freddy311082
            freddy311082 @Leandro last edited by

            @Leandro
            Well done bro !!! it's work

            thanks.... :)

            1 Reply Last reply Reply Quote 0
            • H
              Hercule @Leandro last edited by

              @Leandro said:

              ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

              Great idea! However, I am now stuck with this error:
              :-1: error: Current macosx10.11 SDK version (10.11) is too old. Please upgrade Xcode.

              I am surprised because by Xcode is Version 7.0 (7A220)

              M 1 Reply Last reply Reply Quote 0
              • M
                madsdk @Hercule last edited by

                @Hercule I'm having the same problem when building for iOS. It solves the problem for building a Mac app, but sadly not for building iOS apps. Does anyone have a solution for that?

                1 Reply Last reply Reply Quote 0
                • W
                  wozza last edited by

                  It seems that when the Xcode update is applied the ios build tools are no longer loaded for creator to use this seems a bigger issue then just setting the SDK version

                  W 1 Reply Last reply Reply Quote 0
                  • W
                    wozza @wozza last edited by

                    @wozza Just looking at this and then adding the iphone simulator kit it complains :-1: error: Current macosx10.11 SDK version (10.11) is too old. Please upgrade Xcode. Now if you do ls /Applications/Xcode.app/Contents/Developer/Platforms/ on the terminal you will find multiple sdk kits so how do we then add these kits to the .pro file to support the platform we want to publish too?

                    1 Reply Last reply Reply Quote 0
                    • W
                      wozza last edited by

                      @Hercule it seems that if we do QMAKE_MAC_SDK = iphoneos you can then deploy to the iphone

                      F 2 Replies Last reply Reply Quote 0
                      • F
                        froncer @wozza last edited by froncer

                        @wozza But if i do QMAKE_MAC_SDK = iphoneos, the old problem with

                        0: fatal error: 'unistd.h' file not found
                        #include <unistd.h>

                        appears again.

                        1 Reply Last reply Reply Quote 0
                        • F
                          froncer @wozza last edited by

                          @wozza Found the solution by myself by setting only the version for macosx to 10.11:

                          QMAKE_MAC_SDK.macosx.version = 10.11

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post