Build error related to improper definition of sysroot directory (MacOSX10.11.sdk io MacOSX10.12.sdk)



  • Hi all,
    For a few days, I am stuck with a weird problem which prevent me to build anything with QtCreator.
    I am using MacOs and Qt 5.8 (same with Qt5.9 b3)

    Any build starts with :

    • this warning : "no such sysroot directory: ‘/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk’ [-Wmissing-sysroot]"
    • and ends with this error : ‘TargetConditionals.h’ file not found

    A couple of month ago I used to have this problem with an update of Xcode but since then adding QMAKE_MAC_SDK = macosx10.12 in the PRO file was fixing the problem. Unfortunately this solution is no longer working for me.

    Do you know the proper way to define sys root wit macosx10.12 ?
    Thanks for your help.



  • @Charby Someone gave me this solution which worked for me :
    Edit qdevice.pri at <user>/Qt5.8.0/5.8/clang_64/mkspecs/qdevice.pri
    and add:
    !host_build:QMAKE_MAC_SDK = macosx10.12

    For the sake of clarity I am closing this topic as solved but I definitely would love to know more about the origin of this issue, and I still can't understand how I could still have this problem after a fresh Qt5.9 (beta3) install...



  • Thanks to @jakepetroules : the origin of my problem was a remaining qmake.stash file at the root of my user directory.
    Delete any $HOME/.qmake. IS the proper solution instead of modifying qdevice.pri*


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.