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. Xcode 9 update breaks Qt Mkspec for mac
Qt 6.11 is out! See what's new in the release blog

Xcode 9 update breaks Qt Mkspec for mac

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 4.1k 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.
  • W Offline
    W Offline
    wibu
    wrote on last edited by
    #1

    After updating to Xcode 9 i get the following error when trying to compile my previously "flawless" code:

    clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk' [-Wmissing-sysroot]
    

    followed by errors such as:

    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:86:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found
    #include_next <stdlib.h>
    

    I think this is a general error for ALL mac users that update to xcode 9, so I thought it would be a good idea to start an issue so we can have the most general solution here.

    Ugly Workaround: find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk and rename it
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk

    I'm sure this is not how this should be handled generally, I assume the mkspec for macosx should be updated with the correct sdk version?

    In the meantime since there will be many people looking for this issue after they have pressed "update" on Xcode, what is the best workaround until the next version of Qt (with new mkspecs) comes out?

    kshegunovK B 2 Replies Last reply
    0
    • W Offline
      W Offline
      wibu
      wrote on last edited by wibu
      #4

      Hi, thanks for the replies. The two workarounds we have here (the one i described and the one described by Bofei) seem to work, but are not a 'real' solution to the problem which is described better here :
      https://bugreports.qt.io/browse/QTBUG-63323

      So the solution that works best for me (also referred to in the last comment on https://forum.qt.io/topic/83447/made-the-mistake-of-updating-xcode)
      is to manually clean the .qmake.stash from the build directory.

      1 Reply Last reply
      3
      • W wibu

        After updating to Xcode 9 i get the following error when trying to compile my previously "flawless" code:

        clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk' [-Wmissing-sysroot]
        

        followed by errors such as:

        In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:86:
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found
        #include_next <stdlib.h>
        

        I think this is a general error for ALL mac users that update to xcode 9, so I thought it would be a good idea to start an issue so we can have the most general solution here.

        Ugly Workaround: find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk and rename it
        /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk

        I'm sure this is not how this should be handled generally, I assume the mkspec for macosx should be updated with the correct sdk version?

        In the meantime since there will be many people looking for this issue after they have pressed "update" on Xcode, what is the best workaround until the next version of Qt (with new mkspecs) comes out?

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by
        #2

        Have you tried what was suggested yesterday?

        https://forum.qt.io/topic/83447/made-the-mistake-of-updating-xcode

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        0
        • W wibu

          After updating to Xcode 9 i get the following error when trying to compile my previously "flawless" code:

          clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk' [-Wmissing-sysroot]
          

          followed by errors such as:

          In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cstdlib:86:
          /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:94:15: fatal error: 'stdlib.h' file not found
          #include_next <stdlib.h>
          

          I think this is a general error for ALL mac users that update to xcode 9, so I thought it would be a good idea to start an issue so we can have the most general solution here.

          Ugly Workaround: find /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk and rename it
          /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk

          I'm sure this is not how this should be handled generally, I assume the mkspec for macosx should be updated with the correct sdk version?

          In the meantime since there will be many people looking for this issue after they have pressed "update" on Xcode, what is the best workaround until the next version of Qt (with new mkspecs) comes out?

          B Offline
          B Offline
          Bofei
          wrote on last edited by
          #3

          @wibu
          Adding this line :
          QMAKE_MAC_SDK = macosx10.13
          in the qdevice.pri file (/clang_64/mkspecs of QT).
          Reference: https://groups.google.com/forum/#!topic/golden-cheetah-developers/JQbQDuJHl70

          R 1 Reply Last reply
          2
          • W Offline
            W Offline
            wibu
            wrote on last edited by wibu
            #4

            Hi, thanks for the replies. The two workarounds we have here (the one i described and the one described by Bofei) seem to work, but are not a 'real' solution to the problem which is described better here :
            https://bugreports.qt.io/browse/QTBUG-63323

            So the solution that works best for me (also referred to in the last comment on https://forum.qt.io/topic/83447/made-the-mistake-of-updating-xcode)
            is to manually clean the .qmake.stash from the build directory.

            1 Reply Last reply
            3
            • B Bofei

              @wibu
              Adding this line :
              QMAKE_MAC_SDK = macosx10.13
              in the qdevice.pri file (/clang_64/mkspecs of QT).
              Reference: https://groups.google.com/forum/#!topic/golden-cheetah-developers/JQbQDuJHl70

              R Offline
              R Offline
              rmick
              wrote on last edited by rmick
              #5

              @Bofei Many thanks, that fixed it for me :-)

              QMAKE_MAC_SDK = macosx10.13
              in the qdevice.pri file (/clang_64/mkspecs of QT).

              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