Important: Please read the Qt Code of Conduct -

Qt 5.1.1 build: "QMAKE_MAC_SDK must be set when building on Mac"

  • Hi all,

    I repeatedly get this message during configure, having unarchived the source from "this file":

    My environment includes the variable, exported in .bash_profile:

    and I've also tried the full path:

    My configure line is
    @./configure -opensource -nomake examples -nomake tests -shared -arch x86 -arch x86_64@
    And I've tried with the switch -sdk, set to each of the strings above too. No dice.

    As you can see I require a dual architecture build, otherwise I'd just use the precompiled version. Can anyone reproduce this or offer any help?

  • Please indulge me in a small bump. Apologies.

  • Could it be that Qt is looking for something specific into the SDK, like a subfolder or a particular configuration file?
    Try exploring the SDK folder a bit, see if any subfolder makes more sense than the main SDK folder. For example, on my Windows system, the Visual Studio SDK is installed in C:\Program Files (x86)\Microsoft Visual Studio 11.0 but the actual C++ include files (and all the stuff required for the build environment) resides in a subfolder called VC; so if I have to specify the SDK path I should set C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC

  • Thanks for posting, but no, I don't believe it's anything like that. All the configuration paths appear to be right, I just can't see how it's not reading the environment variable. I'll try and read through the script.

  • That is utterly bizarre. It works fine on another machine of much the same specs and configuration. I'll do some more investigation on my end and will post here if I can solve it.

  • This issue was solved by removing
    from my environment. Not totally sure how it got there.

  • where was this variable set? I have the same problem with QMAKE_MAC_SDK variable not being set. Im running on osx 10.8.5

  • In my bashrc if I recall correctly. Just echo it to see if it's set..

  • hmm, i cant find it anywhere in my environment settings :( Ive also tried to export it myself as you had, but no dice.

Log in to reply